Re: Simple task with partitioning which I can't realize

2022-03-02 Thread Mladen Gogala
On 3/1/22 10:54, David G. Johnston wrote: On Tue, Mar 1, 2022 at 8:37 AM Andrew Zakharov wrote: create table region_hierarchy(   gid uuid not null default uuid_generate_v1mc(),   parent_gid uuid null,   region_code int2, I’ve carefully looked thru docs/faqs/google/commun

Re: Simple task with partitioning which I can't realize

2022-03-02 Thread Geri Wright
ov > *Cc :* pgsql-performance@lists.postgresql.org > *Objet :* Re: Simple task with partitioning which I can't realize > > > > Andrew, > > > > contrary to Oracle, in postgres you can add the indexes and/or the > constraints which are meaningful to you at partition

RE: Simple task with partitioning which I can't realize

2022-03-01 Thread Michel SALAIS
De : Marc Millas Envoyé : mardi 1 mars 2022 19:00 À : Andrew Zakharov Cc : pgsql-performance@lists.postgresql.org Objet : Re: Simple task with partitioning which I can't realize Andrew, contrary to Oracle, in postgres you can add the indexes and/or the constraints which are meani

RE: Simple task with partitioning which I can't realize

2022-03-01 Thread Andrew Zakharov
Subject: Re: Simple task with partitioning which I can't realize Hi, is there any chance (risk ?) that a given gid be present in more than one region ? if not (or if you implement it via a dedicated, non partition table), you may create a simple table partitioned by region,

Re: Simple task with partitioning which I can't realize

2022-03-01 Thread Marc Millas
king > the clue. > > Thanks. > > Andrew. > > > > *From:* Marc Millas > *Sent:* Tuesday, March 01, 2022 7:29 PM > *To:* Andrew Zakharov > *Cc:* pgsql-performance@lists.postgresql.org > *Subject:* Re: Simple task with partitioning which I can't realize > >

RE: Simple task with partitioning which I can't realize

2022-03-01 Thread Andrew Zakharov
, March 01, 2022 7:29 PM To: Andrew Zakharov Cc: pgsql-performance@lists.postgresql.org Subject: Re: Simple task with partitioning which I can't realize Hi, is there any chance (risk ?) that a given gid be present in more than one region ? if not (or if you implement it via a dedi

Re: Simple task with partitioning which I can't realize

2022-03-01 Thread David G. Johnston
On Tue, Mar 1, 2022 at 9:37 AM Andrew Zakharov wrote: > David, - yes, creation composite foreign/primary key is not a problem. But > the main question is what method should I use for partitioning by composite > key gid, region_code? > The convention here is to inline or bottom-post responses. Y

RE: Simple task with partitioning which I can't realize

2022-03-01 Thread Andrew Zakharov
G. Johnston Sent: Tuesday, March 01, 2022 6:54 PM To: Andrew Zakharov Cc: Pgsql Performance Subject: Re: Simple task with partitioning which I can't realize On Tue, Mar 1, 2022 at 8:37 AM Andrew Zakharov mailto:andrew...@mail.ru> > wrote: create table region_hierarchy( gid uu

Re: Simple task with partitioning which I can't realize

2022-03-01 Thread Marc Millas
Hi, is there any chance (risk ?) that a given gid be present in more than one region ? if not (or if you implement it via a dedicated, non partition table), you may create a simple table partitioned by region, and create unique indexes for each partition. this is NOT equivalent to a unique constr

Re: Simple task with partitioning which I can't realize

2022-03-01 Thread David G. Johnston
On Tue, Mar 1, 2022 at 8:37 AM Andrew Zakharov wrote: > create table region_hierarchy( > > gid uuid not null default uuid_generate_v1mc(), > > parent_gid uuid null, > > region_code int2, > > > > I’ve carefully looked thru docs/faqs/google/communities and found out that > I must include “g