in reply to Efficiency of seek

llancet

You received all good answers, but I suspect that you need to clarify/update your question to get the answer you may still need. For instance,

  • does your file constantly change or is it static?
  • will it increase to a size that is greater than the memory in your computer?
  • does it need to run during prime time or can it run off-shift?
  • can you use a data base to do the seeking for you?

    None of these has anything to do with perl directly, but for perl to work correctly for you, questions like these need to be determined by you

    But if you have the answer you want, then have a great day.

    Good Luck

    "Well done is better than well said." - Benjamin Franklin

  • Replies are listed 'Best First'.
    Re^2: Efficiency of seek
    by llancet (Friar) on Oct 21, 2011 at 01:10 UTC

      Thanks to all answers on my question! I've finished my work.

      In my actual application, I have two files: one (file A) is the original data file, the other one(file B) is some kind of analysis result for the original data file. For some reason, the record order in file B is not same with file A.

      Now, I need to do some analysis based on each record in file A and B. So, I decided to create an index for file B, access file A sequencially, and seek current record's content on file B.