java – Ref Cursor和Resultset
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了java – Ref Cursor和Resultset,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1115字,纯文字阅读大概需要2分钟。
内容图文
![java – Ref Cursor和Resultset](/upload/InfoBanner/zyjiaocheng/752/197cfb7288294ccb86e2bd9990ba8392.jpg)
我从我的java类调用一个存储过程,它返回一个引用游标,我从游标中提取出结果集并迭代结果集供我使用,现在我的问题是这个
返回的引用游标是否包含其中的所有数据,或者当在结果集的游标上调用getObject时,它还会再次转到数据库服务器?
问候
解决方法:
Fetch Size是您要查找的Oracle参数.如果您的应用程序涉及将数据从服务器传输到客户端,那么这是一个非常重要的设置.
您可以使用此方法设置语句的提取大小.
void setFetchSize(int rows) throws SQLException
http://download.oracle.com/docs/cd/B28359_01/java.111/b31224/resltset.htm#sthref1000
从上面的链接…
By default, when Oracle JDBC executes a query, it receives the result
set 10 rows at a time from the database cursor. This is the default
Oracle row-prefetch value. You can change the number of rows retrieved
with each trip to the database cursor by changing the row-prefetch
value (see “Oracle Row Prefetching” for more information).When the statement object executes a query, the fetch size of the
statement object is passed to the result set object produced by the
query. However, you can also set the fetch size in the result set
object to override the statement fetch size that was passed to it.
内容总结
以上是互联网集市为您收集整理的java – Ref Cursor和Resultset全部内容,希望文章能够帮你解决java – Ref Cursor和Resultset所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。