Re: general PG network slowness (possible cure) (repost)

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: ptb(at)inv(dot)it(dot)uc3m(dot)es
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-performance(at)postgresql(dot)org
Subject: Re: general PG network slowness (possible cure) (repost)
Date: 2007-05-29 13:19:36
Message-ID: b42b73150705290619x2c29baaeia18b4d920672a917@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 5/26/07, Peter T. Breuer <ptb(at)inv(dot)it(dot)uc3m(dot)es> wrote:
> "Also sprach Tom Lane:"
> > "Peter T. Breuer" <ptb(at)inv(dot)it(dot)uc3m(dot)es> writes:
> > > But can I prepare a DECLARE x BINARY CURSOR FOR SELECT ... statement?
> > > The manual seems to say no.
> >
> > No, you just prepare the SELECT. At the protocol level, DECLARE CURSOR
> > is a tad useless. You can still fetch the data in binary if you want...
>
> How? It's a 7.4 server (or may be, more generally) and declare binary
> cursor is the only way I know to get binary data off it. AFAIR the only
> other way works only for an 8.* server and consists of sending the query
> with an annotation that a binary reply is expected.

You want to be calling PQexecPrepared and flip the resultFormat.

http://www.postgresql.org/docs/7.4/interactive/libpq-exec.html#LIBPQ-EXEC-MAIN

IMO, it's usually not worth bothering with binary unless you are
dealing with bytea objects.

merlin

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Joost Kraaijeveld 2007-05-29 17:03:43 Vacuum takes forever
Previous Message Merlin Moncure 2007-05-29 13:06:56 Re: PITR performance costs