diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-01-22 23:50:30 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-01-22 23:50:30 +0000 |
| commit | 71ed7eb4941ddb32700a51a8b8b3403eceeca4a9 (patch) | |
| tree | e2452e2e308d6066c2c7e255eab5332cfcb4baa8 /doc | |
| parent | 78845177bb8839a2a582b92de2b46ce7d3f16df4 (diff) | |
Revise handling of index-type-specific indexscan cost estimation, per
pghackers discussion of 5-Jan-2000. The amopselect and amopnpages
estimators are gone, and in their place is a per-AM amcostestimate
procedure (linked to from pg_am, not pg_amop).
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/src/sgml/catalogs.sgml | 8 | ||||
| -rw-r--r-- | doc/src/sgml/xindex.sgml | 27 |
2 files changed, 9 insertions, 26 deletions
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index cc28888efeb..d0edf22daa8 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -1,6 +1,6 @@ .\" This is -*-nroff-*- .\" XXX standard disclaimer belongs here.... -.\" $Header: /cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.2 2000/01/11 01:40:04 tgl Exp $ +.\" $Header: /cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.3 2000/01/22 23:50:08 tgl Exp $ .TH "SYSTEM CATALOGS" INTRO 03/13/94 PostgreSQL PostgreSQL .SH "Section 7 - System Catalogs" .de LS @@ -138,6 +138,8 @@ pg_am regproc ambuild /* "build new index" function */ regproc amcreate /* - deprecated */ regproc amdestroy /* - deprecated */ + regproc amcostestimate /* estimate cost of an indexscan */ + .fi .nf M pg_amop @@ -148,10 +150,6 @@ pg_amop oid amopopr /* the operator */ int2 amopstrategy /* traversal/search strategy number to which this operator applies */ - regproc amopselect /* function to calculate the operator - selectivity */ - regproc amopnpages /* function to calculate the number of - pages that will be examined */ .fi .nf M pg_amproc diff --git a/doc/src/sgml/xindex.sgml b/doc/src/sgml/xindex.sgml index 771c30e4858..e4d36e1cc5b 100644 --- a/doc/src/sgml/xindex.sgml +++ b/doc/src/sgml/xindex.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/xindex.sgml,v 1.5 1999/07/22 15:11:05 thomas Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/xindex.sgml,v 1.6 2000/01/22 23:50:08 tgl Exp $ Postgres documentation --> @@ -403,20 +403,9 @@ CREATE OPERATOR = ( <entry>the <filename>oid</filename>s of the operators for the opclass (which we'll get in just a minute)</entry> </row> - <row> - <entry>amopselect, amopnpages</entry> - <entry>cost functions</entry> - </row> </tbody> </tgroup> </table> - - The cost functions are used by the query optimizer to decide whether or - not to use a given index in a scan. Fortunately, these already exist. - The two functions we'll use are <filename>btreesel</filename>, which - estimates the selectivity of the <acronym>B-tree</acronym>, and - <filename>btreenpage</filename>, which estimates the number of pages a - search will touch in the tree. </para> <para> @@ -460,10 +449,8 @@ CREATE OPERATOR = ( equal, in <filename>pg_amop</filename>. We add the instances we need: <programlisting> - INSERT INTO pg_amop (amopid, amopclaid, amopopr, amopstrategy, - amopselect, amopnpages) - SELECT am.oid, opcl.oid, c.opoid, 1, - 'btreesel'::regproc, 'btreenpage'::regproc + INSERT INTO pg_amop (amopid, amopclaid, amopopr, amopstrategy) + SELECT am.oid, opcl.oid, c.opoid, 1 FROM pg_am am, pg_opclass opcl, complex_abs_ops_tmp c WHERE amname = 'btree' AND opcname = 'complex_abs_ops' AND @@ -519,13 +506,11 @@ CREATE OPERATOR = ( <para> Now we need to add a hashing strategy to allow the type to be indexed. - We do this by using another type in pg_am but we reuse the sames ops. + We do this by using another type in pg_am but we reuse the same ops. <programlisting> - INSERT INTO pg_amop (amopid, amopclaid, amopopr, amopstrategy, - amopselect, amopnpages) - SELECT am.oid, opcl.oid, c.opoid, 1, - 'hashsel'::regproc, 'hashnpage'::regproc + INSERT INTO pg_amop (amopid, amopclaid, amopopr, amopstrategy) + SELECT am.oid, opcl.oid, c.opoid, 1 FROM pg_am am, pg_opclass opcl, complex_abs_ops_tmp c WHERE amname = 'hash' AND opcname = 'complex_abs_ops' AND |
