Re: SELECT very slow - Mailing list pgsql-sql

From Thomas Kellerer
Subject Re: SELECT very slow
Date
Msg-id d8s30h$r12$1@sea.gmane.org
Whole thread Raw
In response to Re: SELECT very slow  (Scott Marlowe <smarlowe@g2switchworks.com>)
Responses Re: SELECT very slow
List pgsql-sql
On 16.06.2005 16:00 Scott Marlowe wrote:

> There's got to be more happening than what this is showing us.  A
> select, and looping through it, should involve no writes, and therefore
> no real performance difference from autocommit versus not.  Is there
> some underlying trigger on the view or something like that?  Some kind
> of auditing function?

That's exactly the code that produced the mentioned timings. This is - according
to the JDBC driver's documentation - the expected behaviour. The driver can be
set to use cursor based fetching but *only* if autocommit is false.

If autocommit is on (or fetch size is zero) then the driver will build the whole
result set before returning to the caller.

http://jdbc.postgresql.org/documentation/80/query.html#query-with-cursor

Thomas



pgsql-sql by date:

Previous
From: "Jim Buttafuoco"
Date:
Subject: Re: funny update, say update 1, updated 1 added 2nd.
Next
From: Andrew Sullivan
Date:
Subject: Re: cursor "" does not exist