diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-12-29 20:11:45 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-12-29 20:11:45 +0000 |
commit | 649b5ec7c8a3050a30bd6d36003ba3a681c9a198 (patch) | |
tree | af041b646426d71d9ea1113837b5f7a9001082c9 /src/backend/executor/nodeHash.c | |
parent | 84d723b6cefcf25b8c800f8aa6cf3c9538a546b4 (diff) | |
download | postgresql-649b5ec7c8a3050a30bd6d36003ba3a681c9a198.tar.gz postgresql-649b5ec7c8a3050a30bd6d36003ba3a681c9a198.zip |
Add the ability to store inheritance-tree statistics in pg_statistic,
and teach ANALYZE to compute such stats for tables that have subclasses.
Per my proposal of yesterday.
autovacuum still needs to be taught about running ANALYZE on parent tables
when their subclasses change, but the feature is useful even without that.
Diffstat (limited to 'src/backend/executor/nodeHash.c')
-rw-r--r-- | src/backend/executor/nodeHash.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/executor/nodeHash.c b/src/backend/executor/nodeHash.c index 16b84d0f5ad..a58e9170272 100644 --- a/src/backend/executor/nodeHash.c +++ b/src/backend/executor/nodeHash.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/nodeHash.c,v 1.123 2009/10/30 20:58:45 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/executor/nodeHash.c,v 1.124 2009/12/29 20:11:44 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -996,10 +996,11 @@ ExecHashBuildSkewHash(HashJoinTable hashtable, Hash *node, int mcvsToUse) /* * Try to find the MCV statistics for the outer relation's join key. */ - statsTuple = SearchSysCache(STATRELATT, + statsTuple = SearchSysCache(STATRELATTINH, ObjectIdGetDatum(node->skewTable), Int16GetDatum(node->skewColumn), - 0, 0); + BoolGetDatum(node->skewInherit), + 0); if (!HeapTupleIsValid(statsTuple)) return; |