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
t: Sunday, 18 April 2004 06:50
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Slow Query Question - Need help of Gurus.
Importance: High
Hi All,
I have a huge Database which contains about 500,000 records, (will be
adding about 20-25k records every week)
I need to run group q
Hi All,
I have a huge Database which contains about 500,000 records, (will be
adding about 20-25k records every week)
I need to run group queries and output the same to a web interface.
An example is:
SELECT DISTINCT(`Call Svc Tag ID`),Count(`Call Svc Tag ID`) as counter,
`Journal Create Date`