MySQL Forums
Forum List  »  Optimizer & Parser

Unexpected benchmark results due to query optimizer?
Posted by: Kees van den Broek
Date: September 01, 2005 07:38AM

Hi,

I've done a bit of benchmarking on MySQL.
The benchmark is performed under Linux on the latest stable MySQL 4.x compiled from source, using the default storage engine.

During the whole benchmark process, MySQL performs as expected, except in one testcase, where I run the following query:
SELECT * FROM assets WHERE track=999999
track is an indexed field and value 999999 doesn't exist.

When the query is ran for the first time (cache is empty), a little dip is seen when the asset table is filled with 400 records. See:
http://kvdb.net/bench/cold_nolimit/results_4_xylog.png

When the query is ran for the second time, the dip becomes more noticable, see:
http://kvdb.net/bench/warm_nolimit/results_4_xylog.png
Even when the query is ran 5 times in a row, the results are similar (standard deviation is also shown in the graph). It's repeatable.

Why is MySQL behaving like this? Is the query optimizer changing strategy?
Is there a way to find out?

Thank you,
Kees

Options: ReplyQuote


Subject
Views
Written By
Posted
Unexpected benchmark results due to query optimizer?
3313
September 01, 2005 07:38AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.