Cost *indexStartupCost,
Cost *indexTotalCost,
Selectivity *indexSelectivity,
- double *indexCorrelation);
+ double *indexCorrelation,
+ double *indexPages);
</programlisting>
Estimate the costs of an index scan. This function is described fully
in <xref linkend="index-cost-estimation"/>, below.
Cost *indexStartupCost,
Cost *indexTotalCost,
Selectivity *indexSelectivity,
- double *indexCorrelation);
+ double *indexCorrelation,
+ double *indexPages);
</programlisting>
The first three parameters are inputs:
</para>
<para>
- The last four parameters are pass-by-reference outputs:
+ The last five parameters are pass-by-reference outputs:
<variablelist>
<varlistentry>
</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><parameter>*indexPages</parameter></term>
+ <listitem>
+ <para>
+ Set to number of index leaf pages
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>
table.
</para>
+ <para>
+ The <parameter>indexPages</parameter> should be set to the number of leaf pages.
+ This is used to estimate the number of workers for parallel index scan.
+ </para>
+
<para>
When <parameter>loop_count</parameter> is greater than one, the returned numbers
should be averages expected for any one scan of the index.