Add an index on pg_inherits.inhparent, and use it to avoid seqscans in
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 29 Dec 2009 22:00:14 +0000 (22:00 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 29 Dec 2009 22:00:14 +0000 (22:00 +0000)
commit55b98755330a5ab8ff1d89700322f4d5d2d5bae4
tree85d8a8926f5cdd94bb281848298b5325bb0d1d7e
parent0fac082d96746cc1e5ba3f1350c20df5298e6630
Add an index on pg_inherits.inhparent, and use it to avoid seqscans in
find_inheritance_children().  This is a complete no-op in databases without
any inheritance.  In databases where there are just a few entries in
pg_inherits, it could conceivably be a small loss.  However, in databases with
many inheritance parents, it can be a big win.
src/backend/catalog/pg_inherits.c
src/backend/commands/tablecmds.c
src/include/catalog/catversion.h
src/include/catalog/indexing.h