Noamn wrote:

Judging by some of the comments posed on this list, I wonder whether the
following statements are true:
1. There is no point having an index on a field if that field can only have
a few values

Not for query speed reasons. There may be other reasons (uniqueness for instance), but for speed it only makes sense if the DB can use multiple indexes on one table simultaneously or can use the field as a predicate for inclusion in another index (partial indexes: http://citeseer.nj.nec.com/cachedpage/67014/1)



2. A table should have at least ten entries, in order to prevent all the
table being scanned to find a match in a query.

Where does the number 10 come from?


And on a higher level: why would you even want to prevent a tablescan on a small table? I sometimes even remove indexes on small tables because a tablescan is the only sensible approach and it removes options to consider for the planner.

Jochem

--
I don't get it
immigrants don't work
and steal our jobs
    - Loesje


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to