Re: Large # of rows in query extremely slow, not using

From: Kris Jurka <books(at)ejurka(dot)com>
To: Stephen Crowley <stephen(dot)crowley(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Large # of rows in query extremely slow, not using
Date: 2004-09-23 23:47:59
Message-ID: Pine.BSO.4.56.0409231840280.18935@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, 23 Sep 2004, Stephen Crowley wrote:

> Thanks for the explanation. So what sort of changes need to be made to
> the client/server protocol to fix this problem?

The problem is that there is no way to indicate why you are using a
particular statement in the extended query protocol. For the JDBC driver
there are two potential reasons, streaming a ResultSet and using a server
prepared statement. For the streaming as default case you desire there
needs to be a way to indicate that you don't want to create a generic
server prepared statement and that this query is really just for one time
use, so it can generate the best plan possible.

Additionally you can only stream ResultSets that are of type FORWARD_ONLY.
It would also be nice to be able to specify scrollability and holdability
when creating a statement and the offset/direction when streaming data
from a scrollable one.

Kris Jurka

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Josh Berkus 2004-09-24 00:05:58 Re: Caching of Queries
Previous Message Stephen Crowley 2004-09-23 23:36:49 Re: Large # of rows in query extremely slow, not using index