Rob Wultsch wrote:
> On 10/26/07, Baron Schwartz <baron@stripped> wrote:
>> Aaron Fischer wrote:
>>> Thanks Peter and Baron, these both worked well.
>>> The "left join on" took .1919 seconds and the "left outer join as" took
>>> .1780 seconds.
>> They are synonymous in MySQL. The only difference is 6 extra characters
>> in the query text. The difference was probably due to caches.
>> Out of curiosity which cache are you referring to?
> 3.23 does not have query cache. Are you referring to key, table, or some
> other cache? (or all of the above?)
> I would think that the key and table cache would not be effected by the
> addition of an optional word that does not affect how the query is
> Where is my understanding incorrect or incomplete?
I'm referring to the operating system's caches. Really such a small
difference isn't significant anyway -- who knows what was happening on
the server at that time. But running a query, then running it again,
will often be at least a tiny bit faster the second time because the
data has been read from disk into the OS caches.
The query cache (in newer versions) wouldn't help because the queries
aren't byte-for-byte identical.
If one did a proper benchmark on these two queries and found any
difference at all aside from "six extra bytes", I'd be very surprised.