Re: Cursors: getting the number of tuples; moving backwards

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: am(at)fx(dot)ro, pgsql-general(at)postgresql(dot)org
Subject: Re: Cursors: getting the number of tuples; moving backwards
Date: 2002-11-02 03:03:17
Message-ID: 17095.1036206197@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-jdbc

Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
>> I guess it doesn't execute the whole query. MOVE ALL is *much*
>> faster than FETCH ALL + PQcmdTuples

> Curious. I wonder how it does it then.

MOVE does execute the query, it just doesn't ship the tuples to the
client. This would save some formatting overhead (no need to run
the datatype I/O conversion procedures), but unless you have a slow
network link between client and server I would not expect it to be
"much" faster ...

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2002-11-02 03:14:56 Re: move 0 behaviour
Previous Message Martijn van Oosterhout 2002-11-02 02:39:16 Re: Cursors: getting the number of tuples; moving backwards

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-11-02 03:14:56 Re: move 0 behaviour
Previous Message Martijn van Oosterhout 2002-11-02 02:39:16 Re: Cursors: getting the number of tuples; moving backwards

Browse pgsql-jdbc by date

  From Date Subject
Next Message Bruce Momjian 2002-11-02 03:14:56 Re: move 0 behaviour
Previous Message Martijn van Oosterhout 2002-11-02 02:39:16 Re: Cursors: getting the number of tuples; moving backwards