mysql mysql wrote:
Can anyone explain the following? I encountered the following very strange
behaviour while attempting to optimize a query (more details are provided
later on for those interested):
1) execute query
takes 2 minutes
2) add index
3) execute same query
takes 11 seconds
4) drop index
5) execute same query
takes 0.2 seconds and uses a different method of returning results from the
original query in 1)
6) restart mysql
7) execute query
takes 2 minutes
Because your o/s does caching as well and probably has the whole .MYD
(data) file in memory since there hasn't been a reason to swap it out.
Try doing a big query in the middle (select * from other_big_table order
by rand() limit 10000) and/or restarting mysql between #4 and #5.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]