[PERFORM] Slow-ish Query Needs Some Love

2010-02-02 Thread Matt White
I have a relatively straightforward query that by itself isn't that slow, but we have to run it up to 40 times on one webpage load, so it needs to run much faster than it does. Here it is: SELECT COUNT(*) FROM users, user_groups WHERE users.user_group_id = user_groups.id AND NOT users.deleted AND

Re: [PERFORM] Slow-ish Query Needs Some Love

2010-02-02 Thread Matt White
On Feb 2, 6:06 am, Edgardo Portal wrote: > On 2010-02-02, Matt White wrote: > > > I have a relatively straightforward query that by itself isn't that > > slow, but we have to run it up to 40 times on one webpage load, so it > > needs to run much faster than it d