Iterating a ResultSet using the JDBC for Oracle takes a lot of time about 16s?

后端 未结 2 718
抹茶落季
抹茶落季 2020-12-03 07:39
while( result_set.next() )
{
  ...
}

I have use System.nanoTime() and calculated the time, for each iteration the time taken is in mil

2条回答
  •  难免孤独
    2020-12-03 08:06

    Try to change ResultSet fetch size. By default, Oracle JDBC driver receives the result set only 10 rows at a time from the database cursor. It may not significantly improve performance but there arent many other options to make driver work faster.

提交回复
热议问题