Home Forums SQL Server 2005 T-SQL (SS2K5) query optimizing RE: query optimizing
Lynn Pettis
SSC Guru
Points: 442467
More actions
October 7, 2009 at 12:11 pm
#1062980
Why don't you just delete this part from the second query, it is always true:
and (avg_cost <> 0 OR avg_cost = 0)
and (in_stock <> 0 OR in_stock = 0)