RE: performance on single column index with few distinct values

2005-05-30 Thread Daniel
: Re: performance on single column index with few distinct values Hi Daniel, Here's some more data which might help. This query does not appear to be using the composite index although there is one on the master_id and ticket_id. The below query takes about 3 seconds. Anyway I think I wil

Re: performance on single column index with few distinct values

2005-05-29 Thread mfatene
Hi, remember that using index can be slower that FTS. if there is a low index column selectivity, it's normal that your query doesn't use it. try using some hints to force index usage (like in oracle) or put your table as an index organiztion table. look also at myisam merge tables. mathias S

Re: performance on single column index with few distinct values

2005-05-29 Thread Terence
Hi Daniel, Here's some more data which might help. This query does not appear to be using the composite index although there is one on the master_id and ticket_id. The below query takes about 3 seconds. Anyway I think I will still move to seperate tables for each master id. Thanks for the repl

Re: performance on single column index with few distinct values

2005-05-29 Thread Jochem van Dieten
On 5/28/05, Terence wrote: > > Master ID is used to distinguish multiple helpdesks. In this table there > are 100k records, but only 10 distinct master_id's. > > ticket_id master_id > 1 1 > 2 1 > 3 2 > 4 2 > 5 3 > ...

RE: performance on single column index with few distinct values

2005-05-28 Thread Daniel
Is there a composite index on (master_id, ticket_id)? Since your queries are selecting on a particular master_id, and ordering by ticket_id, along with the limit I think MySQL would be able to use such an index in an optimization. -Daniel -Original Message- From: Terence [mailto:[EMAIL PR