MySQL Forums
Forum List  »  Performance

Re: Sort Performance
Posted by: KimSeong Loh
Date: November 09, 2004 07:56PM

Without the ORDER BY,
the full table is scanned is "sequential" manner.

With the ORDER BY,
the full index is scanned in a sorted order, and the selected rows are retrieved selectively one by one "randomly" based on the sorted order. No actual sorting is required.
This index `security` on a 255 varchar can be as large as 130 MB in size with 500,000 records, based on your table structure, this is close to one third of your total table size.

Anyway, I still do not have an answer for the great difference in the time taken. Maybe it is time to check your server buffer size, maybe "innodb_buffer_pool_size", not sure if this is the correct one or not, need to check.

You should do an EXPLAIN on the IGNORE INDEX as well, because sometimes MySQL do not follow that instruction strictly. Maybe the index is still used.

Options: ReplyQuote


Subject
Views
Written By
Posted
6329
November 01, 2004 08:02PM
2931
November 05, 2004 12:46AM
3525
November 09, 2004 03:04PM
2926
November 09, 2004 06:46PM
Re: Sort Performance
2851
November 09, 2004 07:56PM
3168
November 09, 2004 09:05PM
2774
November 05, 2004 01:44AM
2770
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.