From: Dave Cramer <pg@fastcrypt.com>
To: Guido Fiala <guido.fiala@dka-gmbh.de>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: JDBC and processing large numbers of rows
Date: Wed, 12 May 2004 06:56:54 -0400
Message-ID: <1084359414.1536.149.camel@localhost.localdomain> (raw)
In-Reply-To: <200405120837.42865.guido.fiala@dka-gmbh.de>
References: <20040511103520.1ADC6D1B1EE@svr1.postgresql.org>
<03f401c437b6$1bb615b0$3201a8c0@rasta>
<40A17610.7040600@earthlink.net>
<200405120837.42865.guido.fiala@dka-gmbh.de>
Guido,
No, this isn't the case, if you use cursors inside a transaction then
you will be able to have an arbitrarily large cursor open ( of any size
AFAIK )
--dc--
On Wed, 2004-05-12 at 02:37, Guido Fiala wrote:
> Reading all this i'd like to know if all this isn't just a tradeof between
> _where_ the memory is consumed?
>
> If your JDBC-client holds all in memory - it gets an OutOfMem-Exception.
>
> If your backend uses Cursors - it caches the whole resultset and probably
> starts swapping and gets slow (needs the memory of all users).
>
> If you use Limit and Offset the database has to do more to find the
> data-snippet and in worst case (last few records) still needs temporary the
> whole resultset? (not sure here)
>
> Is that just a "choose your poison" ? At least in the first case the memory of
> the Client _gets_ used too and not all load to the backend, on the other side
> - most the the user does not really read all the data at all, so it puts
> unnecessary load on all the hardware.
>
> Really like to know what the best way to go is then...
>
> Guido
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>
>
>
> !DSPAM:40a1c98a223941159885930!
>
>
--
Dave Cramer
519 939 0336
ICQ # 14675561
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: pg@fastcrypt.com, guido.fiala@dka-gmbh.de
Subject: Re: JDBC and processing large numbers of rows
In-Reply-To: <1084359414.1536.149.camel@localhost.localdomain>
References: <20040511103520.1ADC6D1B1EE@svr1.postgresql.org> <03f401c437b6$1bb615b0$3201a8c0@rasta> <40A17610.7040600@earthlink.net> <200405120837.42865.guido.fiala@dka-gmbh.de> <1084359414.1536.149.camel@localhost.localdomain>
* 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