Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g32qW-0007I1-Ms for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Sep 2018 17:34:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g32qV-0002u7-87 for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Sep 2018 17:34:31 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g32qU-0002u0-Ta for pgsql-hackers@lists.postgresql.org; Thu, 20 Sep 2018 17:34:31 +0000 Received: from tamriel.snowman.net ([96.255.250.162]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g32qR-0005M1-No for pgsql-hackers@lists.postgresql.org; Thu, 20 Sep 2018 17:34:29 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 22FBF5F79C; Thu, 20 Sep 2018 13:34:27 -0400 (EDT) Date: Thu, 20 Sep 2018 13:34:27 -0400 From: Stephen Frost To: Andres Freund Cc: Tom Lane , Amit Khandekar , Andreas Joseph Krogh , Robert Haas , Alvaro Herrera , "Jonathan S. Katz" , PostgreSQL Hackers Subject: Re: Query is over 2x slower with jit=on Message-ID: <20180920173426.GS4184@tamriel.snowman.net> References: <20180910160909.qf3h3ttztvbyyuds@alap3.anarazel.de> <27812.1537221015@sss.pgh.pa.us> <20180919224047.mcdjwis56ywqzhzs@alap3.anarazel.de> <11291.1537414012@sss.pgh.pa.us> <20180920033922.zi6n6vk7ilxaseu3@alap3.anarazel.de> <20180920130721.GM4184@tamriel.snowman.net> <20180920172701.dtiwldlgkkhpvykz@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yckM7CAr5H2WMv0u" Content-Disposition: inline In-Reply-To: <20180920172701.dtiwldlgkkhpvykz@alap3.anarazel.de> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --yckM7CAr5H2WMv0u Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 wan= ts > > > to comment on reformatting this as well, if we're tinkering anyway. > >=20 > > 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. >=20 > 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). > >=20 > > 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.. >=20 > 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 --yckM7CAr5H2WMv0u Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJbo9oiAAoJEO1sijiDR2RVE0cP/2kev9UfbDix+MEL8EFoD6qP d/frLNGK4IN6vn+53g9BkfGHbrLsMj5TcM//DPr6noYRmk8j8ioFF8M9MKloKgGR deyLZS5PZgGvnhHs0wwv1cApmVIWEmfR/ts3wT5ua9HZWNBKAbQHUVr4FH7PsMxt Jzj1vBaS76ucN+sCl7UO7lIONw6nWeOR5Ps8OloOG7zuaceoYzDD1SaQmYRudzlB uqzCMtsO1xmQco982S3VvdL1Vowwc6gD1MQTqxB2N9XNdgQi5KpveFrKmJJmMXH3 /paGjpTGMAiFCxvRlT/bIE5ayUVxb0ksI4DfbNmGTx+k2husk+aX1eB3q96vw3Jv tuJYfFZU6FmOzBtR7MW9YwUN+4ooDttUIzGmldTcyItzV1qVzOrCqs7TenFvm0RP EuH72E7rdGgMSMIusRhqEc2+VZiWhf4z8FrrpiamwJPvY7VlrNlIaiQkq/mRY0HK PgFXI3pR5GL+KfGOr1n3MAwoyYdaNTsQ8vyKKA9amJgssY8z0dbK3SJUxxL+A+yJ lcOnSjMB8UkCRMvcvKa1HlV5VUrgYufNgL7zMqV1bwHkhpS2reuetVCbd1G4PeaI iDOAIRXSOwxXk4sBgZTU+vRLH16QzxmvgwGyNxPqdneh08kagLqT5a2DM2NTLsuS kwbYRxFvz1Q9ss0YlmWg =Cg8W -----END PGP SIGNATURE----- --yckM7CAr5H2WMv0u--