Re: Will PQsetSingleRowMode get me results faster? - Mailing list pgsql-general

From Daniel Verite
Subject Re: Will PQsetSingleRowMode get me results faster?
Date
Msg-id 140214eb-a8ce-4285-afdd-7770c5a9d274@manitou-mail.org
Whole thread Raw
In response to Will PQsetSingleRowMode get me results faster?  (Stijn Sanders <stijnsanders@gmail.com>)
Responses Re: Will PQsetSingleRowMode get me results faster?
List pgsql-general
    Stijn Sanders wrote:

> From what I notice using LibPQ, it appears a query needs to complete
> before resulting data is being transferred to the client. Please
> correct me if I'm wrong.

No, the query does not need to complete. If you run something like
"select * from bigtable" in single-row or chunked mode, you should
see that the first results are typically available immediately to the
application, while the query is far from finished.

But it depends on the query plan. A lot of queries cannot produce any
result until the final stage of their execution. For these, you can't
expect any difference in how fast the first results are available
client-side.


Best regards,
--
Daniel Vérité
https://postgresql.verite.pro/
Twitter: @DanielVerite



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Questions about the Debian Package version of pgAdmin
Next
From: "Daniel Verite"
Date:
Subject: Re: Pipeline Mode vs Single Row Mode / Chunked Rows Mode