Re: Questions about horizontal partitioning - Mailing list pgsql-general

From Tom Lane
Subject Re: Questions about horizontal partitioning
Date
Msg-id 12306.1168383430@sss.pgh.pa.us
Whole thread Raw
In response to Re: Questions about horizontal partitioning  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-general
Bruno Wolff III <bruno@wolff.to> writes:
> In this case the test would only be applied when no columns were being used
> in a table being joined to. Since that is also an unusual case, if that case
> could be quickly checked for, then it might conceivably be worth doing the
> more expensive test for the proper not null foreign key relation and unique
> constraint.

Yeah.  Right offhand I think that would be fairly expensive too :-(.
The problem is that the query *DOES* have a reference to at least one
column of the wide table, namely its join key.  So you'd have to
distinguish whether any references appear "above" the join.  In the
current planner structure I think that this information is computed,
but not until it's far too late to be removing joins from the tree.

            regards, tom lane

pgsql-general by date:

Previous
From: "Matthew T. O'Connor"
Date:
Subject: Re: Autovacuum Improvements
Next
From: Ben
Date:
Subject: Re: index creation on 7.3