List:General Discussion« Previous MessageNext Message »
From:Myk Melez Date:May 15 2002 11:17pm
Subject:Re: MySQL 3.23.44 not using indexes
View as plain text  
Michael Widenius wrote:

>You can check if the index are ok with CHECK TABLE;  If this says the
>index is ok, they are not corrupted.
>
Apparently this doesn't work in all cases.  "CHECK TABLE" told me 
everything was fine, but dumping the data to a dump file via mysqldump 
and then re-importing it into a new database fixed the problem, so there 
must have been some undetected corruption in the database.

>The above shows that MySQL could use the index but decides to not use
>this because it concludes that a table scan will be faster.
>
>To verify this can you send us the result for the following queries:
>
>SELECT count(*) FROM bugs WHERE bug_status IN ('NEW', 'ASSIGNED', 'REOPENED');
>SELECT count(*) FROM bugs;
>
The results were about 25,000 and 131,000, respectively.

-myk


Thread
MySQL 3.23.44 not using indexesMyk Melez22 Apr
  • Re: MySQL 3.23.44 not using indexesMyk Melez22 Apr
  • Re: MySQL 3.23.44 not using indexesMyk Melez24 Apr
Re: MySQL 3.23.44 not using indexesSteven Roussey23 Apr
  • Re: MySQL 3.23.44 not using indexesJohn Birrell23 Apr
  • Re: MySQL 3.23.44 not using indexesMyk Melez24 Apr
    • RE: MySQL 3.23.44 not using indexesSteven Roussey24 Apr
      • Re: MySQL 3.23.44 not using indexesMyk Melez24 Apr
        • Re: MySQL 3.23.44 not using indexesMichael Widenius15 May
      • Re: MySQL 3.23.44 not using indexesMyk Melez16 May
        • Re: MySQL 3.23.44 not using indexesMichael Widenius17 May
          • Re: MySQL 3.23.44 not using indexesJeremy Zawodny21 May
            • Re: MySQL 3.23.44 not using indexesMichael Widenius21 May
      • Re: MySQL 3.23.44 not using indexesLuciano Barcaro21 May