Re: bad JIT decision

From: "Andres Freund" <andres(at)anarazel(dot)de>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: bad JIT decision
Date: 2020-07-25 01:51:23
Message-ID: ae6fc841-081e-459a-8204-075c622a0667@beta.fastmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

On Fri, Jul 24, 2020, at 15:32, Scott Ribe wrote:
> > On Jul 24, 2020, at 4:26 PM, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> >
> > It does not really take into account the cost of jitting.
>
> That is what I was missing.
>
> I read about JIT when 12 was pre-release; in re-reading after my post I
> see that it does not attempt to estimate JIT cost. And in thinking
> about it, I realize that would be next to impossible to anticipate how
> expensive LLVM optimizstion was going to be.

We certainly can do better than now.

> In the case where a set of functions is replicated across partitions,
> it would be possible to do them once, then project the cost of the
> copies.

Probably not - JITing functions separately is more expensive than doing them once... The bigger benefit there is to avoid optimizing functions that are likely to be the same.

> Perhaps for PG 14 as better support for the combination of JIT
> optimization and highly-partitioned data ;-)

If I posted a few patches to test / address some of these issue, could you test them with your schema & querries?

Regards,

Andres

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2020-07-25 03:40:08 Re: Row estimates for empty tables
Previous Message David Rowley 2020-07-25 00:37:19 Re: Row estimates for empty tables