Re: planner chooses incremental but not the best one

From: Andrei Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>
To: Richard Guo <guofenglinux(at)gmail(dot)com>, Nicolas Lutic <n(dot)lutic(at)loxodata(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: planner chooses incremental but not the best one
Date: 2024-02-15 07:35:57
Message-ID: c6cf3fe8-8179-4b2e-9163-68941de0ed0a@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 15/12/2023 15:58, Richard Guo wrote:
> With the patch the estimate for the number of distinct 'b' values is
> more accurate.
+1 to commit this patch.
It looks good and resolves kind of a bug in the code.
>
> BTW, this patch does not change any existing regression test results.  I
> attempted to devise a regression test that shows how this change can
> improve query plans, but failed.  Should I try harder to find such a
> test case?
The test that was changed refers to different features. Its behaviour
can be changed in. the future, and mask testing of this code. IMO, you
should add a test directly checking appendrel->tuples correction.

--
regards,
Andrei Lepikhov
Postgres Professional

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andy Fan 2024-02-15 08:38:03 Re: make add_paths_to_append_rel aware of startup cost
Previous Message Amit Kapila 2024-02-15 07:19:09 Re: pg_upgrade and logical replication