Sybase:BETWEEN 与“<=”和“>=”运营商
使用 BETWEEN 与比较运算符在性能方面是否存在根本差异?其中一个 wiki 推荐后者:
3:用 >= 和 <= 运算符替换 BETWEEN,因为 BETWEEN 又会转换为提到的运算符。这样我们就可以减少一步。
http://sybaseblog.com /sybasewiki/index.php?title=What_are_the_basics_of_performance_tuning%3F
干杯, 版本
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的。有一个根本的区别。 BETWEEN 需要解释为适当的运算符。这是系统需要采取的额外步骤。
如果您预先使用运算符,则可以节省该步骤......这会加快速度(甚至略有加快)。
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).