Re: BUG #15486: PG11 jit on 50x slower than jit off - Mailing list pgsql-bugs

From Andres Freund
Subject Re: BUG #15486: PG11 jit on 50x slower than jit off
Date
Msg-id 20181105084607.6eujnxj3aew3fxoo@alap3.anarazel.de
Whole thread Raw
In response to BUG #15486: PG11 jit on 50x slower than jit off  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #15486: PG11 jit on 50x slower than jit off  (Jakub Janeček <jakub.janecek@comgate.cz>)
List 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


pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #15486: PG11 jit on 50x slower than jit off
Next
From: Kamenoqd Zelen
Date:
Subject: postgres - CASE evaluates subexpression that is not needed todetermine the result