Re: Postgresql 13 query engine regression

From: Jonathan Chen <jonc(at)chen(dot)org(dot)nz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Postgresql 13 query engine regression
Date: 2021-05-10 22:55:34
Message-ID: CAJuc1zPXwK-M=Yc2Gm_P4KcV8m00L8AYm__-5jsb+VwFFfpxQQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

On Tue, 11 May 2021 at 10:34, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
[...]
> As Adrian noted, you haven't provided enough detail to let anyone
> offer more than generalities.

I'll be providing the output of EXPLAIN (ANALYZE, BUFFERS) in a separate post.

> However, in the spirit of generalities ...
[.. helpful explanation snipped ..]

> Rather than blaming the planner for not being lucky, you should be
> thinking about what you can do to help it out. Can you get rid of
> the additional join to account_move? (Note that the one I'm
> suspecting is extra is the LEFT JOIN, not the IN.) I'd also
> counsel losing the ORDER BY in the sub-select, as that's either
> going to be ignored altogether or force a probably-useless sort,
> not to mention creating an optimization barrier.

Unfortunately, the SQL is generated by Odoo's ORM, and as much as I'd
like to be able to 'help it', their code has too many feature-hooks
for me to easily hack their code ... Odoo has used Postgresql as it s
database since its inception back in 2008. It is just unfortunate that
it has hit this stumbling block with the latest version of the
planner.

Cheers.
--
Jonathan Chen <jonc(at)chen(dot)org(dot)nz>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jonathan Chen 2021-05-10 23:21:43 Re: Postgresql 13 query engine regression
Previous Message Tom Lane 2021-05-10 22:34:30 Re: Postgresql 13 query engine regression