resultset dot next fast for every ten (10)

From: Sulla (sulla_at_bonzomadrid.com)
Date: 07/09/04

  • Next message: Mark Matthews: "Re: jdbcrealm MYSQL autoReconnect problem"
    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


  • Next message: Mark Matthews: "Re: jdbcrealm MYSQL autoReconnect problem"

    Relevant Pages

    • Re: Efficient Way to Jump to Distant Record
      ... or you can connect to a query you've written that gets data from ... If you want to "jump" to a record, consider creating an unbound combo box in ... the first "Smith" alphabetically. ... The user can then double click the exact Smith and a form would pop up ...
      (microsoft.public.access.formscoding)
    • RE: Edit Current Record Only
      ... "I am using the acLast command to jump to the last record on each form." ... It will ask you if you wish to create a query based on the table. ... The user populates one form at a time ...
      (microsoft.public.access.formscoding)
    • custom paging in datagrid
      ... The online example just ... inserts sample data each time which doesn't really illustrate how you ... It says that your query should only return enough data to fill one ... Can you jump into this kind of dataset using ...
      (microsoft.public.dotnet.languages.vb)
    • Re: Stress and BG
      ... And I report (well, maybe a more relevant word is "complain" or ... Of course I don't have you killfiled Tim; ... I must admit I took the query as a type 2 query because ... I've never had my BG's jump 3mmo/lor more without ...
      (alt.support.diabetes)