0

I don't have a ton of background with MySQL, and I was wondering of anyone can give me some insight into MySQL's query optimizer and the impact on the cost of disk accesses in determining a query plan for query execution. I'm interested in whether any statistics collected on disk access times can play an impact on the query execution plan for a fixed set of queries. In particular, when running the same set of queries on the same database image that resides on different drives with varying performance. (note that from MySQL's point of view, this is the same database; the data directory simply resides on different drives that get switched "under" MySQL without it knowing). Could this change in observed disk performance potentially impact the query plan decisions the query optimizer makes at runtime? I expect that there are many other things more related to SQL itself that the optimizer could do before taking disk accesses into account, but some of you have a lot more experience in dealing with the query optimizer than me.

Thanks for the help!

1 Answer 1

0

From what I've read, MySQL does not collect statistics on disk access times or use them in the query optimizer. A cost unit in MySQL = random read of a data page of 4KB. This is from 2007 so it may have changed.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.