in reply to Merging Hashes adding multiple values for keys, and replacing others

I'd think this would be a good case for a database. Although i can't realy grasp your problem. With the database you should be able to then group by whichever colum you want. Perhaps not the best solution but the first one to come to mind.

Maybe apache can log straight into a database, then you could just work with the data

___________
Eric Hodges
  • Comment on Re: Merging Hashes adding multiple values for keys, and replacing others

Replies are listed 'Best First'.
Re: Re: Merging Hashes adding multiple values for keys, and replacing others
by vili (Monk) on Aug 21, 2003 at 18:17 UTC
    The problem with an apache to mysql logging is that apache generates 7 million + log entries per day
    between 7 servers. that is a huge database, and thus my reluctance to go that way, i guess i can turn
    to a grep/awk/sort for some of the things... i was however hoping for a perl solution.
    ~vili
      perl hashes take at least 1.5x the amount of space as the original data in memory -- so are you saying it makes more sense to you to build a huge hash to operate on in ram than it does to use a real database (on disk) because the database on disk will be too large? dont get it. With proper normilization the database should be smaller in size than the original data.

      -Waswas

      The huge database wont be any bigger than you log files. (at least it shouldn't be).

      Also you gain considerable speed and power in removeing old entries on the fly. Just my two cents though. Its definitly possible that file handling is better for you.

      ___________
      Eric Hodges