From: Bill Chandler <billybobc1210@yahoo.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: Cursors performance (was: Re: [PERFORM] Terrible performance after deleting/recreating indexes)
Date: Fri, 9 Jul 2004 14:41:26 -0700 (PDT)
Message-ID: <20040709214126.99561.qmail@web51410.mail.yahoo.com> (raw)
In-Reply-To: <20040709212024.15155.qmail@web51406.mail.yahoo.com>
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 <billybobc1210@yahoo.com> 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 <billybobc1210@yahoo.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: billybobc1210@yahoo.com
Subject: Re: Cursors performance (was: Re: [PERFORM] Terrible performance after deleting/recreating indexes)
In-Reply-To: <20040709214126.99561.qmail@web51410.mail.yahoo.com>
References: <20040709212024.15155.qmail@web51406.mail.yahoo.com> <20040709214126.99561.qmail@web51410.mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox