RE: Select distinct speed on an indexed column

2003-09-15 Thread Nathan Cassano
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

RE: Select distinct speed on an indexed column

2003-09-15 Thread Nathan Cassano
Well, it's an InnoDb database and has some decent memory pools. | innodb_additional_mem_pool_size | 33554432 | innodb_buffer_pool_size | 536870912 -Original Message- From: Joseph Bueno [mailto:[EMAIL PROTECTED] Sent: Monday, September 15, 2003 11:47 AM To: Nathan Cassa

RE: Select distinct speed on an indexed column

2003-09-15 Thread Nathan Cassano
> > From: Haydies [mailto:[EMAIL PROTECTED] > Sent: Monday, September 15, 2003 11:19 AM > To: [EMAIL PROTECTED] > Subject: Re: Select distinct speed on an indexed column > > > Its a compound key, they are always slow. I would imagin you will need to > seriously redesign your database to speed t

RE: Select distinct speed on an indexed column

2003-09-15 Thread Nathan Cassano
mysql> explain select distinct AccountLevelId from PostedZpdi; ++---+---+-+-+--+-+- + | table | type | possible_keys | key | key_len | ref | rows| Extra | ++---+---+-+--

Select distinct speed on an indexed column

2003-09-15 Thread Nathan Cassano
Hey everyone, I have a question about the speed of selecting distinct values on an indexed column. I have a table with a five column primary key and 3,215,540 records. I want to select all of the distinct values of the first column in the primary key. This column only has 549 distinct valu