Re: Trying to understand why a query is filtering when there is a composite index

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Trying to understand why a query is filtering when there is a composite index
Дата
Msg-id CAH2-WzkX7BZYqBTyLPNZxkkM8ovX28N-Pc+-RYM877HZY48NnQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Trying to understand why a query is filtering when there is a composite index  ("Stephen Samuel (Sam)" <sam@sksamuel.com>)
Ответы Re: Trying to understand why a query is filtering when there is a composite index
Список pgsql-performance
On Sun, Aug 18, 2024 at 10:01 PM Stephen Samuel (Sam) <sam@sksamuel.com> wrote:
> Oh as simple as upgrading!
> Ok great, appreciate the quick reply. Will have to wait for AWS to support 17 :)

It is possible to use index quals for both a and b on earlier
versions, with certain restrictions. You might try setting
random_page_cost to a much lower value, to see if that allows the
planner to use such a plan with your real query.

In my experience it's very unlikely that the planner will do that,
though, even when coaxed. At least when there are this many IN()
constants. So you probably really will need to upgrade to 17.

--
Peter Geoghegan



В списке pgsql-performance по дате отправления: