|
151 | 151 | is not using <acronym>JIT</acronym>: |
152 | 152 | <screen> |
153 | 153 | =# EXPLAIN ANALYZE SELECT SUM(relpages) FROM pg_class; |
154 | | -┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ |
155 | | -│ QUERY PLAN │ |
156 | | -├─────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ |
157 | | -│ Aggregate (cost=16.27..16.29 rows=1 width=8) (actual time=0.303..0.303 rows=1 loops=1) │ |
158 | | -│ -> Seq Scan on pg_class (cost=0.00..15.42 rows=342 width=4) (actual time=0.017..0.111 rows=356 loops=1) │ |
159 | | -│ Planning Time: 0.116 ms │ |
160 | | -│ Execution Time: 0.365 ms │ |
161 | | -└─────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ |
| 154 | + QUERY PLAN |
| 155 | +------------------------------------------------------------------------------------------------------------- |
| 156 | + Aggregate (cost=16.27..16.29 rows=1 width=8) (actual time=0.303..0.303 rows=1 loops=1) |
| 157 | + -> Seq Scan on pg_class (cost=0.00..15.42 rows=342 width=4) (actual time=0.017..0.111 rows=356 loops=1) |
| 158 | + Planning Time: 0.116 ms |
| 159 | + Execution Time: 0.365 ms |
162 | 160 | (4 rows) |
163 | 161 | </screen> |
164 | 162 | Given the cost of the plan, it is entirely reasonable that no |
|
169 | 167 | =# SET jit_above_cost = 10; |
170 | 168 | SET |
171 | 169 | =# EXPLAIN ANALYZE SELECT SUM(relpages) FROM pg_class; |
172 | | -┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ |
173 | | -│ QUERY PLAN │ |
174 | | -├─────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ |
175 | | -│ Aggregate (cost=16.27..16.29 rows=1 width=8) (actual time=6.049..6.049 rows=1 loops=1) │ |
176 | | -│ -> Seq Scan on pg_class (cost=0.00..15.42 rows=342 width=4) (actual time=0.019..0.052 rows=356 loops=1) │ |
177 | | -│ Planning Time: 0.133 ms │ |
178 | | -│ JIT: │ |
179 | | -│ Functions: 3 │ |
180 | | -│ Generation Time: 1.259 ms │ |
181 | | -│ Inlining: false │ |
182 | | -│ Inlining Time: 0.000 ms │ |
183 | | -│ Optimization: false │ |
184 | | -│ Optimization Time: 0.797 ms │ |
185 | | -│ Emission Time: 5.048 ms │ |
186 | | -│ Execution Time: 7.416 ms │ |
187 | | -└─────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ |
| 170 | + QUERY PLAN |
| 171 | +------------------------------------------------------------------------------------------------------------- |
| 172 | + Aggregate (cost=16.27..16.29 rows=1 width=8) (actual time=6.049..6.049 rows=1 loops=1) |
| 173 | + -> Seq Scan on pg_class (cost=0.00..15.42 rows=342 width=4) (actual time=0.019..0.052 rows=356 loops=1) |
| 174 | + Planning Time: 0.133 ms |
| 175 | + JIT: |
| 176 | + Functions: 3 |
| 177 | + Generation Time: 1.259 ms |
| 178 | + Inlining: false |
| 179 | + Inlining Time: 0.000 ms |
| 180 | + Optimization: false |
| 181 | + Optimization Time: 0.797 ms |
| 182 | + Emission Time: 5.048 ms |
| 183 | + Execution Time: 7.416 ms |
188 | 184 | </screen> |
189 | 185 | As visible here, <acronym>JIT</acronym> was used, but inlining and |
190 | 186 | expensive optimization were not. If <xref |
|
0 commit comments