Im trying to set fetchSize on statment, while executing query so that can improve performance of some long running query. My DB2 jdbc driver version is 3.64 (DB2 version 9.2). But im not seeing any difference in total execution time even with a higher fetch size. By default if I try to invoke statement.getFetchSize()
, before executing query its returning 0. This link was mentioning that DB2 default fetch size is 32. Is there any different configuration (along with opening connection, like setting up some specific properties etc.) I need to setup to enable varying fetch size with DB2? Or is it that DB2 jdbc driver does not support varying fetch size?
我试图在statment上设置fetchSize,同时执行查询,这样可以提高一些长时间运行查询的性能。我的DB2 jdbc驱动程序版本是3.64(DB2版本9.2)。但即使使用更高的提取大小,我也看不到总执行时间的任何差异。默认情况下,如果我尝试调用statement.getFetchSize(),则在执行查询之前返回0.此链接提到DB2默认提取大小为32.是否有任何不同的配置(以及打开连接,如设置某些特定属性等。)我需要设置为使用DB2启用不同的提取大小?或者是DB2 jdbc驱动程序不支持不同的提取大小?
1 个解决方案
#1
3
I believe that you can control the fetch size on DB2 , but first you need to set enableRowsetSupport
for your jdbc driver. See more here.
我相信您可以控制DB2上的提取大小,但首先需要为您的jdbc驱动程序设置enableRowsetSupport。在这里查看更多。
#1
3
I believe that you can control the fetch size on DB2 , but first you need to set enableRowsetSupport
for your jdbc driver. See more here.
我相信您可以控制DB2上的提取大小,但首先需要为您的jdbc驱动程序设置enableRowsetSupport。在这里查看更多。