MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:mfatene Date:June 3 2005 7:20pm
Subject:Re: max_seeks_for_key in InnoDB
View as plain text  
you can use a hint to force specific index usage :

But this is not a good idea since data change and index selectivity can become

Also, if the index scan + the table scan is bigger than a full table scan, even
you will prefer FTS.

So, according to selectivity, usage of an index can be a very bad idea. Thsi
depends on how many rows your query retreives among the count(*) of the table.


Selon Bob O'Neill <oneill.bob@stripped>:

> I am having problems with MySQL inconsistently choosing the wrong index, or
> no index at all, for queries on tables with 20 million rows.  Would it be a
> good idea for me to set max_seeks_for_key to 1 (or something less than 4
> billion), in order to force MySQL to use an index?  We are using InnoDB.
> Since InnoDB has clustered indexes, is there ever a good reason for MySQL to
> prefer a table scan?
> Thanks,
> -Bob

max_seeks_for_key in InnoDBBob O'Neill3 Jun
  • Re: max_seeks_for_key in InnoDBmfatene3 Jun
  • Re: max_seeks_for_key in InnoDBBob O'Neill7 Jun