Re: Why a bitmap scan in this case?

From: Jon Zeppieri <zeppieri(at)gmail(dot)com>
To: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Why a bitmap scan in this case?
Date: 2024-12-19 19:19:50
Message-ID: CAKfDxxwffetLV3UKdLZR_zUOe4odDLges-v7kkTtasfMQ2a2NQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, Dec 19, 2024 at 2:09 PM Jon Zeppieri <zeppieri(at)gmail(dot)com> wrote:
>
> The row estimate is not good. The query estimates 317919 rows but
> there are only 27701. There is some correlation here; if end_on is
> null, start_on is a lot more likely to be recent, so maybe extended
> statistics would be useful here.
>

Though, given that the index only contains rows where end_on is null,
it seems odd that the planner would estimate more rows than are
present in the index. That said, I have no idea whether the planner
uses that sort of information. -J

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message jian he 2024-12-20 07:57:33 Re: Re: proposal: schema variables
Previous Message Jon Zeppieri 2024-12-19 19:09:59 Re: Why a bitmap scan in this case?