Re: Postgres using the wrong index index

From: Mladen Gogala <gogala(dot)mladen(at)gmail(dot)com>
To: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Postgres using the wrong index index
Date: 2021-08-11 21:45:34
Message-ID: 4db19bdf-ab40-ed68-4897-c9b328272421@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

You know that you can use pg_hint_plan extension? That way you don't
have to disable indexes or set session parameters.

Regards

On 8/11/21 3:56 PM, Matt Dupree wrote:
> Thanks for your response, Justin!
>
> Here's <https://explain.depesz.com/s/kCvN> the plan if we disable the
> custom_2 index. It uses the index I expect and it's much faster.
>
> Here's <https://explain.depesz.com/s/KBgG> a plan if we disable index
> scans. It uses both indexes and is much faster.
>
--
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Justin Pryzby 2021-08-12 03:45:11 Re: Postgres using the wrong index index
Previous Message Matt Dupree 2021-08-11 19:56:51 Re: Postgres using the wrong index index