我试图想出一个办法来优化下面的SQL查询:优化where子句SQL
select * from SOME_TABLE
where (col1 = 123 and col2 = 'abc')
or (col1 = 234 and col2 = 'cdf')
or (col1 = 755 and col2 = 'cvd') ---> I have around 2000 'OR' statements in a single query.
目前此查询需要很长的时间来执行,所以反正是有让这个查询运行得更快?
发布解释计划。没有它,这是猜测。 – 2013-05-14 02:11:37