performance - resultset.next() with 1 row taking too much time -



performance - resultset.next() with 1 row taking too much time -

i have problem performance while querying sybase java program. have placed multiple logs debug , found query taking expected amount of time , , phone call resultset.next() seems taking equal amount of time!

query "select count(*) from" , returns 1 row. , java code like.

resultset = statement.executequery(); logger.debug("after fetching resultset"); while(resultset.next(){ numberofaccounts = resultset.getint(1); } logger.debug("after looping resultset::" +numberofaccounts)

any ideas on why taking on average 200 milliseconds between above 2 logs? confirmed statement.executequery() taking aroud 150 ms.

i checked google , seemed talking increasing statement fetchsize(). in case there 1 row. i'm printing query before executing pretty sure returning 1 row only.

performance jdbc

Comments

Popular posts from this blog

java Multi query from Mysql using netbeans -

c# - DotNetZip fails with "stream does not support seek operations" -

c++ - StartServiceCtrlDispatcher don't can access 1063 error -