pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #16136: Bug with cost calculation and JIT application
2+ messages / 2 participants
[nested] [flat]
* BUG #16136: Bug with cost calculation and JIT application
@ 2019-11-25 13:00 PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2019-11-25 13:00 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: alexfilus@gmail.com
The following bug has been logged on the website:
Bug reference: 16136
Logged by: Александр Филиппенко
Email address: alexfilus@gmail.com
PostgreSQL version: 12.1
Operating system: Ubuntu 18.04
Description:
I had very strange behaviour of optimizator.
https://explain.depesz.com/s/GcHL
https://explain.depesz.com/s/sTyG
Both explains are for same query and same data set, but in second case I
turn off JIT. I guess it's because of wrong cost calculation like this
Nested Loop (cost=463.86..5575122.76 rows=652 width=74) (actual
time=9.685..67.713 rows=18 loops=1)
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #16136: Bug with cost calculation and JIT application
@ 2019-11-25 13:27 Tomas Vondra <tomas.vondra@2ndquadrant.com>
parent: PG Bug reporting form <noreply@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Tomas Vondra @ 2019-11-25 13:27 UTC (permalink / raw)
To: alexfilus@gmail.com; pgsql-bugs@lists.postgresql.org
On Mon, Nov 25, 2019 at 01:00:34PM +0000, PG Bug reporting form wrote:
>The following bug has been logged on the website:
>
>Bug reference: 16136
>Logged by: Александр Филиппенко
>Email address: alexfilus@gmail.com
>PostgreSQL version: 12.1
>Operating system: Ubuntu 18.04
>Description:
>
>I had very strange behaviour of optimizator.
>https://explain.depesz.com/s/GcHL
>https://explain.depesz.com/s/sTyG
>Both explains are for same query and same data set, but in second case I
>turn off JIT. I guess it's because of wrong cost calculation like this
>Nested Loop (cost=463.86..5575122.76 rows=652 width=74) (actual
>time=9.685..67.713 rows=18 loops=1)
>
Not sure what exactly you mean by "wrong cost calculation"?
The reason for the long duration with JIT seems pretty clear:
Functions: 237
Options: Inlining true, Optimization true, Expressions true, Deforming true
Timing: Generation 45.190 ms, Inlining 37.452 ms, Optimization 1292.680 ms, Emission 1076.752 ms, Total 2452.074 ms
That is, it took about 2.3s to optimize and emit the JIT code, most
likely because due to a fairly high number of functions. I'm not sure
that's something we can really fix, but there were discussions about
being smarter about optimizations etc.
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-11-25 13:27 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-11-25 13:00 BUG #16136: Bug with cost calculation and JIT application PG Bug reporting form <noreply@postgresql.org>
2019-11-25 13:27 ` Tomas Vondra <tomas.vondra@2ndquadrant.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox