List:General Discussion« Previous MessageNext Message »
From:Anupam Karmarkar Date:November 16 2012 8:36am
Subject:Query Optimization
View as plain text  
Hi All,

Consider a scenario, I have table XYZ which contains value follow
BLUE
RED
GREEN
NULL

following are queries we can use get this values

1. SELECT * FROM XYX WHERE VAL IN ('BLUE','RED','GREEN');
2. SELECT * FROM XYZ WHERE VAL IS NOT NULL
3. SELECT * FROM XYZ WHERE VAL = 'BLUE' OR VAL='RED' OR VAL='GREEN'
and more

So which one is good in terms of optimization. I guess, 1 and 3 are similar in term of
formation.


--Anupam  

Thread
Query OptimizationAnupam Karmarkar16 Nov
  • Re: Query OptimizationBenaya Paul16 Nov
  • RE: Query OptimizationRick James16 Nov