From: Anupam Karmarkar Date: November 16 2012 8:36am Subject: Query Optimization List-Archive: http://lists.mysql.com/mysql/228641 Message-Id: <1353054982.17810.YahooMailNeo@web194604.mail.sg3.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="1512302668-251963392-1353054982=:17810" --1512302668-251963392-1353054982=:17810 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi All,=0A=0AConsider a scenario, I have table XYZ which contains value fol= low=0ABLUE=0ARED=0AGREEN=0ANULL=0A=0Afollowing are queries we can use get t= his values=0A=0A1. SELECT * FROM XYX WHERE VAL IN ('BLUE','RED','GREEN');= =0A2. SELECT * FROM XYZ WHERE VAL IS NOT NULL=0A3. SELECT * FROM XYZ WHERE = VAL =3D 'BLUE' OR VAL=3D'RED' OR VAL=3D'GREEN'=0Aand more=0A=0ASo which one= is good in terms of optimization. I guess, 1 and 3 are similar in term of = formation.=0A=0A=0A--Anupam=A0 =0A --1512302668-251963392-1353054982=:17810--