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

From Surafel Temesgen
Subject Re: FETCH FIRST clause PERCENT option
Date
Msg-id CALAY4q_icXPTcAVxnPckpLGrZgER9-FWM0VPFvvOsPiJrnK6Dg@mail.gmail.com
Whole thread Raw
In response to Re: FETCH FIRST clause PERCENT option  (Ryan Lambert <ryan@rustprooflabs.com>)
Responses Re: FETCH FIRST clause PERCENT option  (Ryan Lambert <ryan@rustprooflabs.com>)
Re: FETCH FIRST clause PERCENT option  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
List pgsql-hackers

Hi Ryan,
sorry for not be fast to replay


I was suggesting a warning in the documentation so users aren't caught unaware about the performance characteristics.  My first version was very rough, how about adding this in doc/src/sgml/ref/select.sgml?

"Using <literal>PERCENT</literal> is best suited to returning single-digit percentages of the query's total row count."

The following paragraphs in that same section give suggestions and warnings regarding LIMIT and OFFSET usage, I think this is more in line with the wording of those existing warnings.


Agreed and done
 
Other than that, we can rip the clause if it is 100%

You mean if PERCENT=100 it should short circuit and run the query normally?  I like that.

The patch did not did it automatically. Its query writer obligation to do that currently   
 
regards
Surafel
Attachment

pgsql-hackers by date:

Previous
From: Sehrope Sarkuni
Date:
Subject: Fix typos
Next
From: Robert Haas
Date:
Subject: Re: pgbench - implement strict TPC-B benchmark