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 /src/tutorial/complex.source | |
parent | 78845177bb8839a2a582b92de2b46ce7d3f16df4 (diff) | |
download | postgresql-71ed7eb4941ddb32700a51a8b8b3403eceeca4a9.tar.gz postgresql-71ed7eb4941ddb32700a51a8b8b3403eceeca4a9.zip |
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 'src/tutorial/complex.source')
-rw-r--r-- | src/tutorial/complex.source | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/src/tutorial/complex.source b/src/tutorial/complex.source index bae3192198b..847ec1a2188 100644 --- a/src/tutorial/complex.source +++ b/src/tutorial/complex.source @@ -7,7 +7,7 @@ -- -- Copyright (c) 1994, Regents of the University of California -- --- $Id: complex.source,v 1.4 1998/03/01 04:52:59 scrappy Exp $ +-- $Id: complex.source,v 1.5 2000/01/22 23:50:30 tgl Exp $ -- --------------------------------------------------------------------------- @@ -184,42 +184,32 @@ WHERE o.oprleft = t.oid and o.oprright = t.oid -- make sure we have the right operators SELECT * from complex_ops_tmp; -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_ops_tmp c WHERE amname = 'btree' and opcname = 'complex_abs_ops' and c.oprname = '<'; -INSERT INTO pg_amop (amopid, amopclaid, amopopr, amopstrategy, - amopselect, amopnpages) - SELECT am.oid, opcl.oid, c.opoid, 2, - 'btreesel'::regproc, 'btreenpage'::regproc +INSERT INTO pg_amop (amopid, amopclaid, amopopr, amopstrategy) + SELECT am.oid, opcl.oid, c.opoid, 2 FROM pg_am am, pg_opclass opcl, complex_ops_tmp c WHERE amname = 'btree' and opcname = 'complex_abs_ops' and c.oprname = '<='; -INSERT INTO pg_amop (amopid, amopclaid, amopopr, amopstrategy, - amopselect, amopnpages) - SELECT am.oid, opcl.oid, c.opoid, 3, - 'btreesel'::regproc, 'btreenpage'::regproc +INSERT INTO pg_amop (amopid, amopclaid, amopopr, amopstrategy) + SELECT am.oid, opcl.oid, c.opoid, 3 FROM pg_am am, pg_opclass opcl, complex_ops_tmp c WHERE amname = 'btree' and opcname = 'complex_abs_ops' and c.oprname = '='; -INSERT INTO pg_amop (amopid, amopclaid, amopopr, amopstrategy, - amopselect, amopnpages) - SELECT am.oid, opcl.oid, c.opoid, 4, - 'btreesel'::regproc, 'btreenpage'::regproc +INSERT INTO pg_amop (amopid, amopclaid, amopopr, amopstrategy) + SELECT am.oid, opcl.oid, c.opoid, 4 FROM pg_am am, pg_opclass opcl, complex_ops_tmp c WHERE amname = 'btree' and opcname = 'complex_abs_ops' and c.oprname = '>='; -INSERT INTO pg_amop (amopid, amopclaid, amopopr, amopstrategy, - amopselect, amopnpages) - SELECT am.oid, opcl.oid, c.opoid, 5, - 'btreesel'::regproc, 'btreenpage'::regproc +INSERT INTO pg_amop (amopid, amopclaid, amopopr, amopstrategy) + SELECT am.oid, opcl.oid, c.opoid, 5 FROM pg_am am, pg_opclass opcl, complex_ops_tmp c WHERE amname = 'btree' and opcname = 'complex_abs_ops' and c.oprname = '>'; |