@@ -35,18 +35,18 @@ SELECT explain_memoize('
35
35
SELECT COUNT(*),AVG(t1.unique1) FROM tenk1 t1
36
36
INNER JOIN tenk1 t2 ON t1.unique1 = t2.twenty
37
37
WHERE t2.unique1 < 1000;', false);
38
- explain_memoize
39
- -------------------------------------------------------------------------------------------
38
+ explain_memoize
39
+ ----------------------------------------------------------------------------------------------
40
40
Aggregate (actual rows=1 loops=N)
41
41
-> Nested Loop (actual rows=1000 loops=N)
42
42
-> Seq Scan on tenk1 t2 (actual rows=1000 loops=N)
43
43
Filter: (unique1 < 1000)
44
44
Rows Removed by Filter: 9000
45
- -> Memoize (actual rows=1 loops=N)
45
+ -> Memoize (actual rows=1.00 loops=N)
46
46
Cache Key: t2.twenty
47
47
Cache Mode: logical
48
48
Hits: 980 Misses: 20 Evictions: Zero Overflows: 0 Memory Usage: NkB
49
- -> Index Only Scan using tenk1_unique1 on tenk1 t1 (actual rows=1 loops=N)
49
+ -> Index Only Scan using tenk1_unique1 on tenk1 t1 (actual rows=1.00 loops=N)
50
50
Index Cond: (unique1 = t2.twenty)
51
51
Heap Fetches: N
52
52
(12 rows)
@@ -66,18 +66,18 @@ SELECT COUNT(*),AVG(t2.unique1) FROM tenk1 t1,
66
66
LATERAL (SELECT t2.unique1 FROM tenk1 t2
67
67
WHERE t1.twenty = t2.unique1 OFFSET 0) t2
68
68
WHERE t1.unique1 < 1000;', false);
69
- explain_memoize
70
- -------------------------------------------------------------------------------------------
69
+ explain_memoize
70
+ ----------------------------------------------------------------------------------------------
71
71
Aggregate (actual rows=1 loops=N)
72
72
-> Nested Loop (actual rows=1000 loops=N)
73
73
-> Seq Scan on tenk1 t1 (actual rows=1000 loops=N)
74
74
Filter: (unique1 < 1000)
75
75
Rows Removed by Filter: 9000
76
- -> Memoize (actual rows=1 loops=N)
76
+ -> Memoize (actual rows=1.00 loops=N)
77
77
Cache Key: t1.twenty
78
78
Cache Mode: binary
79
79
Hits: 980 Misses: 20 Evictions: Zero Overflows: 0 Memory Usage: NkB
80
- -> Index Only Scan using tenk1_unique1 on tenk1 t2 (actual rows=1 loops=N)
80
+ -> Index Only Scan using tenk1_unique1 on tenk1 t2 (actual rows=1.00 loops=N)
81
81
Index Cond: (unique1 = t1.twenty)
82
82
Heap Fetches: N
83
83
(12 rows)
@@ -100,20 +100,20 @@ LATERAL (
100
100
) t2
101
101
ON t1.two = t2.two
102
102
WHERE t1.unique1 < 10;', false);
103
- explain_memoize
104
- ----------------------------------------------------------------------------------------------
103
+ explain_memoize
104
+ -------------------------------------------------------------------------------------------------
105
105
Aggregate (actual rows=1 loops=N)
106
106
-> Nested Loop Left Join (actual rows=20 loops=N)
107
107
-> Index Scan using tenk1_unique1 on tenk1 t1 (actual rows=10 loops=N)
108
108
Index Cond: (unique1 < 10)
109
- -> Memoize (actual rows=2 loops=N)
109
+ -> Memoize (actual rows=2.00 loops=N)
110
110
Cache Key: t1.two
111
111
Cache Mode: binary
112
112
Hits: 8 Misses: 2 Evictions: Zero Overflows: 0 Memory Usage: NkB
113
- -> Subquery Scan on t2 (actual rows=2 loops=N)
113
+ -> Subquery Scan on t2 (actual rows=2.00 loops=N)
114
114
Filter: (t1.two = t2.two)
115
115
Rows Removed by Filter: 2
116
- -> Index Scan using tenk1_unique1 on tenk1 t2_1 (actual rows=4 loops=N)
116
+ -> Index Scan using tenk1_unique1 on tenk1 t2_1 (actual rows=4.00 loops=N)
117
117
Index Cond: (unique1 < 4)
118
118
(13 rows)
119
119
@@ -134,18 +134,18 @@ SELECT explain_memoize('
134
134
SELECT COUNT(*), AVG(t1.twenty) FROM tenk1 t1 LEFT JOIN
135
135
LATERAL (SELECT t1.two+1 AS c1, t2.unique1 AS c2 FROM tenk1 t2) s ON TRUE
136
136
WHERE s.c1 = s.c2 AND t1.unique1 < 1000;', false);
137
- explain_memoize
138
- -------------------------------------------------------------------------------------------
137
+ explain_memoize
138
+ ----------------------------------------------------------------------------------------------
139
139
Aggregate (actual rows=1 loops=N)
140
140
-> Nested Loop (actual rows=1000 loops=N)
141
141
-> Seq Scan on tenk1 t1 (actual rows=1000 loops=N)
142
142
Filter: (unique1 < 1000)
143
143
Rows Removed by Filter: 9000
144
- -> Memoize (actual rows=1 loops=N)
144
+ -> Memoize (actual rows=1.00 loops=N)
145
145
Cache Key: (t1.two + 1)
146
146
Cache Mode: binary
147
147
Hits: 998 Misses: 2 Evictions: Zero Overflows: 0 Memory Usage: NkB
148
- -> Index Only Scan using tenk1_unique1 on tenk1 t2 (actual rows=1 loops=N)
148
+ -> Index Only Scan using tenk1_unique1 on tenk1 t2 (actual rows=1.00 loops=N)
149
149
Filter: ((t1.two + 1) = unique1)
150
150
Rows Removed by Filter: 9999
151
151
Heap Fetches: N
@@ -173,11 +173,11 @@ WHERE s.c1 = s.c2 AND t1.unique1 < 1000;', false);
173
173
-> Seq Scan on tenk1 t1 (actual rows=1000 loops=N)
174
174
Filter: (unique1 < 1000)
175
175
Rows Removed by Filter: 9000
176
- -> Memoize (actual rows=1 loops=N)
176
+ -> Memoize (actual rows=1.00 loops=N)
177
177
Cache Key: t1.two, t1.twenty
178
178
Cache Mode: binary
179
179
Hits: 980 Misses: 20 Evictions: Zero Overflows: 0 Memory Usage: NkB
180
- -> Seq Scan on tenk1 t2 (actual rows=1 loops=N)
180
+ -> Seq Scan on tenk1 t2 (actual rows=1.00 loops=N)
181
181
Filter: ((t1.twenty = unique1) AND (t1.two = two))
182
182
Rows Removed by Filter: 9999
183
183
(12 rows)
@@ -207,15 +207,15 @@ VACUUM ANALYZE expr_key;
207
207
SELECT explain_memoize('
208
208
SELECT * FROM expr_key t1 INNER JOIN expr_key t2
209
209
ON t1.x = t2.t::numeric AND t1.t::numeric = t2.x;', false);
210
- explain_memoize
211
- -------------------------------------------------------------------------------------------
210
+ explain_memoize
211
+ ----------------------------------------------------------------------------------------------
212
212
Nested Loop (actual rows=80 loops=N)
213
213
-> Seq Scan on expr_key t1 (actual rows=40 loops=N)
214
- -> Memoize (actual rows=2 loops=N)
214
+ -> Memoize (actual rows=2.00 loops=N)
215
215
Cache Key: t1.x, (t1.t)::numeric
216
216
Cache Mode: logical
217
217
Hits: 20 Misses: 20 Evictions: Zero Overflows: 0 Memory Usage: NkB
218
- -> Index Only Scan using expr_key_idx_x_t on expr_key t2 (actual rows=2 loops=N)
218
+ -> Index Only Scan using expr_key_idx_x_t on expr_key t2 (actual rows=2.00 loops=N)
219
219
Index Cond: (x = (t1.t)::numeric)
220
220
Filter: (t1.x = (t)::numeric)
221
221
Heap Fetches: N
@@ -232,18 +232,18 @@ SELECT explain_memoize('
232
232
SELECT COUNT(*),AVG(t1.unique1) FROM tenk1 t1
233
233
INNER JOIN tenk1 t2 ON t1.unique1 = t2.thousand
234
234
WHERE t2.unique1 < 1200;', true);
235
- explain_memoize
236
- -------------------------------------------------------------------------------------------
235
+ explain_memoize
236
+ ----------------------------------------------------------------------------------------------
237
237
Aggregate (actual rows=1 loops=N)
238
238
-> Nested Loop (actual rows=1200 loops=N)
239
239
-> Seq Scan on tenk1 t2 (actual rows=1200 loops=N)
240
240
Filter: (unique1 < 1200)
241
241
Rows Removed by Filter: 8800
242
- -> Memoize (actual rows=1 loops=N)
242
+ -> Memoize (actual rows=1.00 loops=N)
243
243
Cache Key: t2.thousand
244
244
Cache Mode: logical
245
245
Hits: N Misses: N Evictions: N Overflows: 0 Memory Usage: NkB
246
- -> Index Only Scan using tenk1_unique1 on tenk1 t1 (actual rows=1 loops=N)
246
+ -> Index Only Scan using tenk1_unique1 on tenk1 t1 (actual rows=1.00 loops=N)
247
247
Index Cond: (unique1 = t2.thousand)
248
248
Heap Fetches: N
249
249
(12 rows)
@@ -261,7 +261,7 @@ SELECT * FROM flt f1 INNER JOIN flt f2 ON f1.f = f2.f;', false);
261
261
Nested Loop (actual rows=4 loops=N)
262
262
-> Index Only Scan using flt_f_idx on flt f1 (actual rows=2 loops=N)
263
263
Heap Fetches: N
264
- -> Memoize (actual rows=2 loops=N)
264
+ -> Memoize (actual rows=2.00 loops=N)
265
265
Cache Key: f1.f
266
266
Cache Mode: logical
267
267
Hits: 1 Misses: 1 Evictions: Zero Overflows: 0 Memory Usage: NkB
@@ -273,16 +273,16 @@ SELECT * FROM flt f1 INNER JOIN flt f2 ON f1.f = f2.f;', false);
273
273
-- Ensure memoize operates in binary mode
274
274
SELECT explain_memoize('
275
275
SELECT * FROM flt f1 INNER JOIN flt f2 ON f1.f >= f2.f;', false);
276
- explain_memoize
277
- -------------------------------------------------------------------------------
276
+ explain_memoize
277
+ ----------------------------------------------------------------------------------
278
278
Nested Loop (actual rows=4 loops=N)
279
279
-> Index Only Scan using flt_f_idx on flt f1 (actual rows=2 loops=N)
280
280
Heap Fetches: N
281
- -> Memoize (actual rows=2 loops=N)
281
+ -> Memoize (actual rows=2.00 loops=N)
282
282
Cache Key: f1.f
283
283
Cache Mode: binary
284
284
Hits: 0 Misses: 2 Evictions: Zero Overflows: 0 Memory Usage: NkB
285
- -> Index Only Scan using flt_f_idx on flt f2 (actual rows=2 loops=N)
285
+ -> Index Only Scan using flt_f_idx on flt f2 (actual rows=2.00 loops=N)
286
286
Index Cond: (f <= f1.f)
287
287
Heap Fetches: N
288
288
(10 rows)
@@ -300,32 +300,32 @@ ANALYZE strtest;
300
300
-- Ensure we get 3 hits and 3 misses
301
301
SELECT explain_memoize('
302
302
SELECT * FROM strtest s1 INNER JOIN strtest s2 ON s1.n >= s2.n;', false);
303
- explain_memoize
304
- ----------------------------------------------------------------------------------
303
+ explain_memoize
304
+ -------------------------------------------------------------------------------------
305
305
Nested Loop (actual rows=24 loops=N)
306
306
-> Seq Scan on strtest s1 (actual rows=6 loops=N)
307
307
Disabled: true
308
- -> Memoize (actual rows=4 loops=N)
308
+ -> Memoize (actual rows=4.00 loops=N)
309
309
Cache Key: s1.n
310
310
Cache Mode: binary
311
311
Hits: 3 Misses: 3 Evictions: Zero Overflows: 0 Memory Usage: NkB
312
- -> Index Scan using strtest_n_idx on strtest s2 (actual rows=4 loops=N)
312
+ -> Index Scan using strtest_n_idx on strtest s2 (actual rows=4.00 loops=N)
313
313
Index Cond: (n <= s1.n)
314
314
(9 rows)
315
315
316
316
-- Ensure we get 3 hits and 3 misses
317
317
SELECT explain_memoize('
318
318
SELECT * FROM strtest s1 INNER JOIN strtest s2 ON s1.t >= s2.t;', false);
319
- explain_memoize
320
- ----------------------------------------------------------------------------------
319
+ explain_memoize
320
+ -------------------------------------------------------------------------------------
321
321
Nested Loop (actual rows=24 loops=N)
322
322
-> Seq Scan on strtest s1 (actual rows=6 loops=N)
323
323
Disabled: true
324
- -> Memoize (actual rows=4 loops=N)
324
+ -> Memoize (actual rows=4.00 loops=N)
325
325
Cache Key: s1.t
326
326
Cache Mode: binary
327
327
Hits: 3 Misses: 3 Evictions: Zero Overflows: 0 Memory Usage: NkB
328
- -> Index Scan using strtest_t_idx on strtest s2 (actual rows=4 loops=N)
328
+ -> Index Scan using strtest_t_idx on strtest s2 (actual rows=4.00 loops=N)
329
329
Index Cond: (t <= s1.t)
330
330
(9 rows)
331
331
@@ -348,7 +348,7 @@ SELECT * FROM prt t1 INNER JOIN prt t2 ON t1.a = t2.a;', false);
348
348
-> Nested Loop (actual rows=16 loops=N)
349
349
-> Index Only Scan using iprt_p1_a on prt_p1 t1_1 (actual rows=4 loops=N)
350
350
Heap Fetches: N
351
- -> Memoize (actual rows=4 loops=N)
351
+ -> Memoize (actual rows=4.00 loops=N)
352
352
Cache Key: t1_1.a
353
353
Cache Mode: logical
354
354
Hits: 3 Misses: 1 Evictions: Zero Overflows: 0 Memory Usage: NkB
@@ -358,7 +358,7 @@ SELECT * FROM prt t1 INNER JOIN prt t2 ON t1.a = t2.a;', false);
358
358
-> Nested Loop (actual rows=16 loops=N)
359
359
-> Index Only Scan using iprt_p2_a on prt_p2 t1_2 (actual rows=4 loops=N)
360
360
Heap Fetches: N
361
- -> Memoize (actual rows=4 loops=N)
361
+ -> Memoize (actual rows=4.00 loops=N)
362
362
Cache Key: t1_2.a
363
363
Cache Mode: logical
364
364
Hits: 3 Misses: 1 Evictions: Zero Overflows: 0 Memory Usage: NkB
@@ -378,7 +378,7 @@ ON t1.a = t2.a;', false);
378
378
Nested Loop (actual rows=16 loops=N)
379
379
-> Index Only Scan using iprt_p1_a on prt_p1 t1 (actual rows=4 loops=N)
380
380
Heap Fetches: N
381
- -> Memoize (actual rows=4 loops=N)
381
+ -> Memoize (actual rows=4.00 loops=N)
382
382
Cache Key: t1.a
383
383
Cache Mode: logical
384
384
Hits: 3 Misses: 1 Evictions: Zero Overflows: 0 Memory Usage: NkB
0 commit comments