diff options
author | Alexander Korotkov <akorotkov@postgresql.org> | 2018-08-10 14:14:36 +0300 |
---|---|---|
committer | Alexander Korotkov <akorotkov@postgresql.org> | 2018-08-10 14:23:19 +0300 |
commit | 26853a86ae4bc4f214005e05f55677e5b228f4f8 (patch) | |
tree | 31af61e3d01da149ab7b312ca294924d4d87a0ff | |
parent | da1a5da1e4216af22cfa461292f0031cb254cab9 (diff) |
Add missing documentation for argument of amcostestimate()
5262f7a4fc44 have introduced parallel index scan. In order to estimate the
number of parallel workers, it adds extra argument to amcostestimate() index
access method API function. However, this extra argument was missed in the
documentation. This commit fixes that.
Discussion: https://postgr.es/m/4128fdb4-8b63-2e05-38f6-3125f8c27263%40lab.ntt.co.jp
Author: Tatsuro Yamada, Alexander Korotkov
Backpatch-through: 10
-rw-r--r-- | doc/src/sgml/indexam.sgml | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/doc/src/sgml/indexam.sgml b/doc/src/sgml/indexam.sgml index aa3d371d2e3..8b2999e41c5 100644 --- a/doc/src/sgml/indexam.sgml +++ b/doc/src/sgml/indexam.sgml @@ -383,7 +383,8 @@ amcostestimate (PlannerInfo *root, 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. @@ -1151,7 +1152,8 @@ amcostestimate (PlannerInfo *root, Cost *indexStartupCost, Cost *indexTotalCost, Selectivity *indexSelectivity, - double *indexCorrelation); + double *indexCorrelation, + double *indexPages); </programlisting> The first three parameters are inputs: @@ -1193,7 +1195,7 @@ amcostestimate (PlannerInfo *root, </para> <para> - The last four parameters are pass-by-reference outputs: + The last five parameters are pass-by-reference outputs: <variablelist> <varlistentry> @@ -1232,6 +1234,15 @@ amcostestimate (PlannerInfo *root, </para> </listitem> </varlistentry> + + <varlistentry> + <term><parameter>*indexPages</parameter></term> + <listitem> + <para> + Set to number of index leaf pages + </para> + </listitem> + </varlistentry> </variablelist> </para> @@ -1280,6 +1291,11 @@ amcostestimate (PlannerInfo *root, </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</> is greater than one, the returned numbers should be averages expected for any one scan of the index. </para> |