6 messages in com.mysql.lists.bugsRe: Optimization Suggestion
FromSent OnAttachments
Кулаков Сергей30 Jul 2002 23:29 
Holyfoot31 Jul 2002 01:21 
Jared Richardson31 Jul 2002 05:05 
Jared Richardson01 Aug 2002 05:11 
Sinisa Milivojevic01 Aug 2002 07:33 
Michael Widenius06 Aug 2002 04:38 
Subject:Re: Optimization Suggestion
From:Holyfoot (holy@mysql.com)
Date:07/31/2002 01:21:53 AM
List:com.mysql.lists.bugs

the index is only used when the number of scanned rows is less than some value (the value depends on the total number of rows in the table), and when it is greater than the value, the index is not used. I guess this is done consciously, but I don't get why.

Row-by-row table scanning works much faster than reading through the index. If you have more than 30% of table records in your selection reading using index is slower.

explain select * from Words Order By Id Limit 16555

outputs that now the index is used (16555=the number of rows in the

table-1) I think it's natural - usind index you don't have to sort selection.

Regards. A.