Re: Sort Performance
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.
Subject
Views
Written By
Posted
6565
November 01, 2004 08:02PM
3039
November 05, 2004 12:46AM
3637
November 09, 2004 03:04PM
3033
November 09, 2004 06:46PM
Re: Sort Performance
2954
November 09, 2004 07:56PM
3298
November 09, 2004 09:05PM
2875
November 05, 2004 01:44AM
2887
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.