MySQL Forums
Forum List  »  Performance

Re: Sort Performance
Posted by: Peter Zaitsev
Date: November 05, 2004 12:46AM

Hi,

Could you pleas provide EXPLAIN for both queries ?
SHOW CREATE TABLE for table in question would also be helpful.

Sorting 5 rows should not take that much so there is something else out where.

One of the possibilities is - MySQL would do scan in index order to resolve the query
instead of doing filesort - this is good idea if LIKE clause matches a lot of rows but is bad
if it matches just few rows. As you have LIKE "%const%" MySQL is not able to estimate how many rows will match. In such case IGNORE INDEX (security) hint should help this query.

Options: ReplyQuote


Subject
Views
Written By
Posted
6316
November 01, 2004 08:02PM
Re: Sort Performance
2924
November 05, 2004 12:46AM
3513
November 09, 2004 03:04PM
2919
November 09, 2004 06:46PM
2844
November 09, 2004 07:56PM
3159
November 09, 2004 09:05PM
2767
November 05, 2004 01:44AM
2764
November 10, 2004 07:12PM


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.