Peter,
I am fairly certain, it's not slow because of the event_id look up but
because of the GROUP BY
Suhail
On Sun, Aug 16, 2009 at 2:56 PM, Peter Brawley
wrote:
> Suhail,
>
> Having problems with this query, any ideas on how to optimize this further?
>
> Did you try writing the event_ids in
Suhail,
Having problems with this query, any ideas on how to optimize this further?
Did you try writing the event_ids in your IN() list to a temp table &
joining to that table?
PB
-
Suhail Doshi wrote:
Having problems with this query, any ideas on how to optimize this further?
mysql> e
Having problems with this query, any ideas on how to optimize this further?
mysql> explain SELECT cache_property_str.name as name,
SUM(cache_property_str.tally) as count
FROM cache_property_str
WHERE
cache_property_str.status = 1 AND
---+
+--+-+
Thanks so much!
-Matt
-Original Message-----
From: ÃÃ ÃÂÃ [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 14, 2004 3:46 AM
To: Matt Eaton
Subject: Re: GROUP BY optimization headscratcher
ÐÐÑÐÐÑÑÐÑÐÑÐ Matt
ME> CREATE TABLE `T1`
Message-
From: ÃÃ ÃÃÃÃÃÂÃ [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 14, 2004 3:46 AM
To: Matt Eaton
Subject: Re: GROUP BY optimization headscratcher
ÐÐÑÐÐÑÑÐÑÐÑÐ Matt
ME> CREATE TABLE `T1` (
ME> `guid` smallint(5) unsigned NOT NULL default '0',
ME> `qid` small
Здравствуйте Matt
ME> CREATE TABLE `T1` (
ME> `guid` smallint(5) unsigned NOT NULL default '0',
ME> `qid` smallint(5) unsigned NOT NULL default '0',
ME> `a` tinyint(2) NOT NULL default '-2',
ME> `d` tinyint(2) NOT NULL default '-2',
ME> KEY `IX_FW_qid` (`qid`),
ME> KEY `IX_FW_d` (`d`)
Hi all. Got a weird one. Mysql 4.0.20. Let's say for the sake of
argument that I've got two tables, T1 & T2. Here are the two create
statements:
CREATE TABLE `T1` (
`guid` smallint(5) unsigned NOT NULL default '0',
`qid` smallint(5) unsigned NOT NULL default '0',
`a` tinyint(2) NOT NULL