BETWEEN clause versus <= AND >=

前端 未结 8 1321
無奈伤痛
無奈伤痛 2020-12-14 05:54

Is there a performance difference between using a BETWEEN clause or using <= AND >= comparisons?

i.e. these two queries:

SELECT *  
  FROM table           


        
8条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-14 06:35

    When in doubt (for Oracle anyway), run an explain plan and you'll see what the optimizer wants to do. This would apply to most questions about "is there a performance difference between ...". Of course there are a lot of other tools also, but explain plan is a good start.

提交回复
热议问题