MySQL Forums
Forum List  »  Optimizer & Parser

Re: Many Table Scanned instead of One table.
Posted by: Marek Podmaka
Date: March 12, 2008 09:37AM

Read the mysql manual about optimizer - or these excelent articles: http://hackmysql.com/documents

It does not matter which table is read first - result will be the same. Mysql tries to choose the order based on its estimation of how optimal it would be. It may be faster to get 1000 rows from index than to table-scan 50 rows. If you use indexes and think the decision mysql has made is not correct, try to OPTIMIZE TABLE, which would update the index "statistics" - the metrics on which the calculation are based (it can become outdated when there are many changes to the table).

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Many Table Scanned instead of One table.
2206
March 12, 2008 09:37AM


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.