Cc: mysql
Subject: Re: Does mysql cache strip out /* comments */ first?
Given that even spacing is important, it's a safe bet that it takes comments
into consideration, too.
Easily tested, though: grab one of the heaviest queries you have from your
slowlog, and execute with identical
On Thu, Nov 18, 2010 at 9:00 AM, andrew.2.mo...@nokia.com wrote:
I think you will probably find that the code you write isn't what MySQL
executes or stores in the cache.
it is indeed not quite what it executes, but as I understand it the QC index
is *exactly* the string you send (well, hashed
Daevid,
snip
My concern is, my gut tells me that the built in mysql cache system is
dumb. And by that I mean, I suspect that mySQL isn't smart enough to
strip out comments from the SQL statement string BEFORE storing it as the
cache hash key (yet I have no facts either way to back it up and
: Ewen Fortune [mailto:ewen.fort...@gmail.com]
Sent: Thursday, November 18, 2010 4:56 AM
To: Daevid Vincent
Cc: mysql
Subject: Re: Does mysql cache strip out /* comments */ first?
Daevid,
snip
My concern is, my gut tells me that the built in mysql
cache system is
dumb. And by that I
mysql cache strip out /* comments */ first?
Daevid,
snip
My concern is, my gut tells me that the built in mysql
cache system is
dumb. And by that I mean, I suspect that mySQL isn't
smart enough to
strip out comments from the SQL statement string BEFORE
storing it as the
cache hash key
Message-
From: Ewen Fortune [mailto:ewen.fort...@gmail.com]
Sent: Thursday, November 18, 2010 4:56 AM
To: Daevid Vincent
Cc: mysql
Subject: Re: Does mysql cache strip out /* comments */ first?
Daevid,
snip
My concern is, my gut tells me that the built in mysql
cache system is
dumb
Like most developers, I have a wrapper that all of my SQL queries go
through in PHP.
We have a dedicated NOC screen that shows the mytop status of each
DEV/TEST/PROD master/slave pair.
http://daevid.com/content/examples/snippets.php (Automatic Monitoring of
remote servers)
We sometimes see
Given that even spacing is important, it's a safe bet that it takes comments
into consideration, too.
Easily tested, though: grab one of the heaviest queries you have from your
slowlog, and execute with identical and different comments.
On Thu, Nov 18, 2010 at 8:31 AM, Daevid Vincent