Search Postgresql Archives

Re: Questions about horizontal partitioning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 09, 2007 at 10:33:52 -0500,
  Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
> 
> No, that's still not right.  With a LEFT JOIN you know that each row of
> the narrow table will produce at least one row in the join view.  What
> you don't know is whether the row could produce more than one join row
> --- ie, is there more than one wide-table row that joins to it?

Thanks for pointing that out. I only thought of half of the problem.

> To optimize away the join, the planner would have to find a unique
> constraint on the wide table's join column(s).  This is certainly doable
> in principle, though I find it questionable whether the planner should
> spend cycles on every join query checking for something that won't be
> true in the vast majority of real-world queries.  The main reason we

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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux