dalibo / pev2

Postgres Explain Visualizer 2
https://explain.dalibo.com
PostgreSQL License
2.67k stars 130 forks source link

JIT detailed info #393

Open pgiraud opened 3 years ago

pgiraud commented 3 years ago

We show JIT total time in the UI but without detail. In could be nice to show detailed information.

In plans, we can have info looking like:

JIT:
   Functions: 2
   Options: Inlining false, Optimization false, Expressions true, Deforming true
   Timing: Generation 0.244 ms, Inlining 0.000 ms, Optimization 0.121 ms, Emission 1.397 ms, Total 1.762 ms

In a text plan:

                                                                  QUERY PLAN
----------------------------------------------------------------------------------------------------------------------------------------------
 Insert on tutu  (cost=0.00..100000.00 rows=10000000 width=4) (actual time=11543.790..11543.791 rows=0 loops=1)
   Buffers: shared hit=10088481 read=12 dirtied=44248 written=66480, temp read=17090 written=17090
   WAL: records=10000000 fpi=1 bytes=590001027
   ->  Function Scan on generate_series i  (cost=0.00..100000.00 rows=10000000 width=4) (actual time=826.266..2089.643 rows=10000000 loops=1)
         Buffers: temp read=17090 written=17090
 Planning Time: 0.039 ms
 JIT:
   Functions: 2
   Options: Inlining false, Optimization false, Expressions true, Deforming true
   Timing: Generation 0.153 ms, Inlining 0.000 ms, Optimization 0.068 ms, Emission 0.574 ms, Total 0.795 ms
 Execution Time: 11560.132 ms
(11 lignes)
Krysztophe commented 3 years ago

Different warnings could appear if Generation or Inlining or Optimization are a big part of the total query time.

These are different jit_*_above_cost parameters.