X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1E995D1B1CB for ; Fri, 9 Jul 2004 18:41:43 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 13938-10 for ; Fri, 9 Jul 2004 21:41:28 +0000 (GMT) Received: from web51410.mail.yahoo.com (web51410.mail.yahoo.com [206.190.38.189]) by svr1.postgresql.org (Postfix) with SMTP id 9055CD1B195 for ; Fri, 9 Jul 2004 18:41:24 -0300 (ADT) Message-ID: <20040709214126.99561.qmail@web51410.mail.yahoo.com> Received: from [192.88.67.254] by web51410.mail.yahoo.com via HTTP; Fri, 09 Jul 2004 14:41:26 PDT Date: Fri, 9 Jul 2004 14:41:26 -0700 (PDT) From: Bill Chandler Subject: Re: Cursors performance (was: Re: [PERFORM] Terrible performance after deleting/recreating indexes) To: pgsql-jdbc@postgresql.org In-Reply-To: <20040709212024.15155.qmail@web51406.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.9 tagged_above=0.0 required=5.0 tests=FROM_ENDS_IN_NUMS, MAILTO_TO_SPAM_ADDR X-Spam-Level: * X-Archive-Number: 200407/74 X-Sequence-Number: 10458 Using psql I get the following results: DECLARE: 37.556 ms 1st FETCH: 553210.220 ms 2nd FETCH: 420.555 ms 3rd FETCH: 433.639 ms 4th FETCH: 421.009 ms 5th FETCH: 436.240 ms So using psql the 1st fetch is much slower but all subsequent ones are almost instantaneous. Whereas using JDBC each fetch takes about 5.5 minutes. Another curious thing (at least to me): if I turn off cursors altogether in my JDBC app and just get the entire result set (about 101000 rows) the whole thing returns in 68 seconds. This seems counter-intuitive to me. Why would it take 68 seconds to return everything but 305 minutes to just return the 1st 5000? thanks, Bill --- Bill Chandler wrote: > I should have said the results below are from > running the query via JDBC. I'll get some > results from psql and post those as well. > > --- Bill Chandler wrote: > > Here are the result from "log_duration = true" > > > > DECLARE/1st FETCH: 325014.881 ms > > 2nd FETCH: 324055.281 ms > > __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail