Re: BUG #15486: PG11 jit on 50x slower than jit off

From: Andres Freund <andres(at)anarazel(dot)de>
To: jakub(dot)janecek(at)comgate(dot)cz, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15486: PG11 jit on 50x slower than jit off
Date: 2018-11-05 08:46:07
Message-ID: 20181105084607.6eujnxj3aew3fxoo@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

On 2018-11-05 08:10:17 +0000, PG Bug reporting form wrote:
> Here is some example:
>
> create table t(a int);
> insert into t select generate_series from generate_series(1, 100000);
> analyze t;
> set jit to on;
>
> explain analyze SELECT
> ARRAY( SELECT DISTINCT unnest(array[]::integer[] || t.a) AS unnest) AS
> c1,
> ARRAY( SELECT DISTINCT unnest(((((array[]::integer[]))) || t.a)) AS
> unnest) AS c2
> FROM t
> ;
>

> JIT:
> Functions: 600016

Clearly the problem is that we're generating an absolutely absurd number
of functions. I'll try to look into why soon.

Thanks for the reproducible test case!

I assume this isn't quite a real case, but something real reduced into a
small testcase?

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kamenoqd Zelen 2018-11-05 13:07:05 postgres - CASE evaluates subexpression that is not needed to determine the result
Previous Message PG Bug reporting form 2018-11-05 08:10:17 BUG #15486: PG11 jit on 50x slower than jit off