@@ -35,18 +35,18 @@ SELECT explain_memoize('
3535SELECT COUNT(*),AVG(t1.unique1) FROM tenk1 t1
3636INNER JOIN tenk1 t2 ON t1.unique1 = t2.twenty
3737WHERE t2.unique1 < 1000;', false);
38- explain_memoize
39- -------------------------------------------------------------------------------------------
38+ explain_memoize
39+ ----------------------------------------------------------------------------------------------
4040 Aggregate (actual rows=1 loops=N)
4141 -> Nested Loop (actual rows=1000 loops=N)
4242 -> Seq Scan on tenk1 t2 (actual rows=1000 loops=N)
4343 Filter: (unique1 < 1000)
4444 Rows Removed by Filter: 9000
45- -> Memoize (actual rows=1 loops=N)
45+ -> Memoize (actual rows=1.00 loops=N)
4646 Cache Key: t2.twenty
4747 Cache Mode: logical
4848 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)
5050 Index Cond: (unique1 = t2.twenty)
5151 Heap Fetches: N
5252(12 rows)
@@ -66,18 +66,18 @@ SELECT COUNT(*),AVG(t2.unique1) FROM tenk1 t1,
6666LATERAL (SELECT t2.unique1 FROM tenk1 t2
6767 WHERE t1.twenty = t2.unique1 OFFSET 0) t2
6868WHERE t1.unique1 < 1000;', false);
69- explain_memoize
70- -------------------------------------------------------------------------------------------
69+ explain_memoize
70+ ----------------------------------------------------------------------------------------------
7171 Aggregate (actual rows=1 loops=N)
7272 -> Nested Loop (actual rows=1000 loops=N)
7373 -> Seq Scan on tenk1 t1 (actual rows=1000 loops=N)
7474 Filter: (unique1 < 1000)
7575 Rows Removed by Filter: 9000
76- -> Memoize (actual rows=1 loops=N)
76+ -> Memoize (actual rows=1.00 loops=N)
7777 Cache Key: t1.twenty
7878 Cache Mode: binary
7979 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)
8181 Index Cond: (unique1 = t1.twenty)
8282 Heap Fetches: N
8383(12 rows)
@@ -100,20 +100,20 @@ LATERAL (
100100) t2
101101ON t1.two = t2.two
102102WHERE t1.unique1 < 10;', false);
103- explain_memoize
104- ----------------------------------------------------------------------------------------------
103+ explain_memoize
104+ -------------------------------------------------------------------------------------------------
105105 Aggregate (actual rows=1 loops=N)
106106 -> Nested Loop Left Join (actual rows=20 loops=N)
107107 -> Index Scan using tenk1_unique1 on tenk1 t1 (actual rows=10 loops=N)
108108 Index Cond: (unique1 < 10)
109- -> Memoize (actual rows=2 loops=N)
109+ -> Memoize (actual rows=2.00 loops=N)
110110 Cache Key: t1.two
111111 Cache Mode: binary
112112 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)
114114 Filter: (t1.two = t2.two)
115115 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)
117117 Index Cond: (unique1 < 4)
118118(13 rows)
119119
@@ -134,18 +134,18 @@ SELECT explain_memoize('
134134SELECT COUNT(*), AVG(t1.twenty) FROM tenk1 t1 LEFT JOIN
135135LATERAL (SELECT t1.two+1 AS c1, t2.unique1 AS c2 FROM tenk1 t2) s ON TRUE
136136WHERE s.c1 = s.c2 AND t1.unique1 < 1000;', false);
137- explain_memoize
138- -------------------------------------------------------------------------------------------
137+ explain_memoize
138+ ----------------------------------------------------------------------------------------------
139139 Aggregate (actual rows=1 loops=N)
140140 -> Nested Loop (actual rows=1000 loops=N)
141141 -> Seq Scan on tenk1 t1 (actual rows=1000 loops=N)
142142 Filter: (unique1 < 1000)
143143 Rows Removed by Filter: 9000
144- -> Memoize (actual rows=1 loops=N)
144+ -> Memoize (actual rows=1.00 loops=N)
145145 Cache Key: (t1.two + 1)
146146 Cache Mode: binary
147147 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)
149149 Filter: ((t1.two + 1) = unique1)
150150 Rows Removed by Filter: 9999
151151 Heap Fetches: N
@@ -173,11 +173,11 @@ WHERE s.c1 = s.c2 AND t1.unique1 < 1000;', false);
173173 -> Seq Scan on tenk1 t1 (actual rows=1000 loops=N)
174174 Filter: (unique1 < 1000)
175175 Rows Removed by Filter: 9000
176- -> Memoize (actual rows=1 loops=N)
176+ -> Memoize (actual rows=1.00 loops=N)
177177 Cache Key: t1.two, t1.twenty
178178 Cache Mode: binary
179179 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)
181181 Filter: ((t1.twenty = unique1) AND (t1.two = two))
182182 Rows Removed by Filter: 9999
183183(12 rows)
@@ -207,15 +207,15 @@ VACUUM ANALYZE expr_key;
207207SELECT explain_memoize('
208208SELECT * FROM expr_key t1 INNER JOIN expr_key t2
209209ON t1.x = t2.t::numeric AND t1.t::numeric = t2.x;', false);
210- explain_memoize
211- -------------------------------------------------------------------------------------------
210+ explain_memoize
211+ ----------------------------------------------------------------------------------------------
212212 Nested Loop (actual rows=80 loops=N)
213213 -> 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)
215215 Cache Key: t1.x, (t1.t)::numeric
216216 Cache Mode: logical
217217 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)
219219 Index Cond: (x = (t1.t)::numeric)
220220 Filter: (t1.x = (t)::numeric)
221221 Heap Fetches: N
@@ -232,18 +232,18 @@ SELECT explain_memoize('
232232SELECT COUNT(*),AVG(t1.unique1) FROM tenk1 t1
233233INNER JOIN tenk1 t2 ON t1.unique1 = t2.thousand
234234WHERE t2.unique1 < 1200;', true);
235- explain_memoize
236- -------------------------------------------------------------------------------------------
235+ explain_memoize
236+ ----------------------------------------------------------------------------------------------
237237 Aggregate (actual rows=1 loops=N)
238238 -> Nested Loop (actual rows=1200 loops=N)
239239 -> Seq Scan on tenk1 t2 (actual rows=1200 loops=N)
240240 Filter: (unique1 < 1200)
241241 Rows Removed by Filter: 8800
242- -> Memoize (actual rows=1 loops=N)
242+ -> Memoize (actual rows=1.00 loops=N)
243243 Cache Key: t2.thousand
244244 Cache Mode: logical
245245 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)
247247 Index Cond: (unique1 = t2.thousand)
248248 Heap Fetches: N
249249(12 rows)
@@ -261,7 +261,7 @@ SELECT * FROM flt f1 INNER JOIN flt f2 ON f1.f = f2.f;', false);
261261 Nested Loop (actual rows=4 loops=N)
262262 -> Index Only Scan using flt_f_idx on flt f1 (actual rows=2 loops=N)
263263 Heap Fetches: N
264- -> Memoize (actual rows=2 loops=N)
264+ -> Memoize (actual rows=2.00 loops=N)
265265 Cache Key: f1.f
266266 Cache Mode: logical
267267 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);
273273-- Ensure memoize operates in binary mode
274274SELECT explain_memoize('
275275SELECT * FROM flt f1 INNER JOIN flt f2 ON f1.f >= f2.f;', false);
276- explain_memoize
277- -------------------------------------------------------------------------------
276+ explain_memoize
277+ ----------------------------------------------------------------------------------
278278 Nested Loop (actual rows=4 loops=N)
279279 -> Index Only Scan using flt_f_idx on flt f1 (actual rows=2 loops=N)
280280 Heap Fetches: N
281- -> Memoize (actual rows=2 loops=N)
281+ -> Memoize (actual rows=2.00 loops=N)
282282 Cache Key: f1.f
283283 Cache Mode: binary
284284 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)
286286 Index Cond: (f <= f1.f)
287287 Heap Fetches: N
288288(10 rows)
@@ -300,32 +300,32 @@ ANALYZE strtest;
300300-- Ensure we get 3 hits and 3 misses
301301SELECT explain_memoize('
302302SELECT * FROM strtest s1 INNER JOIN strtest s2 ON s1.n >= s2.n;', false);
303- explain_memoize
304- ----------------------------------------------------------------------------------
303+ explain_memoize
304+ -------------------------------------------------------------------------------------
305305 Nested Loop (actual rows=24 loops=N)
306306 -> Seq Scan on strtest s1 (actual rows=6 loops=N)
307307 Disabled: true
308- -> Memoize (actual rows=4 loops=N)
308+ -> Memoize (actual rows=4.00 loops=N)
309309 Cache Key: s1.n
310310 Cache Mode: binary
311311 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)
313313 Index Cond: (n <= s1.n)
314314(9 rows)
315315
316316-- Ensure we get 3 hits and 3 misses
317317SELECT explain_memoize('
318318SELECT * FROM strtest s1 INNER JOIN strtest s2 ON s1.t >= s2.t;', false);
319- explain_memoize
320- ----------------------------------------------------------------------------------
319+ explain_memoize
320+ -------------------------------------------------------------------------------------
321321 Nested Loop (actual rows=24 loops=N)
322322 -> Seq Scan on strtest s1 (actual rows=6 loops=N)
323323 Disabled: true
324- -> Memoize (actual rows=4 loops=N)
324+ -> Memoize (actual rows=4.00 loops=N)
325325 Cache Key: s1.t
326326 Cache Mode: binary
327327 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)
329329 Index Cond: (t <= s1.t)
330330(9 rows)
331331
@@ -348,7 +348,7 @@ SELECT * FROM prt t1 INNER JOIN prt t2 ON t1.a = t2.a;', false);
348348 -> Nested Loop (actual rows=16 loops=N)
349349 -> Index Only Scan using iprt_p1_a on prt_p1 t1_1 (actual rows=4 loops=N)
350350 Heap Fetches: N
351- -> Memoize (actual rows=4 loops=N)
351+ -> Memoize (actual rows=4.00 loops=N)
352352 Cache Key: t1_1.a
353353 Cache Mode: logical
354354 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);
358358 -> Nested Loop (actual rows=16 loops=N)
359359 -> Index Only Scan using iprt_p2_a on prt_p2 t1_2 (actual rows=4 loops=N)
360360 Heap Fetches: N
361- -> Memoize (actual rows=4 loops=N)
361+ -> Memoize (actual rows=4.00 loops=N)
362362 Cache Key: t1_2.a
363363 Cache Mode: logical
364364 Hits: 3 Misses: 1 Evictions: Zero Overflows: 0 Memory Usage: NkB
@@ -378,7 +378,7 @@ ON t1.a = t2.a;', false);
378378 Nested Loop (actual rows=16 loops=N)
379379 -> Index Only Scan using iprt_p1_a on prt_p1 t1 (actual rows=4 loops=N)
380380 Heap Fetches: N
381- -> Memoize (actual rows=4 loops=N)
381+ -> Memoize (actual rows=4.00 loops=N)
382382 Cache Key: t1.a
383383 Cache Mode: logical
384384 Hits: 3 Misses: 1 Evictions: Zero Overflows: 0 Memory Usage: NkB
0 commit comments