select query not using indexes
Hi All,
One of my tables have more than 10M rows with ID column as Primary key. While doing select query with ID >0 AND ID < 1000000 with group by,it never use indexes (ID as well as other field's indexes) and it's explain query states it's type as 'ALL'. If I reduce the range value, explain shows it's type as RANGE.
How mysql optimizer decide the type as RANGE in one case and ALL if it's range slightly increased?
Also anyone suggest how can I make the optimizer to use Index (I've tried Force index which not useful)?
Regards
Kumaran
Subject
Views
Written By
Posted
select query not using indexes
4319
June 11, 2008 01:05AM
2033
June 11, 2008 04:44AM
2002
June 15, 2008 07:44PM
1932
June 16, 2008 03:44AM
2112
June 16, 2008 06:45PM
2004
June 17, 2008 12:29AM
1931
June 21, 2008 05:56PM
1886
June 23, 2008 11:20PM
1815
June 23, 2008 11:49PM
1807
June 27, 2008 01:26AM
2263
June 27, 2008 11:23PM
1990
June 18, 2008 08:22AM
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.