pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mladen Gogala <gogala.mladen@gmail.com>
To: pgsql-performance@lists.postgresql.org
Subject: Re: Postgres using the wrong index index
Date: Wed, 11 Aug 2021 17:45:34 -0400
Message-ID: <4db19bdf-ab40-ed68-4897-c9b328272421@gmail.com> (raw)
In-Reply-To: <CAMOk8kq5Hm80EHTtBR1xD0T0aCDmRoE3nxaWtkNSZqS04CLLfg@mail.gmail.com>
References: <CAMOk8kqSPr2sTihQ56Va07TeFRA8E1GsEUfwe4t4LSmj5pjd4A@mail.gmail.com>
	<20210811123856.GE10479@telsasoft.com>
	<CAMOk8kq5Hm80EHTtBR1xD0T0aCDmRoE3nxaWtkNSZqS04CLLfg@mail.gmail.com>

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

view thread (11+ messages)  latest in thread

Message-ID: <4db19bdf-ab40-ed68-4897-c9b328272421@gmail.com>
Permalink:  ../4db19bdf-ab40-ed68-4897-c9b328272421@gmail.com/
Also on:    postgresql.org/message-id/4db19bdf-ab40-ed68-4897-c9b328272421@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: gogala.mladen@gmail.com, pgsql-performance@lists.postgresql.org
  Subject: Re: Postgres using the wrong index index
  In-Reply-To: <4db19bdf-ab40-ed68-4897-c9b328272421@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox