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