Re: Bad query plan decision when using multiple column index -postgresql uses only first column then filters - Mailing list pgsql-performance

From Michael Lewis
Subject Re: Bad query plan decision when using multiple column index -postgresql uses only first column then filters
Date
Msg-id CAHOFxGpHTpPDAJKj1MtwmJSQ266_0vXwRnJbAbQ=ah73h2r27w@mail.gmail.com
Whole thread Raw
In response to Re: Bad query plan decision when using multiple column index - postgresql uses only first column then filters  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Bad query plan decision when using multiple column index - postgresql uses only first column then filters
Re: Bad query plan decision when using multiple column index -postgresql uses only first column then filters
List pgsql-performance
Does the behavior change with different values of Ver column? I'd be curious of the fraction in the MCVs frequency list in stats indicates that rows with Ver = 92 are rare and therefore the index on only Ver column is sufficient to find the rows quickly. What is reltuples for this table by the way?

I also wonder if the situation may be helped by re-indexing the "index on both columns" to remove any chance of issues on bloat in the index. Which order are the columns by the way? If Ver is first, is there also an index on only id column?. Since you aren't on v12, you don't get to re-index concurrently but I assume you know the work around of create concurrently (different name), drop concurrently (old one), and finally rename new index.

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bad query plan decision when using multiple column index - postgresql uses only first column then filters
Next
From: Cosmin Prund
Date:
Subject: Re: Bad query plan decision when using multiple column index -postgresql uses only first column then filters