Re: Why a bitmap scan in this case?

From: Frédéric Yhuel <frederic(dot)yhuel(at)dalibo(dot)com>
To: Jon Zeppieri <zeppieri(at)gmail(dot)com>, 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-20 08:16:48
Message-ID: 43c7d623-1805-4db2-a8fc-9a99d3633320@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 12/19/24 20:09, Jon Zeppieri wrote:
> The table is freshly vacuumed. If I disable bitmap scans, it will do
> an index only scan, which performs better. For the bitmap heap scan,
> it says "Heap Blocks: exact=27393," whereas for the index only scan,
> it's "Heap Fetches: 27701."

So you have 100% heap fetches. Are you sure that your table is freshly
vacuumed? Please note that VACUUM FULL doesn't create the visibility
map, so you still have to run a plain VACUUM for this.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Frédéric Yhuel 2024-12-20 09:57:40 Re: Why a bitmap scan in this case?
Previous Message jian he 2024-12-20 07:57:33 Re: Re: proposal: schema variables