RE: Does mysql cache strip out /* comments */ first?

2010-11-18 Thread andrew.2.moore
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

Re: Does mysql cache strip out /* comments */ first?

2010-11-18 Thread Johan De Meersman
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

Re: Does mysql cache strip out /* comments */ first?

2010-11-18 Thread Ewen Fortune
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

RE: Does mysql cache strip out /* comments */ first?

2010-11-18 Thread Daevid Vincent
: 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

Re: Does mysql cache strip out /* comments */ first?

2010-11-18 Thread Ewen Fortune
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

Re: Does mysql cache strip out /* comments */ first?

2010-11-18 Thread Waynn Lue
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

Re: Does mysql cache strip out /* comments */ first?

2010-11-17 Thread Johan De Meersman
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