SQL execution plan horror
Why the HELL does sql server 7 wreck the execution plan compared to regular sql queries? My raw sql works perfectly within a time span of 5 sec whereas the sproc measures more than 2 minutes? I tried defaulting params so the huge table scan as shown by the execution plan uses index seek instead. Also I tried these google tips but that wouldn’t solve my problems either. Any ideas?
Some SQL goodies:
WHERE CustID = 10
CREATE PROC FetchBogusCustomer(
WHERE CustID = @ID