MySQL Forums :: Performance :: select query not using indexes


Advanced Search

select query not using indexes
Posted by: senthil kumaran ()
Date: June 11, 2008 01:05AM

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

Options: ReplyQuote


Subject Views Written By Posted
select query not using indexes 3141 senthil kumaran 06/11/2008 01:05AM
Re: select query not using indexes 1725 Alon Lubin 06/11/2008 04:44AM
Re: select query not using indexes 1669 Rick James 06/15/2008 07:44PM
Re: select query not using indexes 1602 senthil kumaran 06/16/2008 03:44AM
Re: select query not using indexes 1682 Rick James 06/16/2008 06:45PM
Re: select query not using indexes 1588 senthil kumaran 06/17/2008 12:29AM
Re: select query not using indexes 1539 Rick James 06/21/2008 05:56PM
Re: select query not using indexes 1523 senthil kumaran 06/23/2008 11:20PM
Re: select query not using indexes 1519 Rick James 06/23/2008 11:49PM
Re: select query not using indexes 1478 senthil kumaran 06/27/2008 01:26AM
Re: select query not using indexes 1801 Rick James 06/27/2008 11:23PM
Re: select query not using indexes 1603 Alon Lubin 06/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.