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

Поиск
Список
Период
Сортировка
От Michael Lewis
Тема Re: Bad query plan decision when using multiple column index -postgresql uses only first column then filters
Дата
Msg-id CAHOFxGpHTpPDAJKj1MtwmJSQ266_0vXwRnJbAbQ=ah73h2r27w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Bad query plan decision when using multiple column index - postgresql uses only first column then filters  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Bad query plan decision when using multiple column index - postgresql uses only first column then filters  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Bad query plan decision when using multiple column index -postgresql uses only first column then filters  (Cosmin Prund <cprund@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Bad query plan decision when using multiple column index - postgresql uses only first column then filters
Следующее
От: Cosmin Prund
Дата:
Сообщение: Re: Bad query plan decision when using multiple column index -postgresql uses only first column then filters