Re: Data Warehouse Reevaluation - MySQL vs Postgres -- merge tables - Mailing list pgsql-performance

From Christopher Browne
Subject Re: Data Warehouse Reevaluation - MySQL vs Postgres -- merge tables
Date
Msg-id m37jqw8aua.fsf@wolfe.cbbrowne.com
Whole thread Raw
In response to Re: Data Warehouse Reevaluation - MySQL vs Postgres -- merge tables  ("Jim C. Nasby" <decibel@decibel.org>)
List pgsql-performance
simon@2ndquadrant.com ("Simon Riggs") wrote:
> The main point is that the constant placed in front of each table
> must in some way relate to the data, to make it useful in
> querying. If it is just a unique constant, chosen at random, it
> won't do much for partition elimination.

It just struck me - this is much the same notion as that of "cutting
planes" used in Integer Programming.

The approach, there, is that you take a linear program, which can give
fractional results, and throw on as many additional constraints as you
need in order to force the likelihood of particular variable falling
on integer values.  The constraints may appear redundant, but
declaring them allows the answers to be pushed in the right
directions.

In this particular case, the (arguably redundant) constraints let the
query optimizer have criteria for throwing out unnecessary tables.
Thanks for pointing this out; it may turn a fowl into a feature, when
I can get some "round tuits" :-).  That should allow me to turn an
81-way evil join into something that's 4-way at the worst.

Cheers!
--
"cbbrowne","@","linuxfinances.info"
http://linuxfinances.info/info/nonrdbms.html
Implementing systems is 95% boredom and 5% sheer terror.

pgsql-performance by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: Data Warehouse Reevaluation - MySQL vs Postgres -- merge tables
Next
From: Chris Browne
Date:
Subject: Re: Data Warehouse Reevaluation - MySQL vs Postgres -- merge tables