`
天使的左手
  • 浏览: 55609 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

Use the appropriate getXXX and setXXX methods for the type

    博客分类:
  • jdbc
阅读更多
For performance reasons, use the recommended getXXX method when retrieving values, and use the recommended setXXX method when setting values for parameters. JDBC is permissive. It lets you use java.sql.ResultSet.getFloat to retrieve an int, java.sql.ResultSet.getObject to retrieve any type, and so on. (java.sql.ResultSet and java.sql.CallableStatement provide getXXX methods, and java .sql.PreparedStatement and java.sql.CallableStatement provide setXXX methods.) This permissiveness is convenient but expensive in terms of performance. The following table shows the recommended getXXX methods for given java.sql (JDBC) types, and their corresponding SQL types.


http://db.apache.org/derby/docs/10.8/tuning/ctunperf98197.html
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics