From fb604780114cea6a83f3f6a60e7f51a7185c932b Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Thu, 29 Mar 2018 16:13:40 -0700 Subject: Improve JIT docs. Author: John Naylor and Andres Freund Discussion: https://postgr.es/m/CAJVSVGUs-VcwSY7-Kx-GQe__8hvWuA4Uhyf3gxoMXeiZqebE9g@mail.gmail.com --- doc/src/sgml/func.sgml | 4 ++-- doc/src/sgml/jit.sgml | 29 +++++++++++++++-------------- 2 files changed, 17 insertions(+), 16 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 9d1772f349a..a11f3abc822 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -15945,8 +15945,8 @@ SELECT * FROM pg_ls_dir('.') WITH ORDINALITY AS t(ls,n); pg_jit_available() boolean - is JIT available in this session (see )? Returns false if is JIT compilation available in this session + (see )? Returns false if is set to false. diff --git a/doc/src/sgml/jit.sgml b/doc/src/sgml/jit.sgml index ece259b5b4b..2a647e8c6c5 100644 --- a/doc/src/sgml/jit.sgml +++ b/doc/src/sgml/jit.sgml @@ -18,7 +18,7 @@ - What is <acronym>JIT</acronym>? + What is <acronym>JIT</acronym> compilation? Just-in-time compilation (JIT) is the process of turning @@ -33,7 +33,7 @@ PostgreSQL has builtin support to perform - JIT using JIT compilation using LLVM when PostgreSQL was built with --with-llvm (see ). @@ -97,15 +97,15 @@ When to <acronym>JIT</acronym>? - JIT is beneficial primarily for long-running CPU bound - queries. Frequently these will be analytical queries. For short queries - the overhead of performing JIT will often be higher than - the time it can save. + JIT compilation is beneficial primarily for long-running + CPU bound queries. Frequently these will be analytical queries. For short + queries the added overhead of performing JIT compilation + will often be higher than the time it can save. - To determine whether JIT is used, the total cost of a - query (see and JIT compilation is used, the total + cost of a query (see and ) is used. @@ -117,9 +117,9 @@ If the planner, based on the above criterion, decided that - JIT is beneficial, two further decisions are + JIT compilation is beneficial, two further decisions are made. Firstly, if the query is more costly than the , GUC expensive optimizations are + linkend="guc-jit-optimize-above-cost"/> GUC, expensive optimizations are used to improve the generated code. Secondly, if the query is more costly than the GUC, short functions and operators used in the query will be inlined. Both of these operations @@ -187,8 +187,9 @@ SET └─────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ As visible here, JIT was used, but inlining and - optimization were not. If , - were lowered, just like , were lowered, just like , that would change. @@ -197,8 +198,8 @@ SET Configuration - determines whether JIT is - enabled or disabled. + determines whether JIT + compilation is enabled or disabled. -- cgit v1.2.3