Actually, 49% of my cost of the query is a clustered index scan. On 6/30/05, Jochem van Dieten <[EMAIL PROTECTED]> wrote: > Marlon Moyer wrote: > > I am fed up with SQL Server! We've got a claims search section on our > > internal website and the search allows you to filter on 30 different > > columns. Currently, I'm trying to track down a condition where a > > query is fed 4 filter columns, so 4 (blah = blah) in the where clause. > > Currently the query runs 10 minutes, but if you change one of the > > fields from (reserves > 0) to (reserves = 0), it runs in under 30 > > seconds. > > And let me take a wild guess: the number of rows that has (reserves > 0) is > higher then the number of rows that has (reserves = 0) so the query is > switching from an index scan to a table scan. > > Jochem > >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:5:162520 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/5 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:5 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
