blists said: > Okay, my SQL Server is at 100% and this query is taking like 40 > seconds or something ridiculous like that and its not even full > size yet. I need some help! > > Without explaining how this entire thing works
You will need to EXPLAIN it for us :) Can you show us the execution plan for your query? > Select * > from users > Where > ( > (badminton = 1 ) > ) > and > ( > userid in ( > select o.userid > from orders o join orderdetails od on (o.orderid = > od.orderid) where realdate BETWEEN '2005-04-01' AND > '2006-04-30' > ) > ) > > This query takes forever to execute, and the user can still add many > more statements to this! Which SQL server are you using and is it capable of using multiple indexes in one scan? Jochem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237870 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

