Re: Slow query, unknown why

2010-04-26 Thread mos
Yves, What happens if you replace the "tk.UserId IN (22943, 10899)" with just one argument " tk.UserId = 22943". Does it run much faster? If so, the In() statement may not be using an index. You could try using a Union instead of In() to see if that is any faster. I have also found tha

Re: Slow query, unknown why

2010-04-25 Thread Rob Wultsch
On Sun, Apr 25, 2010 at 9:12 AM, Yves Goergen wrote: > Hi, > > I'm still stuck with my SQL query that is slow but really shouldn't be. > > The problem is that I cannot create a simple test case. I could only > provide you a whole lot of pages of PHP code and SQL queries to explain > the problem. >

Slow query, unknown why

2010-04-25 Thread Yves Goergen
Hi, I'm still stuck with my SQL query that is slow but really shouldn't be. The problem is that I cannot create a simple test case. I could only provide you a whole lot of pages of PHP code and SQL queries to explain the problem. I have now three versions of my query. One with a sub select, whic