Re: Bitmap scan seem like such a strange choice when "limit 1" - Mailing list pgsql-general

From Michael Lewis
Subject Re: Bitmap scan seem like such a strange choice when "limit 1"
Date
Msg-id CAHOFxGqidWg1hQF9a2hGZk1NJTbMAV2bNYqha+HPye8rA+dTMA@mail.gmail.com
Whole thread Raw
In response to Re: Bitmap scan seem like such a strange choice when "limit 1"  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Index Scan using bigtable_y2020_cars_ref_idx on bigtable_y2020 bigtable (cost=0.57..2966738.51 rows=2873818 width=636) (actual time=0.026..0.026 rows=1 loops=1)

Given the system expects to get almost 3 million rows when it should be just 1, it seems like a stats problem to me. How is ndistinct on that column compared to reality?

pgsql-general by date:

Previous
From: Ben Chobot
Date:
Subject: Re: 12.3 replicas falling over during WAL redo
Next
From: "Peter J. Holzer"
Date:
Subject: Re: ODBC Driver dsplay name