Ben Dinnerville wrote:
Note that sorting by the count can't use an index, so it will be slower
than if you had ordered by `Call Svc Tag ID`.
This is something that will need testing. Ordering on a varchar(255) column
(call svc tag ID) is going to be a lot more inefficient than ordering on a
num
Ben,
- Original Message -
From: "Ben Dinnerville"
Sent: Monday, April 19, 2004 1:49 AM
Subject: RE: Slow Query Question - Need help of Gurus.
>>Then try again:
>>
>> SELECT `Call Svc Tag ID`,
>> Count(*) as counter,
>>
>>The indexes were listed at the bottom of the original post.
Woops, didn’t see that far down, should have scrolled a little further :)
>>What is needed, I expect, is a
>>multi-column index on those 2 columns:
>>
>> ALTER TABLE 31909_859552
>> ADD INDEX Tag_Created (`Call Svc Tag ID`, `Jou
Ben Dinnerville wrote:
You have a redundant clause in your query - the distinct is not needed when
you are doing a group by on the same field ('Call Svr Tag ID') - not sure
how the optimiser in MySQL will handle this. In some RDBMS's the duplicate
clause will be optimised down to 1 clause, so you
You have a redundant clause in your query - the distinct is not needed when
you are doing a group by on the same field ('Call Svr Tag ID') - not sure
how the optimiser in MySQL will handle this. In some RDBMS's the duplicate
clause will be optimised down to 1 clause, so you wont cop a performance
h