Re: partitioned table query question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Trevor Talbot" <quension(at)gmail(dot)com>
Cc: "Erik Jones" <erik(at)myemma(dot)com>, "Mason Hale" <masonhale(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: partitioned table query question
Date: 2007-12-11 05:04:29
Message-ID: 28842.1197349469@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

"Trevor Talbot" <quension(at)gmail(dot)com> writes:
> Erik is questioning is why it has to assume anything. Why can't it
> just execute the expression and find out?

Because the whole point of the problem is to *not* execute the
expression, but to assume that it must yield false, for every row
of a given partition. Without a solid logical basis for that
assumption, you're just building a house of cards.

The bottom line here is that we have built a partitioning facility
out of spare parts, ie, a very generalized contradiction-proving
section of the planner. It's been an interesting exercise, and
it's certainly resulted in a better contradiction-prover than
we would have had otherwise, but it's got obvious limitations both
in planning performance and in the sorts of partitioning rules we
can support. My feeling is that trying to push the current approach to
do bin or hash partitioning transparently is likely not reasonable.
Eventually we'll have to push an understanding of partitioning down to
some lower level of the system --- that is, if we think it's critical
enough to justify that much effort.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Colin Wetherbee 2007-12-11 05:04:36 Re: SQL design pattern for a delta trigger?
Previous Message Trevor Talbot 2007-12-11 04:53:10 Re: partitioned table query question

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Treat 2007-12-11 05:14:20 Re: partitioned table query question
Previous Message Trevor Talbot 2007-12-11 04:53:10 Re: partitioned table query question