3 ms·
> That said, it's important to note that this is unlikely to help much with most OLTP queries just looking up information quickly via indexed data. It'll defin
by anarazel 9y ago
> That said, it's important to note that this is unlikely to help much with most OLTP queries just looking up information quickly via indexed data.
It'll definitely not help for that, at least for now. There's not yet any caching around JITed programs, which makes it completely unsuitable for OLTP. With caching (which requires some larger changes to postgres, which is why this won't be in v11), it's possible to observe some moderate gains.
> I wonder if AWS will incorporate these improvements into Redshift, which is Postgres forked for OLAP use cases where this is far more prevalent. In the past, they haven't done a great job at this (ran into a float bug fixed upstream 5+ years ago), but this may be a big enough value proposition to justify the effort.
I can't imagine them doing that. This uses a whole rewritten expression evaluation engine (introduced in v10), and a large number of infrastructure changes all over the executor (reimplementation of targetlist set returning functions, projection, ...). Not impossible, but certainly not something lightly done.
- tejasmanohar 9y agoThere's not yet any caching around JITed programs, which makes it completely unsuitable for OLTP. Oh, I see. Thanks for clarifying! You mentioned it was merged. Does this mean it'll land in stable soon? Will it be behind a flag, or does the planner just know when to use it? I can't imagine them doing that. RE: Redshift, That's very unfortunate :|. I suppose that's another downside of AWS forking vs. say Citus who moved to the extension model. Though, this would really be perfect for Redshift's use cases... so I guess we'll see. -- This is a step in the right direction regardless, but I'm curious how many people are specifically using pure Postgres for large-scale OLAP models (not including occasionally running one-off queries on their OLTP data).
- anarazel 9y ago> Oh, I see. Thanks for clarifying! You mentioned it was merged. Does this mean it'll land in stable soon? It has been merged into the master branch, which'll become PostgreSQL 11. First beta will be in a few weeks. Release is planned to be in September (early I'd hope). > Will it be behind a flag, or does the planner just know when to use it? There's cost based logic that chooses it, yes. See https://www.postgresql.org/docs/devel/static/jit-decision.html https://www.postgresql.org/docs/devel/static/jit-decision.ht... You can change those if you want to force JIT on/off.