[prev in list] [next in list] [prev in thread] [next in thread]
List: mysql-bugs
Subject: Re: Optimization Suggestion
From: "Holyfoot" <holyfoot () mysql ! com>
Date: 2002-07-31 8:22:15
[Download RAW message or body]
> 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.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread12253@lists.mysql.com
To unsubscribe, e-mail <bugs-unsubscribe@lists.mysql.com>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic