为什么 JTDS 比 Microsoft JDBC 驱动程序更快?
我们正在针对在 JBoss 上运行的 Java EE 应用程序对 JTDS 和 Microsoft SQL Server 进行比较,我们发现 JTDS 的速度提高了 30% 到 50%,在高并发场景中对应用程序进行了基准测试并保持完全相同的硬件/软件,但是仅更改数据源配置中的驱动程序。
虽然我们已经看到了许多对 JTDS 有利的选择,因此我们正在考虑采用它,但我仍然很好奇:
- 为什么JTDS 驱动程序如此快?
- 为什么 Microsoft 从未将其驱动程序更新为像 JTDS 一样快?
使用最新的 JDBC 3.0 版本和最新的 JTDS 版本以及使用在具有专用 SAN 的 16 核安装上运行的 SQL Server 2008 进行比较。
we're comparing JTDS and Microsoft SQL Server for a Java EE application running on JBoss and we're finding that JTDS is from 30% to 50% faster, benchmarking the application in a high concurrence scenario and keeping exactly the same HW/SW but changing only the driver in the datasource configuration.
While we've seen a lot of favorable options towards JTDS and so we're thinking to go for it I'm still curious:
- Why is the JTDS driver so much faster?
- Why Microsoft never updated its driver to be fast as JTDS?
Comparison was made using the latest JDBC 3.0 version and the latest JTDS version and using a SQL Server 2008 running on a 16 core installation with dedicated SAN.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我做过类似的性能比较,得到了类似的结果。
造成性能差异的潜在原因有很多。其中一些在驱动程序生成的 T-SQL 中可见,您可以使用 SQL Profiler 查看它们。其他方面则更加微妙,例如连接管理以及底层协议 (TDS) 的实现方式。
我不能肯定为什么 MS 从未更新过他们的驱动程序,但我怀疑部分原因是 Java 被认为是一个有竞争力的产品/平台。
I've done similar performance comparisons, with similar results.
There are many potential reasons for performance differences. Some of them are visible in the T-SQL generated by the driver, which you can see with SQL Profiler. Other aspects are more subtle, such as connection management and how the underlying protocol (TDS) is implemented.
I can't say for sure why MS has never updated their driver, but I suspect that part of it is because Java is considered to be a competitive product/platform.