in reply to Re: System V shared Memory Perl Module (more of a C question than Perl) aka Efficient SQL result caching
in thread System V shared Memory Perl Module (more of a C question than Perl) aka Efficient SQL result caching

OS is Redhat 7.3. DB is MySQL because it has the fastest SELECT speed of any DB (so they say). Happy to use any DB - speed is the issue not rigid data integrity/rollbacks or finance per se. Berkeley won't work due to single reader/writer or multi reader config. Server has 2GB ram dual processors and all the RAID tweaks to minimize seek time. MySQL/OS compile tweaks to get around its ~800 query limit in stock form. Typical query is:

SELECT integer from client_X WHERE key IN ( ?,?,?,? ) ORDER BY key DES +C

Primary key is key. IN grouping 1 min, 10 max, average 3 typical 2-4.

Peak query rate can potentially exceed 10,000 per second. Base code all copes fine. DB not so happy at high loads.

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

  • Comment on Re: Re: System V shared Memory Perl Module (more of a C question than Perl) aka Efficient SQL result caching
  • Download Code

Replies are listed 'Best First'.
Re: Re: Re: System V shared Memory Perl Module (more of a C question than Perl) aka Efficient SQL result caching
by hakkr (Chaplain) on Apr 03, 2003 at 08:25 UTC
    I have the same sort of problem with an overloaded db doing queries where the results only change 5-10 times a day.

    I was thinking of only triggering my select queries when the cgi that updates the data is used. So my script would run off a static file and the file would only get updated when the data changed.

    You think I can use these memory module instead to get rid of the static file and store my results in memory.

    I'm in Mysql Apache as well and I am pretty sure that mysql has a query cache.