Re: slow queries and blob fields
Posted by:
Jay Pipes
Date: July 06, 2005 11:59AM
Erin,
Remove the index on active if it only has a cardinality of 2. That's a waste of space, since the index has very low selectivity. It would be better to see the news_date index used, and the Using WHERE be referring to the active column, instead of vice versa.
However, MySQL will choose to do a table scan versus an index range operation if the number of records in news meeting the criteria news_date <= 1120337337 is greater than a certain (say 35%) of the total rows in the table.
You're going to get the filesort appear in either case: it refers to the ORDER BY clause. As long as it doesn't say "Using temporary; using filesort", you're fine.
Jay Pipes
Community Relations Manager, North America, MySQL Inc.
Got Cluster?
http://www.mysql.com/cluster
Personal:
http://jpipes.com
Subject
Views
Written By
Posted
3002
July 06, 2005 11:09AM
Re: slow queries and blob fields
1918
July 06, 2005 11:59AM
1811
July 06, 2005 06:05PM
2112
July 07, 2005 03:32PM
1799
July 07, 2005 05:58PM
1926
July 12, 2005 10:19AM
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.