Re: Postgres using the wrong index index - Mailing list pgsql-performance

From Mladen Gogala
Subject Re: Postgres using the wrong index index
Date
Msg-id 4db19bdf-ab40-ed68-4897-c9b328272421@gmail.com
Whole thread Raw
In response to Re: Postgres using the wrong index index  (Matt Dupree <matt.dupree@heap.io>)
List 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 the plan if we disable the custom_2 index. It uses the index I expect and it's much faster.

Here's 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

pgsql-performance by date:

Previous
From: Matt Dupree
Date:
Subject: Re: Postgres using the wrong index index
Next
From: Justin Pryzby
Date:
Subject: Re: Postgres using the wrong index index