Simple task with partitioning which I can't realize

2022-03-01 Thread Andrew Zakharov
Hello all - I have a task which is simple at the first look. I have a table which contains hierarchy of address objects starting with macro region end ends with particular buildings. You can imagine how big is it. Here is short sample of table declaration: create table region_hierarchy( g

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 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 Andrew Zakharov
e, Mar 1, 2022 at 5:45 PM Andrew Zakharov mailto:andrew...@mail.ru> > wrote: Hi Marc – Since there is a DWH fed by ETL there no risks to have same gids in different region partitions. I considered simple partitioned table w/o any keys but I’d believed there is a solutions with keys th

Wrong estimations and NL Anti join poor performance

2019-11-18 Thread Andrew Zakharov
Hello colleagues - The problem description: We're moving from 9.6 to 11.5. There is a SQL code that never ends in 11.5 but works fine in 9.6. The main cause is the optimizer considers of using NL Anti join instead of Merge in 9.6. And the root cause - wrong estimation while self-joining. S

Re: performance degredation after upgrade from 9.6 to 12

2019-11-24 Thread Andrew Zakharov
Hi there - I have same feelings. Try set max_parallel_workers_per_gather to zero. I don't think that comparison non-parallel and parallel versions is correct (don't say anything about parallel in 9.6 pls) What explain says? I suppose you will have different exec plans. Optimizer stranges of 11

RE: performance degredation after upgrade from 9.6 to 12

2019-12-16 Thread Andrew Zakharov
task for mart construction) but such class of databases is supposed to be big and required enough resources initially. From: Mariel Cherkassky Sent: Monday, December 16, 2019 2:48 PM To: Jeff Janes Cc: Andrew Zakharov ; pgsql-performance@lists.postgresql.org Subject: Re: performance