[postgres-xl-general] How can I create a distribute table using multi-column

Tomas Vondra tomas.vondra at 2ndquadrant.com
Sat Nov 4 08:40:35 PDT 2017


Hi,

On 11/03/2017 11:46 AM, 136739683 wrote:
> Dear Tomas,
> 
> From XL SQL command reference, we know only one colume can be using 
> for distribute hash key.
> 

Right.

> Recently we migrate oracle DB to XL,Based on our biz characteristics,
> Can I work around to achieve multi-column hash keys?
> 

I believe XL does not support that, and I don't see that as a very
useful feature. The trouble is, if you distribute the data based on a
hash of two columns, then it's in fact not distributed by any column
independently.

We're usually asked about this when a table has two foreign keys, and
people think distributing it on both at the same time will allow local
joins with either of the FK tables. That's not the case, unfortunately.

But perhaps you use case is different and would benefit from that? Can
you explain it a bit - why you think you need multi-column distribution
keys, and how would that work with your schema?

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



More information about the postgres-xl-general mailing list