in reply to Re: how to define key for a hash
in thread how to define key for a hash

hooo... i need to do this activity in every fifteen mins. so populating the hash from database in every fifteen mins is not an issue?

Replies are listed 'Best First'.
Re^3: how to define key for a hash
by Corion (Patriarch) on Jun 25, 2009 at 12:27 UTC

    See perl database access and my answer Re: perl database access. It would help us to help you better if you tried to state more of the problem instead of trying to feed it piece by piece. It will also help us to provide you with more answers geared towards reaching your goal if you actually read our answers and provide the information needed and do the work that needs to be done.

      my actual pb is i need a expert advice in selecting the option whether go ahead with hash from a file or hash from database. Increasing the hardware or rearranging the index can be done to get a faster serach pattern. I have to do the lookup in database only , but i thought accessing databse for such inflow of records will impact performance.SO i though of option of hash from file/database. i my case 2600*100 records/min needs to be lookup and table will have 100k records i am very bad in network area.

        Even an expert cannot tell you that without knowing your system, your environment and so on. I already told you this. If you can't do the analysis yourself, you will have to hire somebody who does the analysis for you.

Re^3: how to define key for a hash
by davorg (Chancellor) on Jun 25, 2009 at 12:25 UTC
      u meant access the database for every lookup that will be more efficient? I am expecting an inflow of data like this 100 file/min 2600 records in each file and this perl script has to execute in every 10-15 mins i have a memory of 64gb.

        I mean that for the amount of data and the complexity of queries that you're talking about, using a database will probably be more efficient than trying to manipulate your own in memory data structures.

        Will it be fast enough on your system? I have no way of knowing. I suggest trying it and seeing what happens. If there's a problem then come back here for performance tuning suggestions.

        --

        See the Copyright notice on my home node.

        Perl training courses