Yeah, I have a similar box like yours. I copied the first column to a new
table with an index. I ran select distinct and the query took 6 seconds to
execute. This must have to do with the record length, because when I indexed
the origional table's first column the query was 1 minute 30 seconds to
select distinct. Do you think MySQL is scanning the entire index?

Mike are you using ISAM or InnoDb? My tests were with InnoDb.

> I don't know why your Distincts are so slow. When I do a Select Distinct
on 
> 2 columns from my 2.7 million row table, I get back 256 distinct values in

> 5 seconds.  The string columns are around 10 characters each. The column
is 
> indexed. I'm also using 2.4 g machine but wiht 1gbyte ram and 7200RPM 8m 
> cache hard drives (8mb cache drives are faster than the conventional 2mb 
> cache drives).  Maybe it has to do with your record length? Try copying
the 
> column to a temporary table and index the column, then try your Select 
> Distinct on that.
> 
> Mike


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

Reply via email to