Re: Postgres using the wrong index index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux