From 649b5ec7c8a3050a30bd6d36003ba3a681c9a198 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 29 Dec 2009 20:11:45 +0000 Subject: 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. --- src/backend/executor/nodeHash.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/backend/executor/nodeHash.c') 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; -- cgit v1.2.3