Leonardo,
I think a new compound key on email_id and activity in the activities table
may help.
I'm not sure if this will help or not, Its hard to test w/o having a large
data set to test against.
On Thu, Jul 7, 2011 at 9:07 PM, Leonardo Borges leonardoborges...@gmail.com
wrote:
Sure can:
Hi Johnny,
I just gave that a try but it didn't help as I suspected.
I still believe the problem is in mysql not being able to handle set
subtractions. Therefore, it has to perform the work harder to return the
rows that represent a no match with NULL values in place so they can then
be filtered
What did the explain output look like after the new index?
On Fri, Jul 8, 2011 at 8:53 AM, Leonardo Borges leonardoborges...@gmail.com
wrote:
Hi Johnny,
I just gave that a try but it didn't help as I suspected.
I still believe the problem is in mysql not being able to handle set
Same as before, but with the new index listed in the possible keys:
++-+---+---+--+--+-+++-+
| id | select_type | table | type | possible_keys
| key | key_len | ref
Leonardo,
What happens when you use force index(user_id) ?
See http://dev.mysql.com/doc/refman/5.1/en/index-hints.html
Mike
At 09:19 AM 7/8/2011, you wrote:
Same as before, but with the new index listed in the possible keys: