Re: Very slow queries on 8.1 - Mailing list pgsql-general

From Tom Lane
Subject Re: Very slow queries on 8.1
Date
Msg-id 27047.1132246005@sss.pgh.pa.us
Whole thread Raw
In response to Re: Very slow queries on 8.1  (David Rysdam <drysdam@ll.mit.edu>)
List pgsql-general
David Rysdam <drysdam@ll.mit.edu> writes:
> Right, it's about 100k rows and it is through libpq (pgadmin in this
> case, but my app uses libpq from pgtcl).  Is there a way to tell libpq
> to not do what it "likes" and do what I need instead?

The only way ATM is to declare a cursor on the query and then FETCH
whatever amount seems reasonable at a time.

There is support in the on-the-wire protocol for partial fetches from
ordinary queries (ie, without the notational overhead of creating a
cursor).  libpq doesn't expose that at the moment.  There's a thread
right now in pgsql-interfaces about adding such a feature to libpq ...

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: strange behavior on 8.1
Next
From: Peter Michaux
Date:
Subject: Moving from MySQL to PostgreSQL with Ruby on Rails.