1 . Select * from table1 where table1.A in (1,2,3,4,5,6)
2. Select * from table1 where table1.A in (1,2,3) UNION ALL Select * from table1 where table1.A in (4,5,6)
3. Select A.* From (Select * from table1 where table1.A in (1,2,3) UNION ALL Select * from table1 where table1.A in (4,5,6)) A
4. Select A.* From (Select * from table1 where table1.A in (1,2,3) UNION ALL Select * from table1 where table1.A in (1,2,3 ,4,5,6)) A WHERE A.A in (1,2,3)
This is the very simple example of queries i always use.
I need to know what different between these 4 in term of performance THANKS.