Re: Why a bitmap scan in this case?

From: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
To: Jon Zeppieri <zeppieri(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 18:38:57
Message-ID: CAKAnmmL327t5MRJ2uonQ3JB5bLegRbfa-WtpaTNBnbJ1iVef5Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

>
> Why wouldn't it do an index (or, really, an index only) scan in this case

Well, it did do an index scan (and a bitmap scan is a pretty good solution
here), but as to why no indexonly scan, there is probably not enough
assurance that it won't have to hit the heap heavily anyway. Try doing a
SET enable_bitmapscan=0; and re-run with EXPLAIN ANALYZE. If you see a
large number of "Heap Fetches", that could be why. Vacuum the table and try
again after doing SET enable_bitmapscan=1;

Cheers,
Greg

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jon Zeppieri 2024-12-19 19:09:59 Re: Why a bitmap scan in this case?
Previous Message Jon Zeppieri 2024-12-19 17:52:27 Why a bitmap scan in this case?