It's not the order in which you execute the queries, it's how many
time. Execute the first one 5 times, then the second one 5 times, then
the third one 5 times. See if the times are different between each of
the 5 runs for each query.
Also, you could try reordering your query. Perhaps something
stIndex | 5 |
artists.artis
tId |27 | Using where |
| cds | eq_ref | PRIMARY | PRIMARY | 4 |
tracks.cdId
| 1 | Using where |
-Original Message-
From: Brent Baisley [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 04, 2003 16:38
To: Uros Ko
You need to take cache into consideration when doing your testing. Both
MySQL cache and the OS cache. That means rebooting between each query
that you run to clear the database and OS cache.
-or-
Run each query 3 or 4 times (or 5, or even 10) consecutively and either
take the average or the fast
-
From: Tobias Asplund [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 04, 2003 11:50
To: Uros Kotnik
Cc: [EMAIL PROTECTED]
Subject: Re: Once again, three queries, same result, huge speed
difference
On Thu, 4 Dec 2003, Uros Kotnik wrote:
> I posted this few days ago, but with no answer, a
On Thu, 4 Dec 2003, Uros Kotnik wrote:
> I posted this few days ago, but with no answer, also posted it to
> benchmark list..
>
> Executing this SQL, takes ~5 sec.
>
> select artists.name , cds.title , tracks.title from artists, tracks,
> cds
> where artists.artistid = tracks.artistid and cds.cdi