resultset dot next fast for every ten (10)
From: Sulla (sulla_at_bonzomadrid.com)
Date: 07/09/04
- Previous message: DM: "Re: Creating HTML files from Java accessing Oracle"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 9 Jul 2004 10:09:31 -0700
I have a query that executes in 234 ms off a Oralce database and
returns about 100 rows (tomcat/servlets/jdbc). The problem I'm having
is that although the query is fairly fast the while loop using
resultSet.next is really slow but only for every 10. Here's the code:
while (rs.next())
{
String name = sql.getString(1);
System.out.print(stopwatch.getElapsedTime());
}
See, not too complicate but what happens is that for sets of 10 it
goes fast but then for the next 10 it jumps to twice as much time.
Like, the first 10 it'll get in 200 ms then it'll jump to 400 ms for
the next 10. The jump in time always occurs after 10 rows.
I've tried setFetchSize and all that so I'm really confused. So, I
would really appreciate anyone's insight into this issue.
-sulla
- Previous message: DM: "Re: Creating HTML files from Java accessing Oracle"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|