Re: FETCH FIRST clause PERCENT option - Mailing list pgsql-hackers

From Surafel Temesgen
Subject Re: FETCH FIRST clause PERCENT option
Date
Msg-id CALAY4q8mr_uVgY5UaFh-iZWDvUZpQ2YduCJUKZ3d5dpUQHR1fA@mail.gmail.com
Whole thread Raw
In response to Re: FETCH FIRST clause PERCENT option  (Andres Freund <andres@anarazel.de>)
Responses Re: FETCH FIRST clause PERCENT option
List pgsql-hackers


On Thu, Aug 16, 2018 at 5:34 PM, Andres Freund <andres@anarazel.de> wrote:

Won't that have rather massive issues with multiple evaluations of
clauses in the query?  Besides being really expensive?

The plan re-scane after first execution I can’t see issue for multiple execution of a clause in this case


I think you'd have to instead spill the query results into a tuplestore

The downside of it is all the result have to be stored even if needed tuple is a fraction of it and also store it for longer so the choice became memory or cpu utilization  


- Andres
Regards
Surafel

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Pluggable Storage - Andres's take
Next
From: Andres Freund
Date:
Subject: Re: FETCH FIRST clause PERCENT option