List:General Discussion« Previous MessageNext Message »
From:Jeremy Zawodny Date:November 6 2001 5:39am
Subject:Re: key cache optimization
View as plain text  
On Mon, Nov 05, 2001 at 07:15:31PM -0700, Michael Griffith wrote:
>
> Either the key cache is inefficient or I misunderstand it. Can
> anyone explain this?
> 
> Before query:
> 
> | Key_blocks_used          | 530300     |
> | Key_read_requests        | 56072940   |
> | Key_reads                | 527026     |
> 
> Query executed, takes 30+ seconds
> 
> After Query
> 
> | Key_blocks_used          | 530300     |
> | Key_read_requests        | 56092143   |
> | Key_reads                | 527026     |
> 
> No increase in key_reads, so lookup came from cache
> 
> Same Query run again takes 0.11 seconds (272 times faster)

Interesting.

Even if all the key blocks where in memory (and not swapped
out--you're not using Linux 2.4.x, are you?), there's the data itself.
The rows may not have been cached the first time, but the second time
they probably were.

Jeremy
-- 
Jeremy D. Zawodny, <jzawodn@stripped>
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936

MySQL 3.23.41-max: up 61 days, processed 1,335,559,153 queries (253/sec. avg)
Thread
key cache optimizationMichael Griffith6 Nov
  • Re: key cache optimizationJeremy Zawodny6 Nov
  • Re: key cache optimizationMichael Griffith6 Nov
    • Re: key cache optimizationJeremy Zawodny7 Nov
  • Re: key cache optimizationDan Nelson6 Nov