Обсуждение: pgsql: Add an index on pg_inherits.inhparent, and use it to avoid
pgsql: Add an index on pg_inherits.inhparent, and use it to avoid
От
tgl@postgresql.org (Tom Lane)
Дата:
Log Message: ----------- 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. Modified Files: -------------- pgsql/src/backend/catalog: pg_inherits.c (r1.3 -> r1.4) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/pg_inherits.c?r1=1.3&r2=1.4) pgsql/src/backend/commands: tablecmds.c (r1.311 -> r1.312) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c?r1=1.311&r2=1.312) pgsql/src/include/catalog: catversion.h (r1.562 -> r1.563) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/catversion.h?r1=1.562&r2=1.563) indexing.h (r1.112 -> r1.113) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/indexing.h?r1=1.112&r2=1.113)