October 2018
Beginner to intermediate
446 pages
11h 31m
English
To show you how the JIT works, we shall compile a simple example. Let's begin by creating a big table – one that contains a lot of data. Remember, JIT compilation is only useful if the operation is sufficiently large. For beginners, 50 million rows should suffice. The following example shows how to populate the table:
jit=# CREATE TABLE t_jit AS SELECT (random()*10000)::int AS x, (random()*100000)::int AS y, (random()*1000000)::int AS z FROM generate_series(1, 50000000) AS id;SELECT 50000000jit=# VACUUM ANALYZE t_jit;VACUUM
In this case, we will use the random function to generate some data. To show you how JIT works and to make execution plans easier to read, you can turn off parallel queries. JIT works fine with parallel ...
Read now
Unlock full access