0

Is there a fundamental difference in terms of performance with regards to using BETWEEN versus the comparison operators? One of the wikis recommends the latter:

3: Replace the BETWEEN with >= and <= operators because BETWEEN in turn converted to mentioned oprators. So with we can reduce one step.

http://sybaseblog.com/sybasewiki/index.php?title=What_are_the_basics_of_performance_tuning%3F

Cheers, Ver

Ver Argulla
  • 71
  • 2
  • 9

1 Answers1

1

Yes. There is a fundamental difference. BETWEEN needs to be interpreted to the appropriate operators. That's an added step for the system to take.

If you use the operators up front, you can save that step...which speeds things up (even marginally).

Justin Niessner
  • 242,243
  • 40
  • 408
  • 536
  • It still sounds like a such micro-optimization that it will yield very little real world difference. How much time will be taken up to do this operator replacement compared to executing the actual query? Esp. when the OP links to a Wiki page that only was created under 2 weeks ago and has had only a single, anonymous author. – Seph Nov 03 '11 at 11:17
  • 1
    @Seph - I guess if it's on the Internet, it must be true. – Justin Niessner Nov 03 '11 at 13:01