Re: need explanation about an explain plan

2023-07-02 Thread Umut TEKİN
>You could likely get an idea of how the surplus filter is slowing down >execution if you widen the filter to ensure it includes all possible >"ladate" values, run the query, then run the query again without the >date range filter. I would guess it'll only save you a few percent, >but I'm open to b

Re: need explanation about an explain plan

2023-07-02 Thread David Rowley
On Fri, 30 Jun 2023 at 00:42, Umut TEKİN wrote: > @Marc, I think there is no problem.Even though it says it is filtered by > ladate, it is not. Because of the partition. > As you can see for each index scan it uses a different partition and those > partition boundaries are already specified logi

Re: need explanation about an explain plan

2023-06-29 Thread Umut TEKİN
Hi, @Marc, I think there is no problem.Even though it says it is filtered by ladate, it is not. Because of the partition. As you can see for each index scan it uses a different partition and those partition boundaries are already specified logically. For example; "Parallel Index Scan using table1_

Re: need explanation about an explain plan

2023-06-29 Thread Marc Millas
Le mer. 28 juin 2023 à 22:46, Laurenz Albe a écrit : > On Wed, 2023-06-28 at 19:25 +0200, Marc Millas wrote: > > Hi Laurenz, as said, in each partition there is only one value for > ladate. > > The planner doesn't seem to take that into account. > Indeed. I did check values in pg_statistic. And r

Re: need explanation about an explain plan

2023-06-28 Thread Laurenz Albe
On Wed, 2023-06-28 at 19:25 +0200, Marc Millas wrote: > Hi Laurenz, as said, in each partition there is only one value for ladate. The planner doesn't seem to take that into account. Yours, Laurenz Albe

Re: need explanation about an explain plan

2023-06-28 Thread Marc Millas
On Wed, Jun 28, 2023 at 6:48 PM Laurenz Albe wrote: > On Wed, 2023-06-28 at 17:29 +0200, Marc Millas wrote: > > https://explain.depesz.com/s/Opk0 > > > > The big table (10 billions raws) is split in around 130 partitions, one > by month. > > the ladate column is the partition key, and it does hav

Re: need explanation about an explain plan

2023-06-28 Thread Laurenz Albe
On Wed, 2023-06-28 at 17:29 +0200, Marc Millas wrote: > https://explain.depesz.com/s/Opk0 > > The big table (10 billions raws) is split in around 130 partitions, one by > month. > the ladate column is the partition key, and it does have 1 value for each > partition. > there is an index on the nu

Re: need explanation about an explain plan

2023-06-28 Thread Marc Millas
Sorry, gmail sent uncompleted message Hi, Postgres 14.2 (for one more month) The explain plan and request is here: https://explain.depesz.com/s/Opk0 The big table (10 billions raws) is split in around 130 partitions, one by month. the ladate column is the partition key, and it does have 1 value

need explanation about an explain plan

2023-06-28 Thread Marc Millas
Hi, Postgres 14.2 (for one more month) The explain plan and request is here: https://explain.depesz.com/s/Opk0 The big table is split in around 130 partitions, one by month. the ladate column is the partition key, and it does have 1 value for each partition. there is a Marc MILLAS Senior Arc