It's just occurred to me that the IN clause is not a constant.
This probably throws out any chance of using an index for group by?
Cheers
-Original Message-
From: Andrew Armstrong [mailto:[EMAIL PROTECTED]
Sent: Sunday, 29 July 2007 1:07 PM
To: mysql@lists.mysql.com
Subject: Using index
e.
-Original Message-
From: Terry Mehlman [mailto:[EMAIL PROTECTED]
Sent: Sunday, 29 July 2007 1:18 PM
To: Andrew Armstrong
Subject: Re: Using index for group-by: Not working?
just a shot in the dark, but i would suggest two changes to your query.
1) put the count (distinct c5) first
On Thu, Aug 23, 2001 at 07:54:38PM +0200, Osus wrote:
[snip]
> when I run this query
> mysql> explain select Nick from mytable where Inicial='P' AND Sexo=1 and
> ok=1;
> .
> +--+--+---+-+---
> --+---+--++
> | table