public inbox for [email protected]  
help / color / mirror / Atom feed
From: Frédéric Yhuel <[email protected]>
To: Jon Zeppieri <[email protected]>
To: Greg Sabino Mullane <[email protected]>
Cc: [email protected]
Subject: Re: Why a bitmap scan in this case?
Date: Fri, 20 Dec 2024 10:57:40 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CAKfDxxzqxm0gS44+4aUDejLq_iszqLJwR+EaM4x2pojrkV58eg@mail.gmail.com>
	<CAKAnmmL327t5MRJ2uonQ3JB5bLegRbfa-WtpaTNBnbJ1iVef5Q@mail.gmail.com>
	<CAKfDxxw-=_naXS-ypU9qWj8eNbAEJvGCy5ZxHA5HW=+M-baDcw@mail.gmail.com>
	<[email protected]>



On 12/20/24 09:16, Frédéric Yhuel wrote:
> 
> 
> 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.
> 
> 

And if you still have heap fetches, you could try VACUUM (INDEX_CLEANUP 
TRUE), so that it doesn't bypass index vacuuming.

(In case the pages that contain theses 27701 tuples amount to less than 
2% of the total number of pages of the table).

Nice explanation here: 
https://www.cybertec-postgresql.com/en/making-the-postgresql-visibility-map-visible/#vacuum-doesnt-u...





view thread (7+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Why a bitmap scan in this case?
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox