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

Written By
November 01, 2004 08:02PM
November 05, 2004 12:46AM
November 09, 2004 03:04PM
November 09, 2004 06:46PM
Re: Sort Performance
November 09, 2004 07:56PM
November 09, 2004 09:05PM
November 05, 2004 01:44AM
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.