1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Allow the planner's estimate of the fraction of a cursor's rows that will be

retrieved to be controlled through a GUC variable.

Robert Hell
This commit is contained in:
Tom Lane
2008-05-02 21:26:10 +00:00
parent cf9f6c8d8e
commit db147b3483
5 changed files with 58 additions and 8 deletions

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.176 2008/05/01 19:55:40 tgl Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.177 2008/05/02 21:26:09 tgl Exp $ -->
<chapter Id="runtime-config">
<title>Server Configuration</title>
@ -2238,6 +2238,26 @@ SELECT * FROM parent WHERE key = 2400;
</listitem>
</varlistentry>
<varlistentry id="guc-cursor-tuple-fraction" xreflabel="cursor_tuple_fraction">
<term><varname>cursor_tuple_fraction</varname> (<type>floating point</type>)</term>
<indexterm>
<primary><varname>cursor_tuple_fraction</> configuration parameter</primary>
</indexterm>
<listitem>
<para>
Sets the planner's estimate of the fraction of a cursor's rows that
will be retrieved. The default is 0.1. Smaller values of this
setting bias the planner towards using <quote>fast start</> plans
for cursors, which will retrieve the first few rows quickly while
perhaps taking a long time to fetch all rows. Larger values
put more emphasis on the total estimated time. At the maximum
setting of 1.0, cursors are planned exactly like regular queries,
considering only the total estimated time and not how soon the
first rows might be delivered.
</para>
</listitem>
</varlistentry>
<varlistentry id="guc-from-collapse-limit" xreflabel="from_collapse_limit">
<term><varname>from_collapse_limit</varname> (<type>integer</type>)</term>
<indexterm>