Re: Query is over 2x slower with jit=on
Stephen Frost <sfrost@snowman.net>
From: Stephen Frost <sfrost@snowman.net>
To: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Amit Khandekar <amitdkhan.pg@gmail.com>, Andreas Joseph Krogh <andreas@visena.com>, Robert Haas <robertmhaas@gmail.com>, Alvaro Herrera <alvherre@2ndquadrant.com>, "Jonathan S. Katz" <jkatz@postgresql.org>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-09-20T17:34:27Z
Lists: pgsql-hackers
Greetings, * Andres Freund (andres@anarazel.de) wrote: > On 2018-09-20 09:07:21 -0400, Stephen Frost wrote: > > * Andres Freund (andres@anarazel.de) wrote: > > > FWIW, not that I want to do that now, but at some point it might make > > > sense to sub-divide this into things like number of "expressions", > > > "tuple deforming", "plans", ... Just mentioning that if somebody wants > > > to comment on reformatting this as well, if we're tinkering anyway. > > > > I'd actually think we'd maybe want some kind of 'verbose' mode which > > shows exactly what got JIT'd and what didn't- one of the questions that > > I think people will be asking is "why didn't X get JIT'd?" and I don't > > think that's very easy to figure out currently. > > That seems largely a separate discussion / feature though, right? I'm > not entirely clear what precisely you mean with "why didn't X get > JIT'd?" - currently that's a whole query decision. There are things that can't be JIT'd currently and, I'm thinking anyway, we'd JIT what we are able to and report out what was JIT'd in some fashion which would inform a user what was able to be JIT'd and what wasn't. I'll admit, perhaps this is more of a debugging tool than something that a end-user would find useful, unless there's possibly some way that a user could effect what happens. > > > I'm pretty certain you're right :). There's already arguments around > > > making optimization more gradual (akin to O1,2,3). > > > > That certainly sounds like it'd be very neat to have though I wonder how > > well we'll be able to automatically plan out which optimization level to > > use when.. > > Well, that's not really different from having to decide whether to use > JIT or not. I suspect that once / if we get caching and/or background > JIT compilation, we can get a lot more creative around this. yeah, I definitely understand that, cacheing, in particular, I would expect to play a very large role. Thanks! Stephen
Commits
-
Fix issues around EXPLAIN with JIT.
- e97c4d967ba5 11.0 landed
- c03c1449c092 12.0 landed
-
Collect JIT instrumentation from workers.
- e63441c3f5ca 11.0 landed
- 33001fd7a707 12.0 landed
-
Make EXPLAIN output for JIT compilation more dense.
- 6859bd2632d8 11.0 landed
- 52050ad8ebec 12.0 landed
-
Save/restore SPI's global variables in SPI_connect() and SPI_finish().
- 825f10fbda7a 11.0 cited
-
Rationalize handling of single and double quotes in bootstrap data.
- 55d26ff638f0 11.0 cited