2 SET pg_hint_plan.enable_hint TO on;
3 SET pg_hint_plan.debug_print TO on;
4 SET client_min_messages TO LOG;
5 SET search_path TO public;
7 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
9 \! sql/maskout.sh results/ut-R.tmpout
11 ---------------------------------------------------------------------------
12 Merge Join (cost=xxx rows=100 width=xxx)
13 Merge Cond: (t1.c1 = t2.c1)
14 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
15 -> Sort (cost=xxx rows=100 width=xxx)
17 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
21 ---- No. R-1-1 specified pattern of the object name
24 \o results/ut-R.tmpout
26 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
35 \! sql/maskout.sh results/ut-R.tmpout
37 ---------------------------------------------------------------------------
38 Merge Join (cost=xxx rows=1 width=xxx)
39 Merge Cond: (t1.c1 = t2.c1)
40 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
41 -> Sort (cost=xxx rows=100 width=xxx)
43 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
47 \o results/ut-R.tmpout
49 EXPLAIN SELECT * FROM s1.t1 t_1, s1.t2 t_2 WHERE t_1.c1 = t_2.c1;
58 \! sql/maskout.sh results/ut-R.tmpout
60 -------------------------------------------------------------------------------
61 Merge Join (cost=xxx rows=100 width=xxx)
62 Merge Cond: (t_1.c1 = t_2.c1)
63 -> Index Scan using t1_i1 on t1 t_1 (cost=xxx rows=1000 width=xxx)
64 -> Sort (cost=xxx rows=100 width=xxx)
66 -> Seq Scan on t2 t_2 (cost=xxx rows=100 width=xxx)
70 \o results/ut-R.tmpout
72 EXPLAIN SELECT * FROM s1.t1 t_1, s1.t2 t_2 WHERE t_1.c1 = t_2.c1;
81 \! sql/maskout.sh results/ut-R.tmpout
83 -------------------------------------------------------------------------------
84 Merge Join (cost=xxx rows=1 width=xxx)
85 Merge Cond: (t_1.c1 = t_2.c1)
86 -> Index Scan using t1_i1 on t1 t_1 (cost=xxx rows=1000 width=xxx)
87 -> Sort (cost=xxx rows=100 width=xxx)
89 -> Seq Scan on t2 t_2 (cost=xxx rows=100 width=xxx)
93 ---- No. R-1-2 specified schema name in the hint option
96 \o results/ut-R.tmpout
98 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
107 \! sql/maskout.sh results/ut-R.tmpout
109 ---------------------------------------------------------------------------
110 Merge Join (cost=xxx rows=1 width=xxx)
111 Merge Cond: (t1.c1 = t2.c1)
112 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
113 -> Sort (cost=xxx rows=100 width=xxx)
115 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
119 \o results/ut-R.tmpout
120 /*+Rows(s1.t1 s1.t2 #1)*/
121 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
130 \! sql/maskout.sh results/ut-R.tmpout
132 ---------------------------------------------------------------------------
133 Merge Join (cost=xxx rows=100 width=xxx)
134 Merge Cond: (t1.c1 = t2.c1)
135 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
136 -> Sort (cost=xxx rows=100 width=xxx)
138 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
142 ---- No. R-1-3 table doesn't exist in the hint option
145 \o results/ut-R.tmpout
147 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
156 \! sql/maskout.sh results/ut-R.tmpout
158 ---------------------------------------------------------------------------
159 Merge Join (cost=xxx rows=1 width=xxx)
160 Merge Cond: (t1.c1 = t2.c1)
161 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
162 -> Sort (cost=xxx rows=100 width=xxx)
164 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
168 \o results/ut-R.tmpout
170 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
179 \! sql/maskout.sh results/ut-R.tmpout
181 ---------------------------------------------------------------------------
182 Merge Join (cost=xxx rows=100 width=xxx)
183 Merge Cond: (t1.c1 = t2.c1)
184 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
185 -> Sort (cost=xxx rows=100 width=xxx)
187 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
191 ---- No. R-1-4 conflict table name
194 \o results/ut-R.tmpout
196 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
205 \! sql/maskout.sh results/ut-R.tmpout
207 ---------------------------------------------------------------------------
208 Merge Join (cost=xxx rows=1 width=xxx)
209 Merge Cond: (t1.c1 = t2.c1)
210 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
211 -> Sort (cost=xxx rows=100 width=xxx)
213 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
217 \o results/ut-R.tmpout
218 EXPLAIN SELECT * FROM s1.t1, s2.t1 WHERE s1.t1.c1 = s2.t1.c1;
220 \! sql/maskout.sh results/ut-R.tmpout
222 ---------------------------------------------------------------------------
223 Merge Join (cost=xxx rows=100 width=xxx)
224 Merge Cond: (t1.c1 = t1_1.c1)
225 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
226 -> Sort (cost=xxx rows=100 width=xxx)
228 -> Seq Scan on t1 t1_1 (cost=xxx rows=100 width=xxx)
231 \o results/ut-R.tmpout
233 EXPLAIN SELECT * FROM s1.t1, s2.t1 WHERE s1.t1.c1 = s2.t1.c1;
234 INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t1 #1)"
235 DETAIL: Relation name "t1" is ambiguous.
244 \! sql/maskout.sh results/ut-R.tmpout
246 ---------------------------------------------------------------------------
247 Merge Join (cost=xxx rows=100 width=xxx)
248 Merge Cond: (t1.c1 = t1_1.c1)
249 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
250 -> Sort (cost=xxx rows=100 width=xxx)
252 -> Seq Scan on t1 t1_1 (cost=xxx rows=100 width=xxx)
255 \o results/ut-R.tmpout
256 /*+Rows(s1.t1 s2.t1 #1)*/
257 EXPLAIN SELECT * FROM s1.t1, s2.t1 WHERE s1.t1.c1 = s2.t1.c1;
266 \! sql/maskout.sh results/ut-R.tmpout
268 ---------------------------------------------------------------------------
269 Merge Join (cost=xxx rows=100 width=xxx)
270 Merge Cond: (t1.c1 = t1_1.c1)
271 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
272 -> Sort (cost=xxx rows=100 width=xxx)
274 -> Seq Scan on t1 t1_1 (cost=xxx rows=100 width=xxx)
277 \o results/ut-R.tmpout
278 EXPLAIN SELECT * FROM s1.t1, s2.t1 s2t1 WHERE s1.t1.c1 = s2t1.c1;
280 \! sql/maskout.sh results/ut-R.tmpout
282 ---------------------------------------------------------------------------
283 Merge Join (cost=xxx rows=100 width=xxx)
284 Merge Cond: (t1.c1 = s2t1.c1)
285 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
286 -> Sort (cost=xxx rows=100 width=xxx)
288 -> Seq Scan on t1 s2t1 (cost=xxx rows=100 width=xxx)
291 \o results/ut-R.tmpout
292 /*+Rows(t1 s2t1 #1)*/
293 EXPLAIN SELECT * FROM s1.t1, s2.t1 s2t1 WHERE s1.t1.c1 = s2t1.c1;
302 \! sql/maskout.sh results/ut-R.tmpout
304 ---------------------------------------------------------------------------
305 Merge Join (cost=xxx rows=1 width=xxx)
306 Merge Cond: (t1.c1 = s2t1.c1)
307 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
308 -> Sort (cost=xxx rows=100 width=xxx)
310 -> Seq Scan on t1 s2t1 (cost=xxx rows=100 width=xxx)
314 \o results/ut-R.tmpout
315 EXPLAIN SELECT *, (SELECT max(t1.c1) FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1) FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
317 \! sql/maskout.sh results/ut-R.tmpout
319 --------------------------------------------------------------------------------------------------
320 Merge Join (cost=xxx rows=100 width=xxx)
321 Merge Cond: (t1.c1 = t2.c1)
322 InitPlan 1 (returns $0)
323 -> Aggregate (cost=xxx rows=1 width=xxx)
324 -> Merge Join (cost=xxx rows=100 width=xxx)
325 Merge Cond: (t1_1.c1 = t2_1.c1)
326 -> Index Only Scan using t1_i1 on t1 t1_1 (cost=xxx rows=1000 width=xxx)
327 -> Sort (cost=xxx rows=100 width=xxx)
329 -> Seq Scan on t2 t2_1 (cost=xxx rows=100 width=xxx)
330 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
331 -> Sort (cost=xxx rows=100 width=xxx)
333 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
336 \o results/ut-R.tmpout
338 EXPLAIN SELECT *, (SELECT max(t1.c1) FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1) FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
347 \! sql/maskout.sh results/ut-R.tmpout
349 --------------------------------------------------------------------------------------------------
350 Merge Join (cost=xxx rows=100 width=xxx)
351 Merge Cond: (t1.c1 = t2.c1)
352 InitPlan 1 (returns $0)
353 -> Aggregate (cost=xxx rows=1 width=xxx)
354 -> Merge Join (cost=xxx rows=1 width=xxx)
355 Merge Cond: (t1_1.c1 = t2_1.c1)
356 -> Index Only Scan using t1_i1 on t1 t1_1 (cost=xxx rows=1000 width=xxx)
357 -> Sort (cost=xxx rows=100 width=xxx)
359 -> Seq Scan on t2 t2_1 (cost=xxx rows=100 width=xxx)
360 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
361 -> Sort (cost=xxx rows=100 width=xxx)
363 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
366 \o results/ut-R.tmpout
367 /*+Rows(st1 st2 #1)Rows(t1 t2 #1)*/
368 EXPLAIN SELECT *, (SELECT max(st1.c1) FROM s1.t1 st1, s1.t2 st2 WHERE st1.c1 = st2.c1) FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
378 \! sql/maskout.sh results/ut-R.tmpout
380 -------------------------------------------------------------------------------------------------
381 Merge Join (cost=xxx rows=1 width=xxx)
382 Merge Cond: (t1.c1 = t2.c1)
383 InitPlan 1 (returns $0)
384 -> Aggregate (cost=xxx rows=1 width=xxx)
385 -> Merge Join (cost=xxx rows=1 width=xxx)
386 Merge Cond: (st1.c1 = st2.c1)
387 -> Index Only Scan using t1_i1 on t1 st1 (cost=xxx rows=1000 width=xxx)
388 -> Sort (cost=xxx rows=100 width=xxx)
390 -> Seq Scan on t2 st2 (cost=xxx rows=100 width=xxx)
391 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
392 -> Sort (cost=xxx rows=100 width=xxx)
394 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
398 ---- No. R-1-5 conflict table name
401 \o results/ut-R.tmpout
403 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
412 \! sql/maskout.sh results/ut-R.tmpout
414 ---------------------------------------------------------------------------
415 Merge Join (cost=xxx rows=1 width=xxx)
416 Merge Cond: (t1.c1 = t2.c1)
417 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
418 -> Sort (cost=xxx rows=100 width=xxx)
420 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
424 \o results/ut-R.tmpout
426 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
427 INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t1 #1)"
428 DETAIL: Relation name "t1" is duplicated.
437 \! sql/maskout.sh results/ut-R.tmpout
439 ---------------------------------------------------------------------------
440 Merge Join (cost=xxx rows=100 width=xxx)
441 Merge Cond: (t1.c1 = t2.c1)
442 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
443 -> Sort (cost=xxx rows=100 width=xxx)
445 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
449 \o results/ut-R.tmpout
451 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
452 INFO: pg_hint_plan: hint syntax error at or near "(t1 t1)(t2 t2)"
453 DETAIL: Unrecognized hint keyword "".
455 \! sql/maskout.sh results/ut-R.tmpout
457 ---------------------------------------------------------------------------
458 Merge Join (cost=xxx rows=100 width=xxx)
459 Merge Cond: (t1.c1 = t2.c1)
460 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
461 -> Sort (cost=xxx rows=100 width=xxx)
463 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
466 \o results/ut-R.tmpout
467 EXPLAIN SELECT * FROM s1.t1, s1.t2, s1.t3 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1;
469 \! sql/maskout.sh results/ut-R.tmpout
471 ---------------------------------------------------------------------------------
472 Merge Join (cost=xxx rows=100 width=xxx)
473 Merge Cond: (t1.c1 = t2.c1)
474 -> Merge Join (cost=xxx rows=1000 width=xxx)
475 Merge Cond: (t1.c1 = t3.c1)
476 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
477 -> Index Scan using t3_i1 on t3 (cost=xxx rows=1130 width=xxx)
478 -> Sort (cost=xxx rows=100 width=xxx)
480 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
483 \o results/ut-R.tmpout
485 EXPLAIN SELECT * FROM s1.t1, s1.t2, s1.t3, s1.t4 WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
486 INFO: pg_hint_plan: hint syntax error at or near "(t1 t2 t1 t2)"
487 DETAIL: Unrecognized hint keyword "".
489 \! sql/maskout.sh results/ut-R.tmpout
491 ---------------------------------------------------------------------------------------
492 Nested Loop (cost=xxx rows=100 width=xxx)
493 -> Merge Join (cost=xxx rows=100 width=xxx)
494 Merge Cond: (t1.c1 = t2.c1)
495 -> Merge Join (cost=xxx rows=1000 width=xxx)
496 Merge Cond: (t1.c1 = t3.c1)
497 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
498 -> Index Scan using t3_i1 on t3 (cost=xxx rows=1130 width=xxx)
499 -> Sort (cost=xxx rows=100 width=xxx)
501 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
502 -> Index Scan using t4_i1 on t4 (cost=xxx rows=1 width=xxx)
503 Index Cond: (c1 = t1.c1)
507 ---- No. R-1-6 object type for the hint
510 \o results/ut-R.tmpout
512 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
521 \! sql/maskout.sh results/ut-R.tmpout
523 ---------------------------------------------------------------------------
524 Merge Join (cost=xxx rows=1 width=xxx)
525 Merge Cond: (t1.c1 = t2.c1)
526 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
527 -> Sort (cost=xxx rows=100 width=xxx)
529 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
533 \o results/ut-R.tmpout
534 EXPLAIN SELECT * FROM s1.p1 t1, s1.p1 t2 WHERE t1.c1 = t2.c1;
536 \! sql/maskout.sh results/ut-R.tmpout
538 ------------------------------------------------------------------------------
539 Hash Join (cost=xxx rows=301 width=xxx)
540 Hash Cond: (t1.c1 = t2.c1)
541 -> Append (cost=xxx rows=301 width=xxx)
542 -> Seq Scan on p1 t1 (cost=xxx rows=1 width=xxx)
543 -> Seq Scan on p1c1 t1_1 (cost=xxx rows=100 width=xxx)
544 -> Seq Scan on p1c2 t1_2 (cost=xxx rows=100 width=xxx)
545 -> Seq Scan on p1c3 t1_3 (cost=xxx rows=100 width=xxx)
546 -> Hash (cost=xxx rows=301 width=xxx)
547 -> Append (cost=xxx rows=301 width=xxx)
548 -> Seq Scan on p1 t2 (cost=xxx rows=1 width=xxx)
549 -> Seq Scan on p1c1 t2_1 (cost=xxx rows=100 width=xxx)
550 -> Seq Scan on p1c2 t2_2 (cost=xxx rows=100 width=xxx)
551 -> Seq Scan on p1c3 t2_3 (cost=xxx rows=100 width=xxx)
554 \o results/ut-R.tmpout
556 EXPLAIN SELECT * FROM s1.p1 t1, s1.p1 t2 WHERE t1.c1 = t2.c1;
565 \! sql/maskout.sh results/ut-R.tmpout
567 ------------------------------------------------------------------------------
568 Hash Join (cost=xxx rows=1 width=xxx)
569 Hash Cond: (t1.c1 = t2.c1)
570 -> Append (cost=xxx rows=301 width=xxx)
571 -> Seq Scan on p1 t1 (cost=xxx rows=1 width=xxx)
572 -> Seq Scan on p1c1 t1_1 (cost=xxx rows=100 width=xxx)
573 -> Seq Scan on p1c2 t1_2 (cost=xxx rows=100 width=xxx)
574 -> Seq Scan on p1c3 t1_3 (cost=xxx rows=100 width=xxx)
575 -> Hash (cost=xxx rows=301 width=xxx)
576 -> Append (cost=xxx rows=301 width=xxx)
577 -> Seq Scan on p1 t2 (cost=xxx rows=1 width=xxx)
578 -> Seq Scan on p1c1 t2_1 (cost=xxx rows=100 width=xxx)
579 -> Seq Scan on p1c2 t2_2 (cost=xxx rows=100 width=xxx)
580 -> Seq Scan on p1c3 t2_3 (cost=xxx rows=100 width=xxx)
584 \o results/ut-R.tmpout
585 EXPLAIN SELECT * FROM s1.ul1 t1, s1.ul1 t2 WHERE t1.c1 = t2.c1;
587 \! sql/maskout.sh results/ut-R.tmpout
589 -----------------------------------------------------------------------
590 Hash Join (cost=xxx rows=1130 width=xxx)
591 Hash Cond: (t1.c1 = t2.c1)
592 -> Seq Scan on ul1 t1 (cost=xxx rows=1130 width=xxx)
593 -> Hash (cost=xxx rows=1130 width=xxx)
594 -> Seq Scan on ul1 t2 (cost=xxx rows=1130 width=xxx)
597 \o results/ut-R.tmpout
599 EXPLAIN SELECT * FROM s1.ul1 t1, s1.ul1 t2 WHERE t1.c1 = t2.c1;
608 \! sql/maskout.sh results/ut-R.tmpout
610 -----------------------------------------------------------------------
611 Hash Join (cost=xxx rows=1 width=xxx)
612 Hash Cond: (t1.c1 = t2.c1)
613 -> Seq Scan on ul1 t1 (cost=xxx rows=1130 width=xxx)
614 -> Hash (cost=xxx rows=1130 width=xxx)
615 -> Seq Scan on ul1 t2 (cost=xxx rows=1130 width=xxx)
619 CREATE TEMP TABLE tm1 (LIKE s1.t1 INCLUDING ALL);
620 \o results/ut-R.tmpout
621 EXPLAIN SELECT * FROM tm1 t1, tm1 t2 WHERE t1.c1 = t2.c1;
623 \! sql/maskout.sh results/ut-R.tmpout
625 -----------------------------------------------------------------------
626 Hash Join (cost=xxx rows=1130 width=xxx)
627 Hash Cond: (t1.c1 = t2.c1)
628 -> Seq Scan on tm1 t1 (cost=xxx rows=1130 width=xxx)
629 -> Hash (cost=xxx rows=1130 width=xxx)
630 -> Seq Scan on tm1 t2 (cost=xxx rows=1130 width=xxx)
633 \o results/ut-R.tmpout
635 EXPLAIN SELECT * FROM tm1 t1, tm1 t2 WHERE t1.c1 = t2.c1;
644 \! sql/maskout.sh results/ut-R.tmpout
646 -----------------------------------------------------------------------
647 Hash Join (cost=xxx rows=1 width=xxx)
648 Hash Cond: (t1.c1 = t2.c1)
649 -> Seq Scan on tm1 t1 (cost=xxx rows=1130 width=xxx)
650 -> Hash (cost=xxx rows=1130 width=xxx)
651 -> Seq Scan on tm1 t2 (cost=xxx rows=1130 width=xxx)
655 CREATE TEMP TABLE t_pg_class WITH OIDS AS SELECT * from pg_class LIMIT 100;
656 \o results/ut-R.tmpout
657 EXPLAIN SELECT * FROM t_pg_class t1, t_pg_class t2 WHERE t1.oid = t2.oid;
659 \! sql/maskout.sh results/ut-R.tmpout
661 ------------------------------------------------------------------------------
662 Hash Join (cost=xxx rows=310 width=xxx)
663 Hash Cond: (t1.oid = t2.oid)
664 -> Seq Scan on t_pg_class t1 (cost=xxx rows=310 width=xxx)
665 -> Hash (cost=xxx rows=310 width=xxx)
666 -> Seq Scan on t_pg_class t2 (cost=xxx rows=310 width=xxx)
669 \o results/ut-R.tmpout
671 EXPLAIN SELECT * FROM t_pg_class t1, t_pg_class t2 WHERE t1.oid = t2.oid;
680 \! sql/maskout.sh results/ut-R.tmpout
682 ------------------------------------------------------------------------------
683 Hash Join (cost=xxx rows=1 width=xxx)
684 Hash Cond: (t1.oid = t2.oid)
685 -> Seq Scan on t_pg_class t1 (cost=xxx rows=310 width=xxx)
686 -> Hash (cost=xxx rows=310 width=xxx)
687 -> Seq Scan on t_pg_class t2 (cost=xxx rows=310 width=xxx)
693 \o results/ut-R.tmpout
694 EXPLAIN SELECT * FROM s1.f1() t1, s1.f1() t2 WHERE t1.c1 = t2.c1;
696 \! sql/maskout.sh results/ut-R.tmpout
698 -----------------------------------------------------------------
699 Nested Loop (cost=xxx rows=1 width=xxx)
700 Join Filter: (t1.c1 = t2.c1)
701 -> Function Scan on f1 t1 (cost=xxx rows=1 width=xxx)
702 -> Function Scan on f1 t2 (cost=xxx rows=1 width=xxx)
705 \o results/ut-R.tmpout
707 EXPLAIN SELECT * FROM s1.f1() t1, s1.f1() t2 WHERE t1.c1 = t2.c1;
716 \! sql/maskout.sh results/ut-R.tmpout
718 -----------------------------------------------------------------
719 Nested Loop (cost=xxx rows=1 width=xxx)
720 Join Filter: (t1.c1 = t2.c1)
721 -> Function Scan on f1 t1 (cost=xxx rows=1 width=xxx)
722 -> Function Scan on f1 t2 (cost=xxx rows=1 width=xxx)
726 \o results/ut-R.tmpout
727 EXPLAIN SELECT * FROM (VALUES(1,1,1,'1'), (2,2,2,'2'), (3,3,3,'3')) AS t1 (c1, c2, c3, c4), s1.t2 WHERE t1.c1 = t2.c1;
729 \! sql/maskout.sh results/ut-R.tmpout
731 --------------------------------------------------------------------------
732 Hash Join (cost=xxx rows=3 width=xxx)
733 Hash Cond: (t2.c1 = "*VALUES*".column1)
734 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
735 -> Hash (cost=xxx rows=3 width=xxx)
736 -> Values Scan on "*VALUES*" (cost=xxx rows=3 width=xxx)
739 \o results/ut-R.tmpout
741 EXPLAIN SELECT * FROM (VALUES(1,1,1,'1'), (2,2,2,'2'), (3,3,3,'3')) AS t1 (c1, c2, c3, c4), s1.t2 WHERE t1.c1 = t2.c1;
750 \! sql/maskout.sh results/ut-R.tmpout
752 --------------------------------------------------------------------------
753 Hash Join (cost=xxx rows=3 width=xxx)
754 Hash Cond: (t2.c1 = "*VALUES*".column1)
755 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
756 -> Hash (cost=xxx rows=3 width=xxx)
757 -> Values Scan on "*VALUES*" (cost=xxx rows=3 width=xxx)
760 \o results/ut-R.tmpout
761 /*+Rows(*VALUES* t2 #1)*/
762 EXPLAIN SELECT * FROM (VALUES(1,1,1,'1'), (2,2,2,'2'), (3,3,3,'3')) AS t1 (c1, c2, c3, c4), s1.t2 WHERE t1.c1 = t2.c1;
771 \! sql/maskout.sh results/ut-R.tmpout
773 --------------------------------------------------------------------------
774 Hash Join (cost=xxx rows=1 width=xxx)
775 Hash Cond: (t2.c1 = "*VALUES*".column1)
776 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
777 -> Hash (cost=xxx rows=3 width=xxx)
778 -> Values Scan on "*VALUES*" (cost=xxx rows=3 width=xxx)
782 \o results/ut-R.tmpout
783 EXPLAIN WITH c1(c1) AS (SELECT max(t1.c1) FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1) SELECT * FROM s1.t1, c1 WHERE t1.c1 = c1.c1;
785 \! sql/maskout.sh results/ut-R.tmpout
787 --------------------------------------------------------------------------------------------------
788 Nested Loop (cost=xxx rows=1 width=xxx)
790 -> Aggregate (cost=xxx rows=1 width=xxx)
791 -> Merge Join (cost=xxx rows=100 width=xxx)
792 Merge Cond: (t1_1.c1 = t2.c1)
793 -> Index Only Scan using t1_i1 on t1 t1_1 (cost=xxx rows=1000 width=xxx)
794 -> Sort (cost=xxx rows=100 width=xxx)
796 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
797 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
798 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
799 Index Cond: (c1 = c1.c1)
802 \o results/ut-R.tmpout
803 /*+Rows(t1 t2 #1)Rows(t1 c1 +1)*/
804 EXPLAIN WITH c1(c1) AS (SELECT max(t1.c1) FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1) SELECT * FROM s1.t1, c1 WHERE t1.c1 = c1.c1;
814 \! sql/maskout.sh results/ut-R.tmpout
816 --------------------------------------------------------------------------------------------------
817 Nested Loop (cost=xxx rows=2 width=xxx)
819 -> Aggregate (cost=xxx rows=1 width=xxx)
820 -> Merge Join (cost=xxx rows=1 width=xxx)
821 Merge Cond: (t1_1.c1 = t2.c1)
822 -> Index Only Scan using t1_i1 on t1 t1_1 (cost=xxx rows=1000 width=xxx)
823 -> Sort (cost=xxx rows=100 width=xxx)
825 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
826 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
827 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
828 Index Cond: (c1 = c1.c1)
832 \o results/ut-R.tmpout
833 EXPLAIN SELECT * FROM s1.v1 t1, s1.v1 t2 WHERE t1.c1 = t2.c1;
835 \! sql/maskout.sh results/ut-R.tmpout
837 --------------------------------------------------------------------------
838 Hash Join (cost=xxx rows=1000 width=xxx)
839 Hash Cond: (v1t1.c1 = v1t1_1.c1)
840 -> Seq Scan on t1 v1t1 (cost=xxx rows=1000 width=xxx)
841 -> Hash (cost=xxx rows=1000 width=xxx)
842 -> Seq Scan on t1 v1t1_1 (cost=xxx rows=1000 width=xxx)
845 \o results/ut-R.tmpout
847 EXPLAIN SELECT * FROM s1.v1 t1, s1.v1 t2 WHERE t1.c1 = t2.c1;
856 \! sql/maskout.sh results/ut-R.tmpout
858 --------------------------------------------------------------------------
859 Hash Join (cost=xxx rows=1000 width=xxx)
860 Hash Cond: (v1t1.c1 = v1t1_1.c1)
861 -> Seq Scan on t1 v1t1 (cost=xxx rows=1000 width=xxx)
862 -> Hash (cost=xxx rows=1000 width=xxx)
863 -> Seq Scan on t1 v1t1_1 (cost=xxx rows=1000 width=xxx)
866 \o results/ut-R.tmpout
867 /*+Rows(v1t1 v1t1_ #1)*/
868 EXPLAIN SELECT * FROM s1.v1 t1, s1.v1_ t2 WHERE t1.c1 = t2.c1;
877 \! sql/maskout.sh results/ut-R.tmpout
879 -------------------------------------------------------------------------
880 Hash Join (cost=xxx rows=1 width=xxx)
881 Hash Cond: (v1t1.c1 = v1t1_.c1)
882 -> Seq Scan on t1 v1t1 (cost=xxx rows=1000 width=xxx)
883 -> Hash (cost=xxx rows=1000 width=xxx)
884 -> Seq Scan on t1 v1t1_ (cost=xxx rows=1000 width=xxx)
888 \o results/ut-R.tmpout
889 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1 AND t1.c1 = (SELECT max(st1.c1) FROM s1.t1 st1, s1.t2 st2 WHERE st1.c1 = st2.c1);
891 \! sql/maskout.sh results/ut-R.tmpout
893 -------------------------------------------------------------------------------------------------
894 Nested Loop (cost=xxx rows=1 width=xxx)
895 InitPlan 1 (returns $0)
896 -> Aggregate (cost=xxx rows=1 width=xxx)
897 -> Merge Join (cost=xxx rows=100 width=xxx)
898 Merge Cond: (st1.c1 = st2.c1)
899 -> Index Only Scan using t1_i1 on t1 st1 (cost=xxx rows=1000 width=xxx)
900 -> Sort (cost=xxx rows=100 width=xxx)
902 -> Seq Scan on t2 st2 (cost=xxx rows=100 width=xxx)
903 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
904 Index Cond: (c1 = $0)
905 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
909 \o results/ut-R.tmpout
910 /*+Rows(t1 t2 #1)Rows(st1 st2 #1)*/
911 EXPLAIN (COSTS true) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1 AND t1.c1 = (SELECT max(st1.c1) FROM s1.t1 st1, s1.t2 st2 WHERE st1.c1 = st2.c1);
921 \! sql/maskout.sh results/ut-R.tmpout
923 -------------------------------------------------------------------------------------------------
924 Nested Loop (cost=xxx rows=1 width=xxx)
925 InitPlan 1 (returns $0)
926 -> Aggregate (cost=xxx rows=1 width=xxx)
927 -> Merge Join (cost=xxx rows=1 width=xxx)
928 Merge Cond: (st1.c1 = st2.c1)
929 -> Index Only Scan using t1_i1 on t1 st1 (cost=xxx rows=1000 width=xxx)
930 -> Sort (cost=xxx rows=100 width=xxx)
932 -> Seq Scan on t2 st2 (cost=xxx rows=100 width=xxx)
933 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
934 Index Cond: (c1 = $0)
935 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
940 -- There are cases where difference in the measured value and predicted value
941 -- depending upon the version of PostgreSQL
943 \o results/ut-R.tmpout
944 EXPLAIN SELECT * FROM s1.t1, (SELECT t2.c1 FROM s1.t2) st2 WHERE t1.c1 = st2.c1;
946 \! sql/maskout.sh results/ut-R.tmpout
948 ---------------------------------------------------------------------------
949 Merge Join (cost=xxx rows=100 width=xxx)
950 Merge Cond: (t1.c1 = t2.c1)
951 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
952 -> Sort (cost=xxx rows=100 width=xxx)
954 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
957 \o results/ut-R.tmpout
959 EXPLAIN SELECT * FROM s1.t1, (SELECT t2.c1 FROM s1.t2) st2 WHERE t1.c1 = st2.c1;
968 \! sql/maskout.sh results/ut-R.tmpout
970 ---------------------------------------------------------------------------
971 Merge Join (cost=xxx rows=100 width=xxx)
972 Merge Cond: (t1.c1 = t2.c1)
973 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
974 -> Sort (cost=xxx rows=100 width=xxx)
976 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
979 \o results/ut-R.tmpout
981 EXPLAIN SELECT * FROM s1.t1, (SELECT t2.c1 FROM s1.t2) st2 WHERE t1.c1 = st2.c1;
990 \! sql/maskout.sh results/ut-R.tmpout
992 ---------------------------------------------------------------------------
993 Merge Join (cost=xxx rows=1 width=xxx)
994 Merge Cond: (t1.c1 = t2.c1)
995 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
996 -> Sort (cost=xxx rows=100 width=xxx)
998 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
1002 ---- No. R-1-7 specified number of conditions
1005 \o results/ut-R.tmpout
1007 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
1008 INFO: pg_hint_plan: hint syntax error at or near ""
1009 DETAIL: Rows hint requires at least two relations.
1018 \! sql/maskout.sh results/ut-R.tmpout
1020 ---------------------------------------------------------------------------
1021 Merge Join (cost=xxx rows=100 width=xxx)
1022 Merge Cond: (t1.c1 = t2.c1)
1023 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
1024 -> Sort (cost=xxx rows=100 width=xxx)
1026 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
1030 \o results/ut-R.tmpout
1032 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
1033 INFO: pg_hint_plan: hint syntax error at or near "1"
1034 DETAIL: Unrecognized rows value type notation.
1043 \! sql/maskout.sh results/ut-R.tmpout
1045 ---------------------------------------------------------------------------
1046 Merge Join (cost=xxx rows=100 width=xxx)
1047 Merge Cond: (t1.c1 = t2.c1)
1048 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
1049 -> Sort (cost=xxx rows=100 width=xxx)
1051 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
1055 \o results/ut-R.tmpout
1056 /*+Rows(t1 t2 #notrows)*/
1057 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
1058 INFO: pg_hint_plan: hint syntax error at or near "notrows"
1059 DETAIL: Rows hint requires valid number as rows estimation.
1065 Rows(t1 t2 #notrows)
1068 \! sql/maskout.sh results/ut-R.tmpout
1070 ---------------------------------------------------------------------------
1071 Merge Join (cost=xxx rows=100 width=xxx)
1072 Merge Cond: (t1.c1 = t2.c1)
1073 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
1074 -> Sort (cost=xxx rows=100 width=xxx)
1076 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
1080 ---- No. R-2-1 some complexity query blocks
1083 \o results/ut-R.tmpout
1085 Leading(bmt1 bmt2 bmt3 bmt4)
1086 Leading(b1t2 b1t3 b1t4 b1t1)
1087 Leading(b2t3 b2t4 b2t1 b2t2)
1088 MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4)
1089 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
1090 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
1093 SELECT max(bmt1.c1), (
1094 SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1
1096 SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1
1098 FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1
1102 MergeJoin(b1t2 b1t3)
1103 MergeJoin(b2t3 b2t4)
1104 MergeJoin(bmt1 bmt2)
1105 HashJoin(b1t2 b1t3 b1t4)
1106 HashJoin(b2t1 b2t3 b2t4)
1107 HashJoin(bmt1 bmt2 bmt3)
1108 NestLoop(b1t1 b1t2 b1t3 b1t4)
1109 NestLoop(b2t1 b2t2 b2t3 b2t4)
1110 NestLoop(bmt1 bmt2 bmt3 bmt4)
1111 Leading(bmt1 bmt2 bmt3 bmt4)
1112 Leading(b1t2 b1t3 b1t4 b1t1)
1113 Leading(b2t3 b2t4 b2t1 b2t2)
1119 \! sql/maskout.sh results/ut-R.tmpout
1121 --------------------------------------------------------------------------------------------------------------------
1122 Aggregate (cost=xxx rows=1 width=xxx)
1123 InitPlan 1 (returns $1)
1124 -> Aggregate (cost=xxx rows=1 width=xxx)
1125 -> Nested Loop (cost=xxx rows=100 width=xxx)
1126 Join Filter: (b1t2.c1 = b1t1.c1)
1127 -> Hash Join (cost=xxx rows=100 width=xxx)
1128 Hash Cond: (b1t4.c1 = b1t2.c1)
1129 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
1130 -> Hash (cost=xxx rows=100 width=xxx)
1131 -> Merge Join (cost=xxx rows=100 width=xxx)
1132 Merge Cond: (b1t3.c1 = b1t2.c1)
1133 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
1134 -> Sort (cost=xxx rows=100 width=xxx)
1136 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
1137 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
1138 Index Cond: (c1 = b1t3.c1)
1139 InitPlan 2 (returns $3)
1140 -> Aggregate (cost=xxx rows=1 width=xxx)
1141 -> Nested Loop (cost=xxx rows=100 width=xxx)
1142 -> Hash Join (cost=xxx rows=1000 width=xxx)
1143 Hash Cond: (b2t3.c1 = b2t1.c1)
1144 -> Merge Join (cost=xxx rows=1130 width=xxx)
1145 Merge Cond: (b2t3.c1 = b2t4.c1)
1146 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
1147 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
1148 -> Hash (cost=xxx rows=1000 width=xxx)
1149 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
1150 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
1151 Index Cond: (c1 = b2t1.c1)
1152 -> Nested Loop (cost=xxx rows=100 width=xxx)
1153 -> Hash Join (cost=xxx rows=100 width=xxx)
1154 Hash Cond: (bmt3.c1 = bmt1.c1)
1155 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
1156 -> Hash (cost=xxx rows=100 width=xxx)
1157 -> Merge Join (cost=xxx rows=100 width=xxx)
1158 Merge Cond: (bmt1.c1 = bmt2.c1)
1159 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
1160 -> Sort (cost=xxx rows=100 width=xxx)
1162 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
1163 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
1164 Index Cond: (c1 = bmt1.c1)
1167 \o results/ut-R.tmpout
1169 Leading(bmt1 bmt2 bmt3 bmt4)
1170 Leading(b1t2 b1t3 b1t4 b1t1)
1171 Leading(b2t3 b2t4 b2t1 b2t2)
1172 MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4)
1173 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
1174 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
1175 Rows(bmt1 bmt2 #1)Rows(bmt1 bmt2 bmt3 #1)Rows(bmt1 bmt2 bmt3 bmt4 #1)
1176 Rows(b1t2 b1t3 #1)Rows(b1t2 b1t3 b1t4 #1)Rows(b1t2 b1t3 b1t4 b1t1 #1)
1177 Rows(b2t3 b2t4 #1)Rows(b2t3 b2t4 b2t1 #1)Rows(b2t3 b2t4 b2t1 b2t2 #1)
1180 SELECT max(bmt1.c1), (
1181 SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1
1183 SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1)
1184 FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1
1188 MergeJoin(b1t2 b1t3)
1189 MergeJoin(b2t3 b2t4)
1190 MergeJoin(bmt1 bmt2)
1191 HashJoin(b1t2 b1t3 b1t4)
1192 HashJoin(b2t1 b2t3 b2t4)
1193 HashJoin(bmt1 bmt2 bmt3)
1194 NestLoop(b1t1 b1t2 b1t3 b1t4)
1195 NestLoop(b2t1 b2t2 b2t3 b2t4)
1196 NestLoop(bmt1 bmt2 bmt3 bmt4)
1197 Leading(bmt1 bmt2 bmt3 bmt4)
1198 Leading(b1t2 b1t3 b1t4 b1t1)
1199 Leading(b2t3 b2t4 b2t1 b2t2)
1203 Rows(b1t2 b1t3 b1t4 #1)
1204 Rows(b2t1 b2t3 b2t4 #1)
1205 Rows(bmt1 bmt2 bmt3 #1)
1206 Rows(b1t1 b1t2 b1t3 b1t4 #1)
1207 Rows(b2t1 b2t2 b2t3 b2t4 #1)
1208 Rows(bmt1 bmt2 bmt3 bmt4 #1)
1214 \! sql/maskout.sh results/ut-R.tmpout
1216 --------------------------------------------------------------------------------------------------------------------
1217 Aggregate (cost=xxx rows=1 width=xxx)
1218 InitPlan 1 (returns $1)
1219 -> Aggregate (cost=xxx rows=1 width=xxx)
1220 -> Nested Loop (cost=xxx rows=1 width=xxx)
1221 Join Filter: (b1t2.c1 = b1t1.c1)
1222 -> Hash Join (cost=xxx rows=1 width=xxx)
1223 Hash Cond: (b1t4.c1 = b1t2.c1)
1224 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
1225 -> Hash (cost=xxx rows=1 width=xxx)
1226 -> Merge Join (cost=xxx rows=1 width=xxx)
1227 Merge Cond: (b1t3.c1 = b1t2.c1)
1228 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
1229 -> Sort (cost=xxx rows=100 width=xxx)
1231 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
1232 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
1233 Index Cond: (c1 = b1t3.c1)
1234 InitPlan 2 (returns $3)
1235 -> Aggregate (cost=xxx rows=1 width=xxx)
1236 -> Nested Loop (cost=xxx rows=1 width=xxx)
1237 -> Hash Join (cost=xxx rows=1 width=xxx)
1238 Hash Cond: (b2t1.c1 = b2t3.c1)
1239 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
1240 -> Hash (cost=xxx rows=1 width=xxx)
1241 -> Merge Join (cost=xxx rows=1 width=xxx)
1242 Merge Cond: (b2t3.c1 = b2t4.c1)
1243 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
1244 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
1245 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
1246 Index Cond: (c1 = b2t1.c1)
1247 -> Nested Loop (cost=xxx rows=1 width=xxx)
1248 -> Hash Join (cost=xxx rows=1 width=xxx)
1249 Hash Cond: (bmt3.c1 = bmt1.c1)
1250 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
1251 -> Hash (cost=xxx rows=1 width=xxx)
1252 -> Merge Join (cost=xxx rows=1 width=xxx)
1253 Merge Cond: (bmt1.c1 = bmt2.c1)
1254 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
1255 -> Sort (cost=xxx rows=100 width=xxx)
1257 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
1258 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
1259 Index Cond: (c1 = bmt1.c1)
1263 \o results/ut-R.tmpout
1265 Leading(bmt1 bmt2 bmt3 bmt4)
1266 Leading(b1t2 b1t3 b1t4 b1t1)
1267 Leading(b2t3 b2t4 b2t1 b2t2)
1268 Leading(b3t4 b3t1 b3t2 b3t3)
1269 MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4)
1270 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
1271 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
1272 MergeJoin(b3t4 b3t1)HashJoin(b3t4 b3t1 b3t2)NestLoop(b3t1 b3t2 b3t3 b3t4)
1275 SELECT max(bmt1.c1), (
1276 SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1
1278 SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1
1280 SELECT max(b3t1.c1) FROM s1.t1 b3t1, s1.t2 b3t2, s1.t3 b3t3, s1.t4 b3t4 WHERE b3t1.c1 = b3t2.c1 AND b3t1.c1 = b3t3.c1 AND b3t1.c1 = b3t4.c1
1282 FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1
1286 MergeJoin(b1t2 b1t3)
1287 MergeJoin(b2t3 b2t4)
1288 MergeJoin(b3t1 b3t4)
1289 MergeJoin(bmt1 bmt2)
1290 HashJoin(b1t2 b1t3 b1t4)
1291 HashJoin(b2t1 b2t3 b2t4)
1292 HashJoin(b3t1 b3t2 b3t4)
1293 HashJoin(bmt1 bmt2 bmt3)
1294 NestLoop(b1t1 b1t2 b1t3 b1t4)
1295 NestLoop(b2t1 b2t2 b2t3 b2t4)
1296 NestLoop(b3t1 b3t2 b3t3 b3t4)
1297 NestLoop(bmt1 bmt2 bmt3 bmt4)
1298 Leading(bmt1 bmt2 bmt3 bmt4)
1299 Leading(b1t2 b1t3 b1t4 b1t1)
1300 Leading(b2t3 b2t4 b2t1 b2t2)
1301 Leading(b3t4 b3t1 b3t2 b3t3)
1307 \! sql/maskout.sh results/ut-R.tmpout
1309 --------------------------------------------------------------------------------------------------------------------
1310 Aggregate (cost=xxx rows=1 width=xxx)
1311 InitPlan 1 (returns $1)
1312 -> Aggregate (cost=xxx rows=1 width=xxx)
1313 -> Nested Loop (cost=xxx rows=100 width=xxx)
1314 Join Filter: (b1t2.c1 = b1t1.c1)
1315 -> Hash Join (cost=xxx rows=100 width=xxx)
1316 Hash Cond: (b1t4.c1 = b1t2.c1)
1317 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
1318 -> Hash (cost=xxx rows=100 width=xxx)
1319 -> Merge Join (cost=xxx rows=100 width=xxx)
1320 Merge Cond: (b1t3.c1 = b1t2.c1)
1321 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
1322 -> Sort (cost=xxx rows=100 width=xxx)
1324 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
1325 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
1326 Index Cond: (c1 = b1t3.c1)
1327 InitPlan 2 (returns $3)
1328 -> Aggregate (cost=xxx rows=1 width=xxx)
1329 -> Nested Loop (cost=xxx rows=100 width=xxx)
1330 -> Hash Join (cost=xxx rows=1000 width=xxx)
1331 Hash Cond: (b2t3.c1 = b2t1.c1)
1332 -> Merge Join (cost=xxx rows=1130 width=xxx)
1333 Merge Cond: (b2t3.c1 = b2t4.c1)
1334 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
1335 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
1336 -> Hash (cost=xxx rows=1000 width=xxx)
1337 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
1338 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
1339 Index Cond: (c1 = b2t1.c1)
1340 InitPlan 3 (returns $5)
1341 -> Aggregate (cost=xxx rows=1 width=xxx)
1342 -> Nested Loop (cost=xxx rows=100 width=xxx)
1343 -> Hash Join (cost=xxx rows=100 width=xxx)
1344 Hash Cond: (b3t1.c1 = b3t2.c1)
1345 -> Merge Join (cost=xxx rows=1000 width=xxx)
1346 Merge Cond: (b3t1.c1 = b3t4.c1)
1347 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
1348 -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1130 width=xxx)
1349 -> Hash (cost=xxx rows=100 width=xxx)
1350 -> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
1351 -> Index Only Scan using t3_i1 on t3 b3t3 (cost=xxx rows=1 width=xxx)
1352 Index Cond: (c1 = b3t1.c1)
1353 -> Nested Loop (cost=xxx rows=100 width=xxx)
1354 -> Hash Join (cost=xxx rows=100 width=xxx)
1355 Hash Cond: (bmt3.c1 = bmt1.c1)
1356 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
1357 -> Hash (cost=xxx rows=100 width=xxx)
1358 -> Merge Join (cost=xxx rows=100 width=xxx)
1359 Merge Cond: (bmt1.c1 = bmt2.c1)
1360 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
1361 -> Sort (cost=xxx rows=100 width=xxx)
1363 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
1364 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
1365 Index Cond: (c1 = bmt1.c1)
1368 \o results/ut-R.tmpout
1370 Leading(bmt1 bmt2 bmt3 bmt4)
1371 Leading(b1t2 b1t3 b1t4 b1t1)
1372 Leading(b2t3 b2t4 b2t1 b2t2)
1373 Leading(b3t4 b3t1 b3t2 b3t3)
1374 MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4)
1375 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
1376 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
1377 MergeJoin(b3t4 b3t1)HashJoin(b3t4 b3t1 b3t2)NestLoop(b3t1 b3t2 b3t3 b3t4)
1378 Rows(bmt1 bmt2 #1)Rows(bmt1 bmt2 bmt3 #1)Rows(bmt1 bmt2 bmt3 bmt4 #1)
1379 Rows(b1t2 b1t3 #1)Rows(b1t2 b1t3 b1t4 #1)Rows(b1t2 b1t3 b1t4 b1t1 #1)
1380 Rows(b2t3 b2t4 #1)Rows(b2t3 b2t4 b2t1 #1)Rows(b2t3 b2t4 b2t1 b2t2 #1)
1381 Rows(b3t4 b3t1 #1)Rows(b3t4 b3t1 b3t2 #1)Rows(b3t1 b3t2 b3t3 b3t4 #1)
1384 SELECT max(bmt1.c1), (
1385 SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1
1387 SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1
1389 SELECT max(b3t1.c1) FROM s1.t1 b3t1, s1.t2 b3t2, s1.t3 b3t3, s1.t4 b3t4 WHERE b3t1.c1 = b3t2.c1 AND b3t1.c1 = b3t3.c1 AND b3t1.c1 = b3t4.c1
1391 FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1
1395 MergeJoin(b1t2 b1t3)
1396 MergeJoin(b2t3 b2t4)
1397 MergeJoin(b3t1 b3t4)
1398 MergeJoin(bmt1 bmt2)
1399 HashJoin(b1t2 b1t3 b1t4)
1400 HashJoin(b2t1 b2t3 b2t4)
1401 HashJoin(b3t1 b3t2 b3t4)
1402 HashJoin(bmt1 bmt2 bmt3)
1403 NestLoop(b1t1 b1t2 b1t3 b1t4)
1404 NestLoop(b2t1 b2t2 b2t3 b2t4)
1405 NestLoop(b3t1 b3t2 b3t3 b3t4)
1406 NestLoop(bmt1 bmt2 bmt3 bmt4)
1407 Leading(bmt1 bmt2 bmt3 bmt4)
1408 Leading(b1t2 b1t3 b1t4 b1t1)
1409 Leading(b2t3 b2t4 b2t1 b2t2)
1410 Leading(b3t4 b3t1 b3t2 b3t3)
1415 Rows(b1t2 b1t3 b1t4 #1)
1416 Rows(b2t1 b2t3 b2t4 #1)
1417 Rows(b3t1 b3t2 b3t4 #1)
1418 Rows(bmt1 bmt2 bmt3 #1)
1419 Rows(b1t1 b1t2 b1t3 b1t4 #1)
1420 Rows(b2t1 b2t2 b2t3 b2t4 #1)
1421 Rows(b3t1 b3t2 b3t3 b3t4 #1)
1422 Rows(bmt1 bmt2 bmt3 bmt4 #1)
1428 \! sql/maskout.sh results/ut-R.tmpout
1430 --------------------------------------------------------------------------------------------------------------------
1431 Aggregate (cost=xxx rows=1 width=xxx)
1432 InitPlan 1 (returns $1)
1433 -> Aggregate (cost=xxx rows=1 width=xxx)
1434 -> Nested Loop (cost=xxx rows=1 width=xxx)
1435 Join Filter: (b1t2.c1 = b1t1.c1)
1436 -> Hash Join (cost=xxx rows=1 width=xxx)
1437 Hash Cond: (b1t4.c1 = b1t2.c1)
1438 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
1439 -> Hash (cost=xxx rows=1 width=xxx)
1440 -> Merge Join (cost=xxx rows=1 width=xxx)
1441 Merge Cond: (b1t3.c1 = b1t2.c1)
1442 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
1443 -> Sort (cost=xxx rows=100 width=xxx)
1445 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
1446 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
1447 Index Cond: (c1 = b1t3.c1)
1448 InitPlan 2 (returns $3)
1449 -> Aggregate (cost=xxx rows=1 width=xxx)
1450 -> Nested Loop (cost=xxx rows=1 width=xxx)
1451 -> Hash Join (cost=xxx rows=1 width=xxx)
1452 Hash Cond: (b2t1.c1 = b2t3.c1)
1453 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
1454 -> Hash (cost=xxx rows=1 width=xxx)
1455 -> Merge Join (cost=xxx rows=1 width=xxx)
1456 Merge Cond: (b2t3.c1 = b2t4.c1)
1457 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
1458 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
1459 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
1460 Index Cond: (c1 = b2t1.c1)
1461 InitPlan 3 (returns $5)
1462 -> Aggregate (cost=xxx rows=1 width=xxx)
1463 -> Nested Loop (cost=xxx rows=1 width=xxx)
1464 -> Hash Join (cost=xxx rows=1 width=xxx)
1465 Hash Cond: (b3t1.c1 = b3t2.c1)
1466 -> Merge Join (cost=xxx rows=1 width=xxx)
1467 Merge Cond: (b3t1.c1 = b3t4.c1)
1468 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
1469 -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1130 width=xxx)
1470 -> Hash (cost=xxx rows=100 width=xxx)
1471 -> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
1472 -> Index Only Scan using t3_i1 on t3 b3t3 (cost=xxx rows=1 width=xxx)
1473 Index Cond: (c1 = b3t1.c1)
1474 -> Nested Loop (cost=xxx rows=1 width=xxx)
1475 -> Hash Join (cost=xxx rows=1 width=xxx)
1476 Hash Cond: (bmt3.c1 = bmt1.c1)
1477 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
1478 -> Hash (cost=xxx rows=1 width=xxx)
1479 -> Merge Join (cost=xxx rows=1 width=xxx)
1480 Merge Cond: (bmt1.c1 = bmt2.c1)
1481 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
1482 -> Sort (cost=xxx rows=100 width=xxx)
1484 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
1485 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
1486 Index Cond: (c1 = bmt1.c1)
1490 \o results/ut-R.tmpout
1492 Leading(bmt4 bmt3 bmt2 bmt1)
1494 EXPLAIN SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, (SELECT ctid, * FROM s1.t3 bmt3) sbmt3, (SELECT ctid, * FROM s1.t4 bmt4) sbmt4 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = sbmt3.c1 AND bmt1.c1 = sbmt4.c1;
1497 Leading(bmt4 bmt3 bmt2 bmt1)
1503 \! sql/maskout.sh results/ut-R.tmpout
1505 -----------------------------------------------------------------------------------------------
1506 Aggregate (cost=xxx rows=1 width=xxx)
1507 -> Merge Join (cost=xxx rows=100 width=xxx)
1508 Merge Cond: (bmt1.c1 = bmt2.c1)
1509 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
1510 -> Sort (cost=xxx rows=100 width=xxx)
1512 -> Hash Join (cost=xxx rows=100 width=xxx)
1513 Hash Cond: (bmt3.c1 = bmt2.c1)
1514 -> Hash Join (cost=xxx rows=1130 width=xxx)
1515 Hash Cond: (bmt3.c1 = bmt4.c1)
1516 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
1517 -> Hash (cost=xxx rows=1130 width=xxx)
1518 -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
1519 -> Hash (cost=xxx rows=100 width=xxx)
1520 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
1523 \o results/ut-R.tmpout
1525 Leading(bmt4 bmt3 bmt2 bmt1)
1526 Rows(bmt4 bmt3 #1)Rows(bmt4 bmt3 bmt2 #1)Rows(bmt1 bmt2 bmt3 bmt4 #1)
1528 EXPLAIN SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, (SELECT ctid, * FROM s1.t3 bmt3) sbmt3, (SELECT ctid, * FROM s1.t4 bmt4) sbmt4 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = sbmt3.c1 AND bmt1.c1 = sbmt4.c1;
1531 Leading(bmt4 bmt3 bmt2 bmt1)
1533 Rows(bmt2 bmt3 bmt4 #1)
1534 Rows(bmt1 bmt2 bmt3 bmt4 #1)
1540 \! sql/maskout.sh results/ut-R.tmpout
1542 --------------------------------------------------------------------------------------------
1543 Aggregate (cost=xxx rows=1 width=xxx)
1544 -> Nested Loop (cost=xxx rows=1 width=xxx)
1545 Join Filter: (bmt2.c1 = bmt1.c1)
1546 -> Nested Loop (cost=xxx rows=1 width=xxx)
1547 -> Hash Join (cost=xxx rows=1 width=xxx)
1548 Hash Cond: (bmt3.c1 = bmt4.c1)
1549 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
1550 -> Hash (cost=xxx rows=1130 width=xxx)
1551 -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
1552 -> Index Only Scan using t2_i1 on t2 bmt2 (cost=xxx rows=1 width=xxx)
1553 Index Cond: (c1 = bmt3.c1)
1554 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1 width=xxx)
1555 Index Cond: (c1 = bmt3.c1)
1559 \o results/ut-R.tmpout
1561 Leading(bmt4 bmt3 bmt2 bmt1)
1563 EXPLAIN SELECT max(bmt1.c1) FROM s1.t1 bmt1, (SELECT ctid, * FROM s1.t2 bmt2) sbmt2, (SELECT ctid, * FROM s1.t3 bmt3) sbmt3, (SELECT ctid, * FROM s1.t4 bmt4) sbmt4 WHERE bmt1.c1 = sbmt2.c1 AND bmt1.c1 = sbmt3.c1 AND bmt1.c1 = sbmt4.c1;
1566 Leading(bmt4 bmt3 bmt2 bmt1)
1572 \! sql/maskout.sh results/ut-R.tmpout
1574 -----------------------------------------------------------------------------------------------
1575 Aggregate (cost=xxx rows=1 width=xxx)
1576 -> Merge Join (cost=xxx rows=100 width=xxx)
1577 Merge Cond: (bmt1.c1 = bmt2.c1)
1578 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
1579 -> Sort (cost=xxx rows=100 width=xxx)
1581 -> Hash Join (cost=xxx rows=100 width=xxx)
1582 Hash Cond: (bmt3.c1 = bmt2.c1)
1583 -> Hash Join (cost=xxx rows=1130 width=xxx)
1584 Hash Cond: (bmt3.c1 = bmt4.c1)
1585 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
1586 -> Hash (cost=xxx rows=1130 width=xxx)
1587 -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
1588 -> Hash (cost=xxx rows=100 width=xxx)
1589 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
1592 \o results/ut-R.tmpout
1594 Leading(bmt4 bmt3 bmt2 bmt1)
1595 Rows(bmt4 bmt3 #1)Rows(bmt4 bmt3 bmt2 #1)Rows(bmt1 bmt2 bmt3 bmt4 #1)
1597 EXPLAIN SELECT max(bmt1.c1) FROM s1.t1 bmt1, (SELECT ctid, * FROM s1.t2 bmt2) sbmt2, (SELECT ctid, * FROM s1.t3 bmt3) sbmt3, (SELECT ctid, * FROM s1.t4 bmt4) sbmt4 WHERE bmt1.c1 = sbmt2.c1 AND bmt1.c1 = sbmt3.c1 AND bmt1.c1 = sbmt4.c1;
1600 Leading(bmt4 bmt3 bmt2 bmt1)
1602 Rows(bmt2 bmt3 bmt4 #1)
1603 Rows(bmt1 bmt2 bmt3 bmt4 #1)
1609 \! sql/maskout.sh results/ut-R.tmpout
1611 --------------------------------------------------------------------------------------------
1612 Aggregate (cost=xxx rows=1 width=xxx)
1613 -> Nested Loop (cost=xxx rows=1 width=xxx)
1614 Join Filter: (bmt2.c1 = bmt1.c1)
1615 -> Nested Loop (cost=xxx rows=1 width=xxx)
1616 -> Hash Join (cost=xxx rows=1 width=xxx)
1617 Hash Cond: (bmt3.c1 = bmt4.c1)
1618 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
1619 -> Hash (cost=xxx rows=1130 width=xxx)
1620 -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
1621 -> Index Only Scan using t2_i1 on t2 bmt2 (cost=xxx rows=1 width=xxx)
1622 Index Cond: (c1 = bmt3.c1)
1623 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1 width=xxx)
1624 Index Cond: (c1 = bmt3.c1)
1628 \o results/ut-R.tmpout
1630 Leading(bmt1 bmt2 bmt3 bmt4)
1631 Leading(b1t2 b1t3 b1t4 b1t1)
1632 Leading(b2t3 b2t4 b2t1 b2t2)
1633 MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4)
1634 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
1635 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
1638 SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1
1640 SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1
1642 SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1
1646 MergeJoin(b1t2 b1t3)
1647 MergeJoin(b2t3 b2t4)
1648 MergeJoin(bmt1 bmt2)
1649 HashJoin(b1t2 b1t3 b1t4)
1650 HashJoin(b2t1 b2t3 b2t4)
1651 HashJoin(bmt1 bmt2 bmt3)
1652 NestLoop(b1t1 b1t2 b1t3 b1t4)
1653 NestLoop(b2t1 b2t2 b2t3 b2t4)
1654 NestLoop(bmt1 bmt2 bmt3 bmt4)
1655 Leading(bmt1 bmt2 bmt3 bmt4)
1656 Leading(b1t2 b1t3 b1t4 b1t1)
1657 Leading(b2t3 b2t4 b2t1 b2t2)
1663 \! sql/maskout.sh results/ut-R.tmpout
1665 --------------------------------------------------------------------------------------------------------------------
1666 Aggregate (cost=xxx rows=1 width=xxx)
1667 InitPlan 1 (returns $1)
1668 -> Aggregate (cost=xxx rows=1 width=xxx)
1669 -> Nested Loop (cost=xxx rows=100 width=xxx)
1670 Join Filter: (b1t2.c1 = b1t1.c1)
1671 -> Hash Join (cost=xxx rows=100 width=xxx)
1672 Hash Cond: (b1t4.c1 = b1t2.c1)
1673 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
1674 -> Hash (cost=xxx rows=100 width=xxx)
1675 -> Merge Join (cost=xxx rows=100 width=xxx)
1676 Merge Cond: (b1t3.c1 = b1t2.c1)
1677 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
1678 -> Sort (cost=xxx rows=100 width=xxx)
1680 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
1681 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
1682 Index Cond: (c1 = b1t3.c1)
1683 InitPlan 2 (returns $3)
1684 -> Aggregate (cost=xxx rows=1 width=xxx)
1685 -> Nested Loop (cost=xxx rows=100 width=xxx)
1686 -> Hash Join (cost=xxx rows=1000 width=xxx)
1687 Hash Cond: (b2t3.c1 = b2t1.c1)
1688 -> Merge Join (cost=xxx rows=1130 width=xxx)
1689 Merge Cond: (b2t3.c1 = b2t4.c1)
1690 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
1691 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
1692 -> Hash (cost=xxx rows=1000 width=xxx)
1693 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
1694 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
1695 Index Cond: (c1 = b2t1.c1)
1696 -> Nested Loop (cost=xxx rows=100 width=xxx)
1697 -> Hash Join (cost=xxx rows=100 width=xxx)
1698 Hash Cond: (bmt3.c1 = bmt1.c1)
1699 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
1700 -> Hash (cost=xxx rows=100 width=xxx)
1701 -> Merge Join (cost=xxx rows=100 width=xxx)
1702 Merge Cond: (bmt1.c1 = bmt2.c1)
1703 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=998 width=xxx)
1704 Filter: ((c1 <> $1) AND (c1 <> $3))
1705 -> Sort (cost=xxx rows=100 width=xxx)
1707 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
1708 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
1709 Index Cond: (c1 = bmt1.c1)
1712 \o results/ut-R.tmpout
1714 Leading(bmt1 bmt2 bmt3 bmt4)
1715 Leading(b1t2 b1t3 b1t4 b1t1)
1716 Leading(b2t3 b2t4 b2t1 b2t2)
1717 MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4)
1718 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
1719 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
1720 Rows(bmt1 bmt2 #1)Rows(bmt1 bmt2 bmt3 #1)Rows(bmt1 bmt2 bmt3 bmt4 #1)
1721 Rows(b1t2 b1t3 #1)Rows(b1t2 b1t3 b1t4 #1)Rows(b1t2 b1t3 b1t4 b1t1 #1)
1722 Rows(b2t3 b2t4 #1)Rows(b2t3 b2t4 b2t1 #1)Rows(b2t3 b2t4 b2t1 b2t2 #1)
1725 SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1
1727 SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1
1729 SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1
1734 MergeJoin(b1t2 b1t3)
1735 MergeJoin(b2t3 b2t4)
1736 MergeJoin(bmt1 bmt2)
1737 HashJoin(b1t2 b1t3 b1t4)
1738 HashJoin(b2t1 b2t3 b2t4)
1739 HashJoin(bmt1 bmt2 bmt3)
1740 NestLoop(b1t1 b1t2 b1t3 b1t4)
1741 NestLoop(b2t1 b2t2 b2t3 b2t4)
1742 NestLoop(bmt1 bmt2 bmt3 bmt4)
1743 Leading(bmt1 bmt2 bmt3 bmt4)
1744 Leading(b1t2 b1t3 b1t4 b1t1)
1745 Leading(b2t3 b2t4 b2t1 b2t2)
1749 Rows(b1t2 b1t3 b1t4 #1)
1750 Rows(b2t1 b2t3 b2t4 #1)
1751 Rows(bmt1 bmt2 bmt3 #1)
1752 Rows(b1t1 b1t2 b1t3 b1t4 #1)
1753 Rows(b2t1 b2t2 b2t3 b2t4 #1)
1754 Rows(bmt1 bmt2 bmt3 bmt4 #1)
1760 \! sql/maskout.sh results/ut-R.tmpout
1762 --------------------------------------------------------------------------------------------------------------------
1763 Aggregate (cost=xxx rows=1 width=xxx)
1764 InitPlan 1 (returns $1)
1765 -> Aggregate (cost=xxx rows=1 width=xxx)
1766 -> Nested Loop (cost=xxx rows=1 width=xxx)
1767 Join Filter: (b1t2.c1 = b1t1.c1)
1768 -> Hash Join (cost=xxx rows=1 width=xxx)
1769 Hash Cond: (b1t4.c1 = b1t2.c1)
1770 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
1771 -> Hash (cost=xxx rows=1 width=xxx)
1772 -> Merge Join (cost=xxx rows=1 width=xxx)
1773 Merge Cond: (b1t3.c1 = b1t2.c1)
1774 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
1775 -> Sort (cost=xxx rows=100 width=xxx)
1777 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
1778 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
1779 Index Cond: (c1 = b1t3.c1)
1780 InitPlan 2 (returns $3)
1781 -> Aggregate (cost=xxx rows=1 width=xxx)
1782 -> Nested Loop (cost=xxx rows=1 width=xxx)
1783 -> Hash Join (cost=xxx rows=1 width=xxx)
1784 Hash Cond: (b2t1.c1 = b2t3.c1)
1785 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
1786 -> Hash (cost=xxx rows=1 width=xxx)
1787 -> Merge Join (cost=xxx rows=1 width=xxx)
1788 Merge Cond: (b2t3.c1 = b2t4.c1)
1789 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
1790 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
1791 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
1792 Index Cond: (c1 = b2t1.c1)
1793 -> Nested Loop (cost=xxx rows=1 width=xxx)
1794 -> Hash Join (cost=xxx rows=1 width=xxx)
1795 Hash Cond: (bmt3.c1 = bmt1.c1)
1796 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
1797 -> Hash (cost=xxx rows=1 width=xxx)
1798 -> Merge Join (cost=xxx rows=1 width=xxx)
1799 Merge Cond: (bmt1.c1 = bmt2.c1)
1800 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=998 width=xxx)
1801 Filter: ((c1 <> $1) AND (c1 <> $3))
1802 -> Sort (cost=xxx rows=100 width=xxx)
1804 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
1805 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
1806 Index Cond: (c1 = bmt1.c1)
1810 \o results/ut-R.tmpout
1812 Leading(bmt1 bmt2 bmt3 bmt4)
1813 Leading(b1t2 b1t3 b1t4 b1t1)
1814 Leading(b2t3 b2t4 b2t1 b2t2)
1815 Leading(b3t4 b3t1 b3t2 b3t3)
1816 MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4)
1817 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
1818 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
1819 MergeJoin(b3t4 b3t1)HashJoin(b3t4 b3t1 b3t2)NestLoop(b3t1 b3t2 b3t3 b3t4)
1822 SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1
1824 SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1
1826 SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1
1828 SELECT max(b3t1.c1) FROM s1.t1 b3t1, s1.t2 b3t2, s1.t3 b3t3, s1.t4 b3t4 WHERE b3t1.c1 = b3t2.c1 AND b3t1.c1 = b3t3.c1 AND b3t1.c1 = b3t4.c1
1833 MergeJoin(b1t2 b1t3)
1834 MergeJoin(b2t3 b2t4)
1835 MergeJoin(b3t1 b3t4)
1836 MergeJoin(bmt1 bmt2)
1837 HashJoin(b1t2 b1t3 b1t4)
1838 HashJoin(b2t1 b2t3 b2t4)
1839 HashJoin(b3t1 b3t2 b3t4)
1840 HashJoin(bmt1 bmt2 bmt3)
1841 NestLoop(b1t1 b1t2 b1t3 b1t4)
1842 NestLoop(b2t1 b2t2 b2t3 b2t4)
1843 NestLoop(b3t1 b3t2 b3t3 b3t4)
1844 NestLoop(bmt1 bmt2 bmt3 bmt4)
1845 Leading(bmt1 bmt2 bmt3 bmt4)
1846 Leading(b1t2 b1t3 b1t4 b1t1)
1847 Leading(b2t3 b2t4 b2t1 b2t2)
1848 Leading(b3t4 b3t1 b3t2 b3t3)
1854 \! sql/maskout.sh results/ut-R.tmpout
1856 --------------------------------------------------------------------------------------------------------------------
1857 Aggregate (cost=xxx rows=1 width=xxx)
1858 InitPlan 1 (returns $1)
1859 -> Aggregate (cost=xxx rows=1 width=xxx)
1860 -> Nested Loop (cost=xxx rows=100 width=xxx)
1861 Join Filter: (b1t2.c1 = b1t1.c1)
1862 -> Hash Join (cost=xxx rows=100 width=xxx)
1863 Hash Cond: (b1t4.c1 = b1t2.c1)
1864 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
1865 -> Hash (cost=xxx rows=100 width=xxx)
1866 -> Merge Join (cost=xxx rows=100 width=xxx)
1867 Merge Cond: (b1t3.c1 = b1t2.c1)
1868 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
1869 -> Sort (cost=xxx rows=100 width=xxx)
1871 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
1872 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
1873 Index Cond: (c1 = b1t3.c1)
1874 InitPlan 2 (returns $3)
1875 -> Aggregate (cost=xxx rows=1 width=xxx)
1876 -> Nested Loop (cost=xxx rows=100 width=xxx)
1877 -> Hash Join (cost=xxx rows=1000 width=xxx)
1878 Hash Cond: (b2t3.c1 = b2t1.c1)
1879 -> Merge Join (cost=xxx rows=1130 width=xxx)
1880 Merge Cond: (b2t3.c1 = b2t4.c1)
1881 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
1882 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
1883 -> Hash (cost=xxx rows=1000 width=xxx)
1884 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
1885 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
1886 Index Cond: (c1 = b2t1.c1)
1887 InitPlan 3 (returns $5)
1888 -> Aggregate (cost=xxx rows=1 width=xxx)
1889 -> Nested Loop (cost=xxx rows=100 width=xxx)
1890 -> Hash Join (cost=xxx rows=100 width=xxx)
1891 Hash Cond: (b3t1.c1 = b3t2.c1)
1892 -> Merge Join (cost=xxx rows=1000 width=xxx)
1893 Merge Cond: (b3t1.c1 = b3t4.c1)
1894 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
1895 -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1130 width=xxx)
1896 -> Hash (cost=xxx rows=100 width=xxx)
1897 -> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
1898 -> Index Only Scan using t3_i1 on t3 b3t3 (cost=xxx rows=1 width=xxx)
1899 Index Cond: (c1 = b3t1.c1)
1900 -> Nested Loop (cost=xxx rows=100 width=xxx)
1901 -> Hash Join (cost=xxx rows=100 width=xxx)
1902 Hash Cond: (bmt3.c1 = bmt1.c1)
1903 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
1904 -> Hash (cost=xxx rows=100 width=xxx)
1905 -> Merge Join (cost=xxx rows=100 width=xxx)
1906 Merge Cond: (bmt1.c1 = bmt2.c1)
1907 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=997 width=xxx)
1908 Filter: ((c1 <> $1) AND (c1 <> $3) AND (c1 <> $5))
1909 -> Sort (cost=xxx rows=100 width=xxx)
1911 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
1912 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
1913 Index Cond: (c1 = bmt1.c1)
1916 \o results/ut-R.tmpout
1918 Leading(bmt1 bmt2 bmt3 bmt4)
1919 Leading(b1t2 b1t3 b1t4 b1t1)
1920 Leading(b2t3 b2t4 b2t1 b2t2)
1921 Leading(b3t4 b3t1 b3t2 b3t3)
1922 MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4)
1923 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
1924 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
1925 MergeJoin(b3t4 b3t1)HashJoin(b3t4 b3t1 b3t2)NestLoop(b3t1 b3t2 b3t3 b3t4)
1926 Rows(bmt1 bmt2 #1)Rows(bmt1 bmt2 bmt3 #1)Rows(bmt1 bmt2 bmt3 bmt4 #1)
1927 Rows(b1t2 b1t3 #1)Rows(b1t2 b1t3 b1t4 #1)Rows(b1t2 b1t3 b1t4 b1t1 #1)
1928 Rows(b2t3 b2t4 #1)Rows(b2t3 b2t4 b2t1 #1)Rows(b2t3 b2t4 b2t1 b2t2 #1)
1929 Rows(b3t4 b3t1 #1)Rows(b3t4 b3t1 b3t2 #1)Rows(b3t1 b3t2 b3t3 b3t4 #1)
1932 SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1
1934 SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1
1936 SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1
1938 SELECT max(b3t1.c1) FROM s1.t1 b3t1, s1.t2 b3t2, s1.t3 b3t3, s1.t4 b3t4 WHERE b3t1.c1 = b3t2.c1 AND b3t1.c1 = b3t3.c1 AND b3t1.c1 = b3t4.c1
1943 MergeJoin(b1t2 b1t3)
1944 MergeJoin(b2t3 b2t4)
1945 MergeJoin(b3t1 b3t4)
1946 MergeJoin(bmt1 bmt2)
1947 HashJoin(b1t2 b1t3 b1t4)
1948 HashJoin(b2t1 b2t3 b2t4)
1949 HashJoin(b3t1 b3t2 b3t4)
1950 HashJoin(bmt1 bmt2 bmt3)
1951 NestLoop(b1t1 b1t2 b1t3 b1t4)
1952 NestLoop(b2t1 b2t2 b2t3 b2t4)
1953 NestLoop(b3t1 b3t2 b3t3 b3t4)
1954 NestLoop(bmt1 bmt2 bmt3 bmt4)
1955 Leading(bmt1 bmt2 bmt3 bmt4)
1956 Leading(b1t2 b1t3 b1t4 b1t1)
1957 Leading(b2t3 b2t4 b2t1 b2t2)
1958 Leading(b3t4 b3t1 b3t2 b3t3)
1963 Rows(b1t2 b1t3 b1t4 #1)
1964 Rows(b2t1 b2t3 b2t4 #1)
1965 Rows(b3t1 b3t2 b3t4 #1)
1966 Rows(bmt1 bmt2 bmt3 #1)
1967 Rows(b1t1 b1t2 b1t3 b1t4 #1)
1968 Rows(b2t1 b2t2 b2t3 b2t4 #1)
1969 Rows(b3t1 b3t2 b3t3 b3t4 #1)
1970 Rows(bmt1 bmt2 bmt3 bmt4 #1)
1976 \! sql/maskout.sh results/ut-R.tmpout
1978 --------------------------------------------------------------------------------------------------------------------
1979 Aggregate (cost=xxx rows=1 width=xxx)
1980 InitPlan 1 (returns $1)
1981 -> Aggregate (cost=xxx rows=1 width=xxx)
1982 -> Nested Loop (cost=xxx rows=1 width=xxx)
1983 Join Filter: (b1t2.c1 = b1t1.c1)
1984 -> Hash Join (cost=xxx rows=1 width=xxx)
1985 Hash Cond: (b1t4.c1 = b1t2.c1)
1986 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
1987 -> Hash (cost=xxx rows=1 width=xxx)
1988 -> Merge Join (cost=xxx rows=1 width=xxx)
1989 Merge Cond: (b1t3.c1 = b1t2.c1)
1990 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
1991 -> Sort (cost=xxx rows=100 width=xxx)
1993 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
1994 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
1995 Index Cond: (c1 = b1t3.c1)
1996 InitPlan 2 (returns $3)
1997 -> Aggregate (cost=xxx rows=1 width=xxx)
1998 -> Nested Loop (cost=xxx rows=1 width=xxx)
1999 -> Hash Join (cost=xxx rows=1 width=xxx)
2000 Hash Cond: (b2t1.c1 = b2t3.c1)
2001 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
2002 -> Hash (cost=xxx rows=1 width=xxx)
2003 -> Merge Join (cost=xxx rows=1 width=xxx)
2004 Merge Cond: (b2t3.c1 = b2t4.c1)
2005 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
2006 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
2007 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
2008 Index Cond: (c1 = b2t1.c1)
2009 InitPlan 3 (returns $5)
2010 -> Aggregate (cost=xxx rows=1 width=xxx)
2011 -> Nested Loop (cost=xxx rows=1 width=xxx)
2012 -> Hash Join (cost=xxx rows=1 width=xxx)
2013 Hash Cond: (b3t1.c1 = b3t2.c1)
2014 -> Merge Join (cost=xxx rows=1 width=xxx)
2015 Merge Cond: (b3t1.c1 = b3t4.c1)
2016 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
2017 -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1130 width=xxx)
2018 -> Hash (cost=xxx rows=100 width=xxx)
2019 -> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
2020 -> Index Only Scan using t3_i1 on t3 b3t3 (cost=xxx rows=1 width=xxx)
2021 Index Cond: (c1 = b3t1.c1)
2022 -> Nested Loop (cost=xxx rows=1 width=xxx)
2023 -> Hash Join (cost=xxx rows=1 width=xxx)
2024 Hash Cond: (bmt3.c1 = bmt1.c1)
2025 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
2026 -> Hash (cost=xxx rows=1 width=xxx)
2027 -> Merge Join (cost=xxx rows=1 width=xxx)
2028 Merge Cond: (bmt1.c1 = bmt2.c1)
2029 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=997 width=xxx)
2030 Filter: ((c1 <> $1) AND (c1 <> $3) AND (c1 <> $5))
2031 -> Sort (cost=xxx rows=100 width=xxx)
2033 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
2034 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
2035 Index Cond: (c1 = bmt1.c1)
2039 \o results/ut-R.tmpout
2041 Leading(c2 c1 bmt1 bmt2 bmt3 bmt4)
2042 Leading(b1t2 b1t3 b1t4 b1t1)
2043 Leading(b2t3 b2t4 b2t1 b2t2)
2044 MergeJoin(c2 c1)HashJoin(c2 c1 bmt1)NestLoop(c2 c1 bmt1 bmt2)MergeJoin(c2 c1 bmt1 bmt2 bmt3)HashJoin(c2 c1 bmt1 bmt2 bmt3 bmt4)
2045 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
2046 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
2050 SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1
2053 SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1
2055 SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4
2057 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1
2063 MergeJoin(b1t2 b1t3)
2064 MergeJoin(b2t3 b2t4)
2066 HashJoin(b1t2 b1t3 b1t4)
2067 HashJoin(b2t1 b2t3 b2t4)
2068 HashJoin(bmt1 c1 c2)
2069 NestLoop(b1t1 b1t2 b1t3 b1t4)
2070 NestLoop(b2t1 b2t2 b2t3 b2t4)
2071 NestLoop(bmt1 bmt2 c1 c2)
2072 MergeJoin(bmt1 bmt2 bmt3 c1 c2)
2073 HashJoin(bmt1 bmt2 bmt3 bmt4 c1 c2)
2074 Leading(c2 c1 bmt1 bmt2 bmt3 bmt4)
2075 Leading(b1t2 b1t3 b1t4 b1t1)
2076 Leading(b2t3 b2t4 b2t1 b2t2)
2082 \! sql/maskout.sh results/ut-R.tmpout
2084 --------------------------------------------------------------------------------------------------------------------
2085 Aggregate (cost=xxx rows=1 width=xxx)
2087 -> Aggregate (cost=xxx rows=1 width=xxx)
2088 -> Nested Loop (cost=xxx rows=100 width=xxx)
2089 Join Filter: (b1t2.c1 = b1t1.c1)
2090 -> Hash Join (cost=xxx rows=100 width=xxx)
2091 Hash Cond: (b1t4.c1 = b1t2.c1)
2092 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
2093 -> Hash (cost=xxx rows=100 width=xxx)
2094 -> Merge Join (cost=xxx rows=100 width=xxx)
2095 Merge Cond: (b1t3.c1 = b1t2.c1)
2096 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
2097 -> Sort (cost=xxx rows=100 width=xxx)
2099 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
2100 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
2101 Index Cond: (c1 = b1t3.c1)
2103 -> Aggregate (cost=xxx rows=1 width=xxx)
2104 -> Nested Loop (cost=xxx rows=100 width=xxx)
2105 -> Hash Join (cost=xxx rows=1000 width=xxx)
2106 Hash Cond: (b2t3.c1 = b2t1.c1)
2107 -> Merge Join (cost=xxx rows=1130 width=xxx)
2108 Merge Cond: (b2t3.c1 = b2t4.c1)
2109 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
2110 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
2111 -> Hash (cost=xxx rows=1000 width=xxx)
2112 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
2113 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
2114 Index Cond: (c1 = b2t1.c1)
2115 -> Hash Join (cost=xxx rows=1 width=xxx)
2116 Hash Cond: (bmt4.c1 = bmt1.c1)
2117 -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
2118 -> Hash (cost=xxx rows=1 width=xxx)
2119 -> Merge Join (cost=xxx rows=1 width=xxx)
2120 Merge Cond: (bmt3.c1 = bmt1.c1)
2121 -> Index Only Scan using t3_i1 on t3 bmt3 (cost=xxx rows=1130 width=xxx)
2122 -> Sort (cost=xxx rows=1 width=xxx)
2124 -> Nested Loop (cost=xxx rows=1 width=xxx)
2125 -> Hash Join (cost=xxx rows=1 width=xxx)
2126 Hash Cond: (bmt1.c1 = c1.c1)
2127 -> Seq Scan on t1 bmt1 (cost=xxx rows=1000 width=xxx)
2128 -> Hash (cost=xxx rows=1 width=xxx)
2129 -> Merge Join (cost=xxx rows=1 width=xxx)
2130 Merge Cond: (c1.c1 = c2.c1)
2131 -> Sort (cost=xxx rows=1 width=xxx)
2133 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
2134 -> Sort (cost=xxx rows=1 width=xxx)
2136 -> CTE Scan on c2 (cost=xxx rows=1 width=xxx)
2137 -> Index Only Scan using t2_i1 on t2 bmt2 (cost=xxx rows=1 width=xxx)
2138 Index Cond: (c1 = bmt1.c1)
2141 \o results/ut-R.tmpout
2143 Leading(c2 c1 bmt1 bmt2 bmt3 bmt4)
2144 Leading(b1t2 b1t3 b1t4 b1t1)
2145 Leading(b2t3 b2t4 b2t1 b2t2)
2146 MergeJoin(c2 c1)HashJoin(c2 c1 bmt1)NestLoop(c2 c1 bmt1 bmt2)MergeJoin(c2 c1 bmt1 bmt2 bmt3)HashJoin(c2 c1 bmt1 bmt2 bmt3 bmt4)
2147 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
2148 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
2149 Rows(c2 c1 #1)Rows(c2 c1 bmt1 #1)Rows(c2 c1 bmt1 bmt2 #1)Rows(c2 c1 bmt1 bmt2 bmt3 #1)Rows(c2 c1 bmt1 bmt2 bmt3 bmt4 #1)
2150 Rows(b1t2 b1t3 #1)Rows(b1t2 b1t3 b1t4 #1)Rows(b1t2 b1t3 b1t4 b1t1 #1)
2151 Rows(b2t3 b2t4 #1)Rows(b2t3 b2t4 b2t1 #1)Rows(b2t3 b2t4 b2t1 b2t2 #1)
2155 SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1
2158 SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1
2160 SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4
2162 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1
2164 AND bmt1.c1 = c2.c1;
2167 MergeJoin(b1t2 b1t3)
2168 MergeJoin(b2t3 b2t4)
2170 HashJoin(b1t2 b1t3 b1t4)
2171 HashJoin(b2t1 b2t3 b2t4)
2172 HashJoin(bmt1 c1 c2)
2173 NestLoop(b1t1 b1t2 b1t3 b1t4)
2174 NestLoop(b2t1 b2t2 b2t3 b2t4)
2175 NestLoop(bmt1 bmt2 c1 c2)
2176 MergeJoin(bmt1 bmt2 bmt3 c1 c2)
2177 HashJoin(bmt1 bmt2 bmt3 bmt4 c1 c2)
2178 Leading(c2 c1 bmt1 bmt2 bmt3 bmt4)
2179 Leading(b1t2 b1t3 b1t4 b1t1)
2180 Leading(b2t3 b2t4 b2t1 b2t2)
2184 Rows(b1t2 b1t3 b1t4 #1)
2185 Rows(b2t1 b2t3 b2t4 #1)
2187 Rows(b1t1 b1t2 b1t3 b1t4 #1)
2188 Rows(b2t1 b2t2 b2t3 b2t4 #1)
2189 Rows(bmt1 bmt2 c1 c2 #1)
2190 Rows(bmt1 bmt2 bmt3 c1 c2 #1)
2191 Rows(bmt1 bmt2 bmt3 bmt4 c1 c2 #1)
2197 \! sql/maskout.sh results/ut-R.tmpout
2199 --------------------------------------------------------------------------------------------------------------------
2200 Aggregate (cost=xxx rows=1 width=xxx)
2202 -> Aggregate (cost=xxx rows=1 width=xxx)
2203 -> Nested Loop (cost=xxx rows=1 width=xxx)
2204 Join Filter: (b1t2.c1 = b1t1.c1)
2205 -> Hash Join (cost=xxx rows=1 width=xxx)
2206 Hash Cond: (b1t4.c1 = b1t2.c1)
2207 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
2208 -> Hash (cost=xxx rows=1 width=xxx)
2209 -> Merge Join (cost=xxx rows=1 width=xxx)
2210 Merge Cond: (b1t3.c1 = b1t2.c1)
2211 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
2212 -> Sort (cost=xxx rows=100 width=xxx)
2214 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
2215 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
2216 Index Cond: (c1 = b1t3.c1)
2218 -> Aggregate (cost=xxx rows=1 width=xxx)
2219 -> Nested Loop (cost=xxx rows=1 width=xxx)
2220 -> Hash Join (cost=xxx rows=1 width=xxx)
2221 Hash Cond: (b2t1.c1 = b2t3.c1)
2222 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
2223 -> Hash (cost=xxx rows=1 width=xxx)
2224 -> Merge Join (cost=xxx rows=1 width=xxx)
2225 Merge Cond: (b2t3.c1 = b2t4.c1)
2226 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
2227 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
2228 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
2229 Index Cond: (c1 = b2t1.c1)
2230 -> Hash Join (cost=xxx rows=1 width=xxx)
2231 Hash Cond: (bmt4.c1 = bmt1.c1)
2232 -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
2233 -> Hash (cost=xxx rows=1 width=xxx)
2234 -> Merge Join (cost=xxx rows=1 width=xxx)
2235 Merge Cond: (bmt3.c1 = bmt1.c1)
2236 -> Index Only Scan using t3_i1 on t3 bmt3 (cost=xxx rows=1130 width=xxx)
2237 -> Sort (cost=xxx rows=1 width=xxx)
2239 -> Nested Loop (cost=xxx rows=1 width=xxx)
2240 -> Hash Join (cost=xxx rows=1 width=xxx)
2241 Hash Cond: (bmt1.c1 = c1.c1)
2242 -> Seq Scan on t1 bmt1 (cost=xxx rows=1000 width=xxx)
2243 -> Hash (cost=xxx rows=1 width=xxx)
2244 -> Merge Join (cost=xxx rows=1 width=xxx)
2245 Merge Cond: (c1.c1 = c2.c1)
2246 -> Sort (cost=xxx rows=1 width=xxx)
2248 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
2249 -> Sort (cost=xxx rows=1 width=xxx)
2251 -> CTE Scan on c2 (cost=xxx rows=1 width=xxx)
2252 -> Index Only Scan using t2_i1 on t2 bmt2 (cost=xxx rows=1 width=xxx)
2253 Index Cond: (c1 = bmt1.c1)
2257 \o results/ut-R.tmpout
2259 Leading(c3 c2 c1 bmt1 bmt2 bmt3 bmt4)
2260 Leading(b1t2 b1t3 b1t4 b1t1)
2261 Leading(b2t3 b2t4 b2t1 b2t2)
2262 Leading(b3t4 b3t1 b3t2 b3t3)
2263 MergeJoin(c3 c2)HashJoin(c3 c2 c1)NestLoop(c3 c2 c1 bmt1)MergeJoin(c3 c2 c1 bmt1 bmt2)HashJoin(c3 c2 c1 bmt1 bmt2 bmt3)NestLoop(c3 c2 c1 bmt1 bmt2 bmt3 bmt4)
2264 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
2265 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
2266 MergeJoin(b3t4 b3t1)HashJoin(b3t4 b3t1 b3t2)NestLoop(b3t1 b3t2 b3t3 b3t4)
2270 SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1
2273 SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1
2276 SELECT max(b3t1.c1) FROM s1.t1 b3t1, s1.t2 b3t2, s1.t3 b3t3, s1.t4 b3t4 WHERE b3t1.c1 = b3t2.c1 AND b3t1.c1 = b3t3.c1 AND b3t1.c1 = b3t4.c1
2278 SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4
2280 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1
2283 AND bmt1.c1 = c3.c1;
2286 MergeJoin(b1t2 b1t3)
2287 MergeJoin(b2t3 b2t4)
2288 MergeJoin(b3t1 b3t4)
2290 HashJoin(b1t2 b1t3 b1t4)
2291 HashJoin(b2t1 b2t3 b2t4)
2292 HashJoin(b3t1 b3t2 b3t4)
2294 NestLoop(b1t1 b1t2 b1t3 b1t4)
2295 NestLoop(b2t1 b2t2 b2t3 b2t4)
2296 NestLoop(b3t1 b3t2 b3t3 b3t4)
2297 NestLoop(bmt1 c1 c2 c3)
2298 MergeJoin(bmt1 bmt2 c1 c2 c3)
2299 HashJoin(bmt1 bmt2 bmt3 c1 c2 c3)
2300 NestLoop(bmt1 bmt2 bmt3 bmt4 c1 c2 c3)
2301 Leading(c3 c2 c1 bmt1 bmt2 bmt3 bmt4)
2302 Leading(b1t2 b1t3 b1t4 b1t1)
2303 Leading(b2t3 b2t4 b2t1 b2t2)
2304 Leading(b3t4 b3t1 b3t2 b3t3)
2310 \! sql/maskout.sh results/ut-R.tmpout
2312 --------------------------------------------------------------------------------------------------------------------
2313 Aggregate (cost=xxx rows=1 width=xxx)
2315 -> Aggregate (cost=xxx rows=1 width=xxx)
2316 -> Nested Loop (cost=xxx rows=100 width=xxx)
2317 Join Filter: (b1t2.c1 = b1t1.c1)
2318 -> Hash Join (cost=xxx rows=100 width=xxx)
2319 Hash Cond: (b1t4.c1 = b1t2.c1)
2320 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
2321 -> Hash (cost=xxx rows=100 width=xxx)
2322 -> Merge Join (cost=xxx rows=100 width=xxx)
2323 Merge Cond: (b1t3.c1 = b1t2.c1)
2324 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
2325 -> Sort (cost=xxx rows=100 width=xxx)
2327 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
2328 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
2329 Index Cond: (c1 = b1t3.c1)
2331 -> Aggregate (cost=xxx rows=1 width=xxx)
2332 -> Nested Loop (cost=xxx rows=100 width=xxx)
2333 -> Hash Join (cost=xxx rows=1000 width=xxx)
2334 Hash Cond: (b2t3.c1 = b2t1.c1)
2335 -> Merge Join (cost=xxx rows=1130 width=xxx)
2336 Merge Cond: (b2t3.c1 = b2t4.c1)
2337 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
2338 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
2339 -> Hash (cost=xxx rows=1000 width=xxx)
2340 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
2341 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
2342 Index Cond: (c1 = b2t1.c1)
2344 -> Aggregate (cost=xxx rows=1 width=xxx)
2345 -> Nested Loop (cost=xxx rows=100 width=xxx)
2346 -> Hash Join (cost=xxx rows=100 width=xxx)
2347 Hash Cond: (b3t1.c1 = b3t2.c1)
2348 -> Merge Join (cost=xxx rows=1000 width=xxx)
2349 Merge Cond: (b3t1.c1 = b3t4.c1)
2350 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
2351 -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1130 width=xxx)
2352 -> Hash (cost=xxx rows=100 width=xxx)
2353 -> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
2354 -> Index Only Scan using t3_i1 on t3 b3t3 (cost=xxx rows=1 width=xxx)
2355 Index Cond: (c1 = b3t1.c1)
2356 -> Nested Loop (cost=xxx rows=1 width=xxx)
2357 -> Hash Join (cost=xxx rows=1 width=xxx)
2358 Hash Cond: (bmt3.c1 = bmt1.c1)
2359 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
2360 -> Hash (cost=xxx rows=1 width=xxx)
2361 -> Merge Join (cost=xxx rows=1 width=xxx)
2362 Merge Cond: (bmt1.c1 = bmt2.c1)
2363 -> Sort (cost=xxx rows=1 width=xxx)
2365 -> Nested Loop (cost=xxx rows=1 width=xxx)
2366 -> Hash Join (cost=xxx rows=1 width=xxx)
2367 Hash Cond: (c2.c1 = c1.c1)
2368 -> Merge Join (cost=xxx rows=1 width=xxx)
2369 Merge Cond: (c2.c1 = c3.c1)
2370 -> Sort (cost=xxx rows=1 width=xxx)
2372 -> CTE Scan on c2 (cost=xxx rows=1 width=xxx)
2373 -> Sort (cost=xxx rows=1 width=xxx)
2375 -> CTE Scan on c3 (cost=xxx rows=1 width=xxx)
2376 -> Hash (cost=xxx rows=1 width=xxx)
2377 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
2378 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1 width=xxx)
2379 Index Cond: (c1 = c1.c1)
2380 -> Sort (cost=xxx rows=100 width=xxx)
2382 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
2383 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
2384 Index Cond: (c1 = bmt1.c1)
2387 \o results/ut-R.tmpout
2389 Leading(c3 c2 c1 bmt1 bmt2 bmt3 bmt4)
2390 Leading(b1t2 b1t3 b1t4 b1t1)
2391 Leading(b2t3 b2t4 b2t1 b2t2)
2392 Leading(b3t4 b3t1 b3t2 b3t3)
2393 MergeJoin(c3 c2)HashJoin(c3 c2 c1)NestLoop(c3 c2 c1 bmt1)MergeJoin(c3 c2 c1 bmt1 bmt2)HashJoin(c3 c2 c1 bmt1 bmt2 bmt3)NestLoop(c3 c2 c1 bmt1 bmt2 bmt3 bmt4)
2394 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
2395 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
2396 MergeJoin(b3t4 b3t1)HashJoin(b3t4 b3t1 b3t2)NestLoop(b3t1 b3t2 b3t3 b3t4)
2397 Rows(c3 c2 #1)Rows(c3 c2 c1 #1)Rows(c3 c2 c1 bmt1 #1)Rows(c3 c2 c1 bmt1 bmt2 #1)Rows(c3 c2 c1 bmt1 bmt2 bmt3 #1)Rows(c3 c2 c1 bmt1 bmt2 bmt3 bmt4 #1)
2398 Rows(b1t2 b1t3 #1)Rows(b1t2 b1t3 b1t4 #1)Rows(b1t2 b1t3 b1t4 b1t1 #1)
2399 Rows(b2t3 b2t4 #1)Rows(b2t3 b2t4 b2t1 #1)Rows(b2t3 b2t4 b2t1 b2t2 #1)
2400 Rows(b3t4 b3t1 #1)Rows(b3t4 b3t1 b3t2 #1)Rows(b3t1 b3t2 b3t3 b3t4 #1)
2404 SELECT max(b1t1.c1) FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1
2407 SELECT max(b2t1.c1) FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1
2410 SELECT max(b3t1.c1) FROM s1.t1 b3t1, s1.t2 b3t2, s1.t3 b3t3, s1.t4 b3t4 WHERE b3t1.c1 = b3t2.c1 AND b3t1.c1 = b3t3.c1 AND b3t1.c1 = b3t4.c1
2412 SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4
2414 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1
2417 AND bmt1.c1 = c3.c1;
2420 MergeJoin(b1t2 b1t3)
2421 MergeJoin(b2t3 b2t4)
2422 MergeJoin(b3t1 b3t4)
2424 HashJoin(b1t2 b1t3 b1t4)
2425 HashJoin(b2t1 b2t3 b2t4)
2426 HashJoin(b3t1 b3t2 b3t4)
2428 NestLoop(b1t1 b1t2 b1t3 b1t4)
2429 NestLoop(b2t1 b2t2 b2t3 b2t4)
2430 NestLoop(b3t1 b3t2 b3t3 b3t4)
2431 NestLoop(bmt1 c1 c2 c3)
2432 MergeJoin(bmt1 bmt2 c1 c2 c3)
2433 HashJoin(bmt1 bmt2 bmt3 c1 c2 c3)
2434 NestLoop(bmt1 bmt2 bmt3 bmt4 c1 c2 c3)
2435 Leading(c3 c2 c1 bmt1 bmt2 bmt3 bmt4)
2436 Leading(b1t2 b1t3 b1t4 b1t1)
2437 Leading(b2t3 b2t4 b2t1 b2t2)
2438 Leading(b3t4 b3t1 b3t2 b3t3)
2443 Rows(b1t2 b1t3 b1t4 #1)
2444 Rows(b2t1 b2t3 b2t4 #1)
2445 Rows(b3t1 b3t2 b3t4 #1)
2447 Rows(b1t1 b1t2 b1t3 b1t4 #1)
2448 Rows(b2t1 b2t2 b2t3 b2t4 #1)
2449 Rows(b3t1 b3t2 b3t3 b3t4 #1)
2450 Rows(bmt1 c1 c2 c3 #1)
2451 Rows(bmt1 bmt2 c1 c2 c3 #1)
2452 Rows(bmt1 bmt2 bmt3 c1 c2 c3 #1)
2453 Rows(bmt1 bmt2 bmt3 bmt4 c1 c2 c3 #1)
2459 \! sql/maskout.sh results/ut-R.tmpout
2461 --------------------------------------------------------------------------------------------------------------------
2462 Aggregate (cost=xxx rows=1 width=xxx)
2464 -> Aggregate (cost=xxx rows=1 width=xxx)
2465 -> Nested Loop (cost=xxx rows=1 width=xxx)
2466 Join Filter: (b1t2.c1 = b1t1.c1)
2467 -> Hash Join (cost=xxx rows=1 width=xxx)
2468 Hash Cond: (b1t4.c1 = b1t2.c1)
2469 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
2470 -> Hash (cost=xxx rows=1 width=xxx)
2471 -> Merge Join (cost=xxx rows=1 width=xxx)
2472 Merge Cond: (b1t3.c1 = b1t2.c1)
2473 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
2474 -> Sort (cost=xxx rows=100 width=xxx)
2476 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
2477 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
2478 Index Cond: (c1 = b1t3.c1)
2480 -> Aggregate (cost=xxx rows=1 width=xxx)
2481 -> Nested Loop (cost=xxx rows=1 width=xxx)
2482 -> Hash Join (cost=xxx rows=1 width=xxx)
2483 Hash Cond: (b2t1.c1 = b2t3.c1)
2484 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
2485 -> Hash (cost=xxx rows=1 width=xxx)
2486 -> Merge Join (cost=xxx rows=1 width=xxx)
2487 Merge Cond: (b2t3.c1 = b2t4.c1)
2488 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
2489 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
2490 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
2491 Index Cond: (c1 = b2t1.c1)
2493 -> Aggregate (cost=xxx rows=1 width=xxx)
2494 -> Nested Loop (cost=xxx rows=1 width=xxx)
2495 -> Hash Join (cost=xxx rows=1 width=xxx)
2496 Hash Cond: (b3t1.c1 = b3t2.c1)
2497 -> Merge Join (cost=xxx rows=1 width=xxx)
2498 Merge Cond: (b3t1.c1 = b3t4.c1)
2499 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
2500 -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1130 width=xxx)
2501 -> Hash (cost=xxx rows=100 width=xxx)
2502 -> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
2503 -> Index Only Scan using t3_i1 on t3 b3t3 (cost=xxx rows=1 width=xxx)
2504 Index Cond: (c1 = b3t1.c1)
2505 -> Nested Loop (cost=xxx rows=1 width=xxx)
2506 -> Hash Join (cost=xxx rows=1 width=xxx)
2507 Hash Cond: (bmt3.c1 = bmt1.c1)
2508 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
2509 -> Hash (cost=xxx rows=1 width=xxx)
2510 -> Merge Join (cost=xxx rows=1 width=xxx)
2511 Merge Cond: (bmt1.c1 = bmt2.c1)
2512 -> Sort (cost=xxx rows=1 width=xxx)
2514 -> Nested Loop (cost=xxx rows=1 width=xxx)
2515 -> Hash Join (cost=xxx rows=1 width=xxx)
2516 Hash Cond: (c2.c1 = c1.c1)
2517 -> Merge Join (cost=xxx rows=1 width=xxx)
2518 Merge Cond: (c2.c1 = c3.c1)
2519 -> Sort (cost=xxx rows=1 width=xxx)
2521 -> CTE Scan on c2 (cost=xxx rows=1 width=xxx)
2522 -> Sort (cost=xxx rows=1 width=xxx)
2524 -> CTE Scan on c3 (cost=xxx rows=1 width=xxx)
2525 -> Hash (cost=xxx rows=1 width=xxx)
2526 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
2527 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1 width=xxx)
2528 Index Cond: (c1 = c1.c1)
2529 -> Sort (cost=xxx rows=100 width=xxx)
2531 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
2532 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
2533 Index Cond: (c1 = bmt1.c1)
2537 ---- No. R-2-2 the number of the tables per quiry block
2540 \o results/ut-R.tmpout
2546 SELECT b1t1.c1 FROM s1.t1 b1t1 WHERE b1t1.c1 = 1
2549 SELECT b2t1.c1 FROM s1.t1 b2t1 WHERE b2t1.c1 = 1
2551 FROM s1.t1 bmt1, c1 WHERE bmt1.c1 = 1
2554 SELECT b3t1.c1 FROM s1.t1 b3t1 WHERE b3t1.c1 = 1
2564 \! sql/maskout.sh results/ut-R.tmpout
2566 ----------------------------------------------------------------------------------
2567 Nested Loop (cost=xxx rows=1 width=xxx)
2569 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
2570 Index Cond: (c1 = 1)
2571 InitPlan 2 (returns $1)
2572 -> Index Only Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1 width=xxx)
2573 Index Cond: (c1 = 1)
2574 InitPlan 3 (returns $2)
2575 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1 width=xxx)
2576 Index Cond: (c1 = 1)
2577 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1 width=xxx)
2578 Index Cond: (c1 = 1)
2580 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
2584 \o results/ut-R.tmpout
2594 SELECT b1t1.c1 FROM s1.t1 b1t1 WHERE b1t1.c1 = 1
2597 SELECT b2t1.c1 FROM s1.t1 b2t1 WHERE b2t1.c1 = 1
2599 FROM s1.t1 bmt1, c1 WHERE bmt1.c1 = 1
2602 SELECT b3t1.c1 FROM s1.t1 b3t1 WHERE b3t1.c1 = 1
2616 \! sql/maskout.sh results/ut-R.tmpout
2618 ----------------------------------------------------------------------------------
2619 Nested Loop (cost=xxx rows=1 width=xxx)
2621 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
2622 Index Cond: (c1 = 1)
2623 InitPlan 2 (returns $1)
2624 -> Index Only Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1 width=xxx)
2625 Index Cond: (c1 = 1)
2626 InitPlan 3 (returns $2)
2627 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1 width=xxx)
2628 Index Cond: (c1 = 1)
2629 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1 width=xxx)
2630 Index Cond: (c1 = 1)
2632 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
2637 \o results/ut-R.tmpout
2639 Leading(c1 bmt2 bmt1)
2644 HashJoin(c1 bmt1 bmt2)
2645 MergeJoin(b1t1 b1t2)
2646 MergeJoin(b2t1 b2t2)
2647 MergeJoin(b3t1 b3t2)
2651 SELECT b1t1.c1 FROM s1.t1 b1t1, s1.t2 b1t2 WHERE b1t1.c1 = b1t2.c1
2654 SELECT b2t1.c1 FROM s1.t1 b2t1, s1.t2 b2t2 WHERE b2t1.c1 = b2t2.c1
2656 FROM s1.t1 bmt1, s1.t2 bmt2, c1 WHERE bmt1.c1 = bmt2.c1
2659 SELECT b3t1.c1 FROM s1.t1 b3t1, s1.t2 b3t2 WHERE b3t1.c1 = b3t2.c1
2663 MergeJoin(b1t1 b1t2)
2664 MergeJoin(b2t1 b2t2)
2665 MergeJoin(b3t1 b3t2)
2667 HashJoin(bmt1 bmt2 c1)
2668 Leading(c1 bmt2 bmt1)
2677 \! sql/maskout.sh results/ut-R.tmpout
2679 --------------------------------------------------------------------------------------------
2680 Hash Join (cost=xxx rows=10 width=xxx)
2681 Hash Cond: (bmt1.c1 = bmt2.c1)
2683 -> Merge Join (cost=xxx rows=100 width=xxx)
2684 Merge Cond: (b1t1.c1 = b1t2.c1)
2685 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1000 width=xxx)
2686 -> Sort (cost=xxx rows=100 width=xxx)
2688 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
2689 InitPlan 2 (returns $1)
2690 -> Merge Join (cost=xxx rows=100 width=xxx)
2691 Merge Cond: (b2t1.c1 = b2t2.c1)
2692 -> Index Only Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1000 width=xxx)
2693 -> Sort (cost=xxx rows=100 width=xxx)
2695 -> Seq Scan on t2 b2t2 (cost=xxx rows=100 width=xxx)
2696 InitPlan 3 (returns $2)
2697 -> Merge Join (cost=xxx rows=100 width=xxx)
2698 Merge Cond: (b3t1.c1 = b3t2.c1)
2699 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
2700 -> Sort (cost=xxx rows=100 width=xxx)
2702 -> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
2703 -> Seq Scan on t1 bmt1 (cost=xxx rows=999 width=xxx)
2705 -> Hash (cost=xxx rows=100 width=xxx)
2706 -> Merge Join (cost=xxx rows=100 width=xxx)
2707 Merge Cond: (bmt2.c1 = c1.c1)
2708 -> Sort (cost=xxx rows=100 width=xxx)
2710 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
2711 -> Sort (cost=xxx rows=100 width=xxx)
2713 -> CTE Scan on c1 (cost=xxx rows=100 width=xxx)
2716 \o results/ut-R.tmpout
2718 Leading(c1 bmt2 bmt1)
2723 HashJoin(c1 bmt1 bmt2)
2724 MergeJoin(b1t1 b1t2)
2725 MergeJoin(b2t1 b2t2)
2726 MergeJoin(b3t1 b3t2)
2728 Rows(c1 bmt1 bmt2 #1)
2735 SELECT b1t1.c1 FROM s1.t1 b1t1, s1.t2 b1t2 WHERE b1t1.c1 = b1t2.c1
2738 SELECT b2t1.c1 FROM s1.t1 b2t1, s1.t2 b2t2 WHERE b2t1.c1 = b2t2.c1
2740 FROM s1.t1 bmt1, s1.t2 bmt2, c1 WHERE bmt1.c1 = bmt2.c1
2743 SELECT b3t1.c1 FROM s1.t1 b3t1, s1.t2 b3t2 WHERE b3t1.c1 = b3t2.c1
2748 MergeJoin(b1t1 b1t2)
2749 MergeJoin(b2t1 b2t2)
2750 MergeJoin(b3t1 b3t2)
2752 HashJoin(bmt1 bmt2 c1)
2753 Leading(c1 bmt2 bmt1)
2761 Rows(bmt1 bmt2 c1 #1)
2767 \! sql/maskout.sh results/ut-R.tmpout
2769 --------------------------------------------------------------------------------------------
2770 Hash Join (cost=xxx rows=1 width=xxx)
2771 Hash Cond: (bmt1.c1 = bmt2.c1)
2773 -> Merge Join (cost=xxx rows=1 width=xxx)
2774 Merge Cond: (b1t1.c1 = b1t2.c1)
2775 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1000 width=xxx)
2776 -> Sort (cost=xxx rows=100 width=xxx)
2778 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
2779 InitPlan 2 (returns $1)
2780 -> Merge Join (cost=xxx rows=1 width=xxx)
2781 Merge Cond: (b2t1.c1 = b2t2.c1)
2782 -> Index Only Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1000 width=xxx)
2783 -> Sort (cost=xxx rows=100 width=xxx)
2785 -> Seq Scan on t2 b2t2 (cost=xxx rows=100 width=xxx)
2786 InitPlan 3 (returns $2)
2787 -> Merge Join (cost=xxx rows=1 width=xxx)
2788 Merge Cond: (b3t1.c1 = b3t2.c1)
2789 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
2790 -> Sort (cost=xxx rows=100 width=xxx)
2792 -> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
2793 -> Seq Scan on t1 bmt1 (cost=xxx rows=999 width=xxx)
2795 -> Hash (cost=xxx rows=1 width=xxx)
2796 -> Merge Join (cost=xxx rows=1 width=xxx)
2797 Merge Cond: (bmt2.c1 = c1.c1)
2798 -> Sort (cost=xxx rows=100 width=xxx)
2800 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
2801 -> Sort (cost=xxx rows=1 width=xxx)
2803 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
2807 \o results/ut-R.tmpout
2809 Leading(c1 bmt4 bmt3 bmt2 bmt1)
2810 Leading(b1t4 b1t3 b1t2 b1t1)
2811 Leading(b2t4 b2t3 b2t2 b2t1)
2812 Leading(b3t4 b3t3 b3t2 b3t1)
2814 HashJoin(c1 bmt4 bmt3)
2815 NestLoop(c1 bmt4 bmt3 bmt2)
2816 MergeJoin(c1 bmt4 bmt3 bmt2 bmt1)
2818 NestLoop(b1t4 b1t3 b1t2)
2819 MergeJoin(b1t4 b1t3 b1t2 b1t1)
2821 NestLoop(b2t4 b2t3 b2t2)
2822 MergeJoin(b2t4 b2t3 b2t2 b2t1)
2824 NestLoop(b3t4 b3t3 b3t2)
2825 MergeJoin(b3t4 b3t3 b3t2 b3t1)
2829 SELECT b1t1.c1 FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1
2832 SELECT b2t1.c1 FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1
2834 FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4, c1 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1 AND bmt1.c1 = c1.c1
2836 SELECT b3t1.c1 FROM s1.t1 b3t1, s1.t2 b3t2, s1.t3 b3t3, s1.t4 b3t4 WHERE b3t1.c1 = b3t2.c1 AND b3t1.c1 = b3t3.c1 AND b3t1.c1 = b3t4.c1
2844 NestLoop(b1t2 b1t3 b1t4)
2845 NestLoop(b2t2 b2t3 b2t4)
2846 NestLoop(b3t2 b3t3 b3t4)
2847 HashJoin(bmt3 bmt4 c1)
2848 MergeJoin(b1t1 b1t2 b1t3 b1t4)
2849 MergeJoin(b2t1 b2t2 b2t3 b2t4)
2850 MergeJoin(b3t1 b3t2 b3t3 b3t4)
2851 NestLoop(bmt2 bmt3 bmt4 c1)
2852 MergeJoin(bmt1 bmt2 bmt3 bmt4 c1)
2853 Leading(c1 bmt4 bmt3 bmt2 bmt1)
2854 Leading(b1t4 b1t3 b1t2 b1t1)
2855 Leading(b2t4 b2t3 b2t2 b2t1)
2856 Leading(b3t4 b3t3 b3t2 b3t1)
2862 \! sql/maskout.sh results/ut-R.tmpout
2864 ------------------------------------------------------------------------------------------------------------------
2865 Merge Join (cost=xxx rows=10 width=xxx)
2866 Merge Cond: (bmt1.c1 = bmt2.c1)
2868 -> Merge Join (cost=xxx rows=100 width=xxx)
2869 Merge Cond: (b1t1.c1 = b1t2.c1)
2870 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1000 width=xxx)
2871 -> Sort (cost=xxx rows=100 width=xxx)
2873 -> Nested Loop (cost=xxx rows=100 width=xxx)
2874 -> Hash Join (cost=xxx rows=1130 width=xxx)
2875 Hash Cond: (b1t3.c1 = b1t4.c1)
2876 -> Seq Scan on t3 b1t3 (cost=xxx rows=1130 width=xxx)
2877 -> Hash (cost=xxx rows=1130 width=xxx)
2878 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
2879 -> Index Only Scan using t2_i1 on t2 b1t2 (cost=xxx rows=1 width=xxx)
2880 Index Cond: (c1 = b1t3.c1)
2881 InitPlan 2 (returns $3)
2882 -> Merge Join (cost=xxx rows=100 width=xxx)
2883 Merge Cond: (b2t1.c1 = b2t2.c1)
2884 -> Index Only Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1000 width=xxx)
2885 -> Sort (cost=xxx rows=100 width=xxx)
2887 -> Nested Loop (cost=xxx rows=100 width=xxx)
2888 -> Hash Join (cost=xxx rows=1130 width=xxx)
2889 Hash Cond: (b2t3.c1 = b2t4.c1)
2890 -> Seq Scan on t3 b2t3 (cost=xxx rows=1130 width=xxx)
2891 -> Hash (cost=xxx rows=1130 width=xxx)
2892 -> Seq Scan on t4 b2t4 (cost=xxx rows=1130 width=xxx)
2893 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
2894 Index Cond: (c1 = b2t3.c1)
2895 InitPlan 3 (returns $5)
2896 -> Merge Join (cost=xxx rows=100 width=xxx)
2897 Merge Cond: (b3t1.c1 = b3t2.c1)
2898 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
2899 -> Sort (cost=xxx rows=100 width=xxx)
2901 -> Nested Loop (cost=xxx rows=100 width=xxx)
2902 -> Hash Join (cost=xxx rows=1130 width=xxx)
2903 Hash Cond: (b3t3.c1 = b3t4.c1)
2904 -> Seq Scan on t3 b3t3 (cost=xxx rows=1130 width=xxx)
2905 -> Hash (cost=xxx rows=1130 width=xxx)
2906 -> Seq Scan on t4 b3t4 (cost=xxx rows=1130 width=xxx)
2907 -> Index Only Scan using t2_i1 on t2 b3t2 (cost=xxx rows=1 width=xxx)
2908 Index Cond: (c1 = b3t3.c1)
2909 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=999 width=xxx)
2911 -> Sort (cost=xxx rows=100 width=xxx)
2913 -> Nested Loop (cost=xxx rows=100 width=xxx)
2914 -> Hash Join (cost=xxx rows=100 width=xxx)
2915 Hash Cond: (bmt3.c1 = bmt4.c1)
2916 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
2917 -> Hash (cost=xxx rows=100 width=xxx)
2918 -> Merge Join (cost=xxx rows=100 width=xxx)
2919 Merge Cond: (bmt4.c1 = c1.c1)
2920 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1130 width=xxx)
2921 -> Sort (cost=xxx rows=100 width=xxx)
2923 -> CTE Scan on c1 (cost=xxx rows=100 width=xxx)
2924 -> Index Only Scan using t2_i1 on t2 bmt2 (cost=xxx rows=1 width=xxx)
2925 Index Cond: (c1 = bmt3.c1)
2928 \o results/ut-R.tmpout
2930 Leading(c1 bmt4 bmt3 bmt2 bmt1)
2931 Leading(b1t4 b1t3 b1t2 b1t1)
2932 Leading(b2t4 b2t3 b2t2 b2t1)
2933 Leading(b3t4 b3t3 b3t2 b3t1)
2935 HashJoin(c1 bmt4 bmt3)
2936 NestLoop(c1 bmt4 bmt3 bmt2)
2937 MergeJoin(c1 bmt4 bmt3 bmt2 bmt1)
2939 NestLoop(b1t4 b1t3 b1t2)
2940 MergeJoin(b1t4 b1t3 b1t2 b1t1)
2942 NestLoop(b2t4 b2t3 b2t2)
2943 MergeJoin(b2t4 b2t3 b2t2 b2t1)
2945 NestLoop(b3t4 b3t3 b3t2)
2946 MergeJoin(b3t4 b3t3 b3t2 b3t1)
2948 Rows(c1 bmt4 bmt3 #1)
2949 Rows(c1 bmt4 bmt3 bmt2 #1)
2950 Rows(c1 bmt4 bmt3 bmt2 bmt1 #1)
2952 Rows(b1t4 b1t3 b1t2 #1)
2953 Rows(b1t4 b1t3 b1t2 b1t1 #1)
2955 Rows(b2t4 b2t3 b2t2 #1)
2956 Rows(b2t4 b2t3 b2t2 b2t1 #1)
2958 Rows(b3t4 b3t3 b3t2 #1)
2959 Rows(b3t4 b3t3 b3t2 b3t1 #1)
2963 SELECT b1t1.c1 FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1
2966 SELECT b2t1.c1 FROM s1.t1 b2t1, s1.t2 b2t2, s1.t3 b2t3, s1.t4 b2t4 WHERE b2t1.c1 = b2t2.c1 AND b2t1.c1 = b2t3.c1 AND b2t1.c1 = b2t4.c1
2968 FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4, c1 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1 AND bmt1.c1 = c1.c1
2970 SELECT b3t1.c1 FROM s1.t1 b3t1, s1.t2 b3t2, s1.t3 b3t3, s1.t4 b3t4 WHERE b3t1.c1 = b3t2.c1 AND b3t1.c1 = b3t3.c1 AND b3t1.c1 = b3t4.c1
2978 NestLoop(b1t2 b1t3 b1t4)
2979 NestLoop(b2t2 b2t3 b2t4)
2980 NestLoop(b3t2 b3t3 b3t4)
2981 HashJoin(bmt3 bmt4 c1)
2982 MergeJoin(b1t1 b1t2 b1t3 b1t4)
2983 MergeJoin(b2t1 b2t2 b2t3 b2t4)
2984 MergeJoin(b3t1 b3t2 b3t3 b3t4)
2985 NestLoop(bmt2 bmt3 bmt4 c1)
2986 MergeJoin(bmt1 bmt2 bmt3 bmt4 c1)
2987 Leading(c1 bmt4 bmt3 bmt2 bmt1)
2988 Leading(b1t4 b1t3 b1t2 b1t1)
2989 Leading(b2t4 b2t3 b2t2 b2t1)
2990 Leading(b3t4 b3t3 b3t2 b3t1)
2995 Rows(b1t2 b1t3 b1t4 #1)
2996 Rows(b2t2 b2t3 b2t4 #1)
2997 Rows(b3t2 b3t3 b3t4 #1)
2998 Rows(bmt3 bmt4 c1 #1)
2999 Rows(b1t1 b1t2 b1t3 b1t4 #1)
3000 Rows(b2t1 b2t2 b2t3 b2t4 #1)
3001 Rows(b3t1 b3t2 b3t3 b3t4 #1)
3002 Rows(bmt2 bmt3 bmt4 c1 #1)
3003 Rows(bmt1 bmt2 bmt3 bmt4 c1 #1)
3009 \! sql/maskout.sh results/ut-R.tmpout
3011 ------------------------------------------------------------------------------------------------------------------
3012 Merge Join (cost=xxx rows=1 width=xxx)
3013 Merge Cond: (bmt1.c1 = bmt2.c1)
3015 -> Merge Join (cost=xxx rows=1 width=xxx)
3016 Merge Cond: (b1t1.c1 = b1t2.c1)
3017 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1000 width=xxx)
3018 -> Sort (cost=xxx rows=1 width=xxx)
3020 -> Nested Loop (cost=xxx rows=1 width=xxx)
3021 -> Hash Join (cost=xxx rows=1 width=xxx)
3022 Hash Cond: (b1t3.c1 = b1t4.c1)
3023 -> Seq Scan on t3 b1t3 (cost=xxx rows=1130 width=xxx)
3024 -> Hash (cost=xxx rows=1130 width=xxx)
3025 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
3026 -> Index Only Scan using t2_i1 on t2 b1t2 (cost=xxx rows=1 width=xxx)
3027 Index Cond: (c1 = b1t3.c1)
3028 InitPlan 2 (returns $3)
3029 -> Merge Join (cost=xxx rows=1 width=xxx)
3030 Merge Cond: (b2t1.c1 = b2t2.c1)
3031 -> Index Only Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1000 width=xxx)
3032 -> Sort (cost=xxx rows=1 width=xxx)
3034 -> Nested Loop (cost=xxx rows=1 width=xxx)
3035 -> Hash Join (cost=xxx rows=1 width=xxx)
3036 Hash Cond: (b2t3.c1 = b2t4.c1)
3037 -> Seq Scan on t3 b2t3 (cost=xxx rows=1130 width=xxx)
3038 -> Hash (cost=xxx rows=1130 width=xxx)
3039 -> Seq Scan on t4 b2t4 (cost=xxx rows=1130 width=xxx)
3040 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
3041 Index Cond: (c1 = b2t3.c1)
3042 InitPlan 3 (returns $5)
3043 -> Merge Join (cost=xxx rows=1 width=xxx)
3044 Merge Cond: (b3t1.c1 = b3t2.c1)
3045 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
3046 -> Sort (cost=xxx rows=1 width=xxx)
3048 -> Nested Loop (cost=xxx rows=1 width=xxx)
3049 -> Hash Join (cost=xxx rows=1 width=xxx)
3050 Hash Cond: (b3t3.c1 = b3t4.c1)
3051 -> Seq Scan on t3 b3t3 (cost=xxx rows=1130 width=xxx)
3052 -> Hash (cost=xxx rows=1130 width=xxx)
3053 -> Seq Scan on t4 b3t4 (cost=xxx rows=1130 width=xxx)
3054 -> Index Only Scan using t2_i1 on t2 b3t2 (cost=xxx rows=1 width=xxx)
3055 Index Cond: (c1 = b3t3.c1)
3056 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=999 width=xxx)
3058 -> Sort (cost=xxx rows=1 width=xxx)
3060 -> Nested Loop (cost=xxx rows=1 width=xxx)
3061 -> Hash Join (cost=xxx rows=1 width=xxx)
3062 Hash Cond: (bmt3.c1 = bmt4.c1)
3063 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
3064 -> Hash (cost=xxx rows=1 width=xxx)
3065 -> Merge Join (cost=xxx rows=1 width=xxx)
3066 Merge Cond: (bmt4.c1 = c1.c1)
3067 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1130 width=xxx)
3068 -> Sort (cost=xxx rows=1 width=xxx)
3070 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
3071 -> Index Only Scan using t2_i1 on t2 bmt2 (cost=xxx rows=1 width=xxx)
3072 Index Cond: (c1 = bmt3.c1)
3076 \o results/ut-R.tmpout
3078 Leading(c1 bmt4 bmt3 bmt2 bmt1)
3079 Leading(b1t4 b1t3 b1t2 b1t1)
3081 HashJoin(c1 bmt4 bmt3)
3082 NestLoop(c1 bmt4 bmt3 bmt2)
3083 MergeJoin(c1 bmt4 bmt3 bmt2 bmt1)
3084 MergeJoin(b1t4 b1t3)
3085 HashJoin(b1t4 b1t3 b1t2)
3086 NestLoop(b1t4 b1t3 b1t2 b1t1)
3090 SELECT b1t1.c1 FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1
3093 SELECT b2t1.c1 FROM s1.t1 b2t1 WHERE b2t1.c1 = 1
3095 FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4, c1 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1 AND bmt1.c1 = c1.c1
3097 SELECT b3t1.c1 FROM s1.t1 b3t1
3101 MergeJoin(b1t3 b1t4)
3103 HashJoin(b1t2 b1t3 b1t4)
3104 HashJoin(bmt3 bmt4 c1)
3105 NestLoop(b1t1 b1t2 b1t3 b1t4)
3106 NestLoop(bmt2 bmt3 bmt4 c1)
3107 MergeJoin(bmt1 bmt2 bmt3 bmt4 c1)
3108 Leading(c1 bmt4 bmt3 bmt2 bmt1)
3109 Leading(b1t4 b1t3 b1t2 b1t1)
3115 \! sql/maskout.sh results/ut-R.tmpout
3117 ------------------------------------------------------------------------------------------------------------------
3118 Merge Join (cost=xxx rows=10 width=xxx)
3119 Merge Cond: (bmt1.c1 = bmt2.c1)
3121 -> Nested Loop (cost=xxx rows=100 width=xxx)
3122 Join Filter: (b1t2.c1 = b1t1.c1)
3123 -> Hash Join (cost=xxx rows=100 width=xxx)
3124 Hash Cond: (b1t3.c1 = b1t2.c1)
3125 -> Merge Join (cost=xxx rows=1130 width=xxx)
3126 Merge Cond: (b1t3.c1 = b1t4.c1)
3127 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
3128 -> Index Only Scan using t4_i1 on t4 b1t4 (cost=xxx rows=1130 width=xxx)
3129 -> Hash (cost=xxx rows=100 width=xxx)
3130 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
3131 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
3132 Index Cond: (c1 = b1t3.c1)
3133 InitPlan 2 (returns $2)
3134 -> Index Only Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1 width=xxx)
3135 Index Cond: (c1 = 1)
3136 InitPlan 3 (returns $3)
3137 -> Seq Scan on t1 b3t1 (cost=xxx rows=1000 width=xxx)
3138 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=999 width=xxx)
3140 -> Sort (cost=xxx rows=100 width=xxx)
3142 -> Nested Loop (cost=xxx rows=100 width=xxx)
3143 -> Hash Join (cost=xxx rows=100 width=xxx)
3144 Hash Cond: (bmt3.c1 = bmt4.c1)
3145 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
3146 -> Hash (cost=xxx rows=100 width=xxx)
3147 -> Merge Join (cost=xxx rows=100 width=xxx)
3148 Merge Cond: (bmt4.c1 = c1.c1)
3149 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1130 width=xxx)
3150 -> Sort (cost=xxx rows=100 width=xxx)
3152 -> CTE Scan on c1 (cost=xxx rows=100 width=xxx)
3153 -> Index Only Scan using t2_i1 on t2 bmt2 (cost=xxx rows=1 width=xxx)
3154 Index Cond: (c1 = bmt3.c1)
3157 \o results/ut-R.tmpout
3159 Leading(c1 bmt4 bmt3 bmt2 bmt1)
3160 Leading(b1t4 b1t3 b1t2 b1t1)
3162 HashJoin(c1 bmt4 bmt3)
3163 NestLoop(c1 bmt4 bmt3 bmt2)
3164 MergeJoin(c1 bmt4 bmt3 bmt2 bmt1)
3165 MergeJoin(b1t4 b1t3)
3166 HashJoin(b1t4 b1t3 b1t2)
3167 NestLoop(b1t4 b1t3 b1t2 b1t1)
3169 Rows(c1 bmt4 bmt3 #1)
3170 Rows(c1 bmt4 bmt3 bmt2 #1)
3171 Rows(c1 bmt4 bmt3 bmt2 bmt1 #1)
3173 Rows(b1t4 b1t3 b1t2 #1)
3174 Rows(b1t4 b1t3 b1t2 b1t1 #1)
3178 SELECT b1t1.c1 FROM s1.t1 b1t1, s1.t2 b1t2, s1.t3 b1t3, s1.t4 b1t4 WHERE b1t1.c1 = b1t2.c1 AND b1t1.c1 = b1t3.c1 AND b1t1.c1 = b1t4.c1
3181 SELECT b2t1.c1 FROM s1.t1 b2t1 WHERE b2t1.c1 = 1
3183 FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4, c1 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1 AND bmt1.c1 = c1.c1
3185 SELECT b3t1.c1 FROM s1.t1 b3t1
3189 MergeJoin(b1t3 b1t4)
3191 HashJoin(b1t2 b1t3 b1t4)
3192 HashJoin(bmt3 bmt4 c1)
3193 NestLoop(b1t1 b1t2 b1t3 b1t4)
3194 NestLoop(bmt2 bmt3 bmt4 c1)
3195 MergeJoin(bmt1 bmt2 bmt3 bmt4 c1)
3196 Leading(c1 bmt4 bmt3 bmt2 bmt1)
3197 Leading(b1t4 b1t3 b1t2 b1t1)
3200 Rows(b1t2 b1t3 b1t4 #1)
3201 Rows(bmt3 bmt4 c1 #1)
3202 Rows(b1t1 b1t2 b1t3 b1t4 #1)
3203 Rows(bmt2 bmt3 bmt4 c1 #1)
3204 Rows(bmt1 bmt2 bmt3 bmt4 c1 #1)
3210 \! sql/maskout.sh results/ut-R.tmpout
3212 ------------------------------------------------------------------------------------------------------------------
3213 Merge Join (cost=xxx rows=1 width=xxx)
3214 Merge Cond: (bmt1.c1 = bmt2.c1)
3216 -> Nested Loop (cost=xxx rows=1 width=xxx)
3217 Join Filter: (b1t2.c1 = b1t1.c1)
3218 -> Hash Join (cost=xxx rows=1 width=xxx)
3219 Hash Cond: (b1t3.c1 = b1t2.c1)
3220 -> Merge Join (cost=xxx rows=1 width=xxx)
3221 Merge Cond: (b1t3.c1 = b1t4.c1)
3222 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
3223 -> Index Only Scan using t4_i1 on t4 b1t4 (cost=xxx rows=1130 width=xxx)
3224 -> Hash (cost=xxx rows=100 width=xxx)
3225 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
3226 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
3227 Index Cond: (c1 = b1t3.c1)
3228 InitPlan 2 (returns $2)
3229 -> Index Only Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1 width=xxx)
3230 Index Cond: (c1 = 1)
3231 InitPlan 3 (returns $3)
3232 -> Seq Scan on t1 b3t1 (cost=xxx rows=1000 width=xxx)
3233 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=999 width=xxx)
3235 -> Sort (cost=xxx rows=1 width=xxx)
3237 -> Nested Loop (cost=xxx rows=1 width=xxx)
3238 -> Hash Join (cost=xxx rows=1 width=xxx)
3239 Hash Cond: (bmt3.c1 = bmt4.c1)
3240 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
3241 -> Hash (cost=xxx rows=1 width=xxx)
3242 -> Merge Join (cost=xxx rows=1 width=xxx)
3243 Merge Cond: (bmt4.c1 = c1.c1)
3244 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1130 width=xxx)
3245 -> Sort (cost=xxx rows=1 width=xxx)
3247 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
3248 -> Index Only Scan using t2_i1 on t2 bmt2 (cost=xxx rows=1 width=xxx)
3249 Index Cond: (c1 = bmt3.c1)
3253 ---- No. R-2-3 RULE or VIEW
3256 \o results/ut-R.tmpout
3258 Leading(r1 t1 t2 t3 t4)
3260 EXPLAIN UPDATE s1.r1 SET c1 = c1 WHERE c1 = 1;
3263 Leading(r1 t1 t2 t3 t4)
3269 \! sql/maskout.sh results/ut-R.tmpout
3271 -----------------------------------------------------------------------------------------------
3272 Aggregate (cost=xxx rows=1 width=xxx)
3273 -> Nested Loop (cost=xxx rows=1 width=xxx)
3274 Join Filter: (t1.c1 = t4.c1)
3275 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3276 TID Cond: (ctid = '(1,1)'::tid)
3277 -> Nested Loop (cost=xxx rows=1 width=xxx)
3278 Join Filter: (t1.c1 = t3.c1)
3279 -> Merge Join (cost=xxx rows=1 width=xxx)
3280 Merge Cond: (t1.c1 = t2.c1)
3281 -> Nested Loop (cost=xxx rows=6 width=xxx)
3282 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
3283 Filter: (ctid = '(1,1)'::tid)
3284 -> Seq Scan on r1 (cost=xxx rows=6 width=xxx)
3286 -> Sort (cost=xxx rows=1 width=xxx)
3288 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3289 Filter: (ctid = '(1,1)'::tid)
3290 -> Materialize (cost=xxx rows=1 width=xxx)
3291 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3292 TID Cond: (ctid = '(1,1)'::tid)
3295 \o results/ut-R.tmpout
3297 Leading(r1 t1 t2 t3 t4)
3298 Rows(r1 t1 t2 t3 t4 #2)
3299 Rows(r1 t1 t2 t3 #2)
3303 EXPLAIN UPDATE s1.r1 SET c1 = c1 WHERE c1 = 1;
3306 Leading(r1 t1 t2 t3 t4)
3309 Rows(r1 t1 t2 t3 #2)
3310 Rows(r1 t1 t2 t3 t4 #2)
3316 \! sql/maskout.sh results/ut-R.tmpout
3318 ---------------------------------------------------------------------------------
3319 Aggregate (cost=xxx rows=1 width=xxx)
3320 -> Nested Loop (cost=xxx rows=2 width=xxx)
3321 Join Filter: (t1.c1 = t4.c1)
3322 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3323 TID Cond: (ctid = '(1,1)'::tid)
3324 -> Nested Loop (cost=xxx rows=2 width=xxx)
3325 Join Filter: (t1.c1 = t3.c1)
3326 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3327 TID Cond: (ctid = '(1,1)'::tid)
3328 -> Nested Loop (cost=xxx rows=2 width=xxx)
3329 Join Filter: (t1.c1 = t2.c1)
3330 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3331 Filter: (ctid = '(1,1)'::tid)
3332 -> Nested Loop (cost=xxx rows=2 width=xxx)
3333 -> Tid Scan on t1 (cost=xxx rows=1 width=xxx)
3334 TID Cond: (ctid = '(1,1)'::tid)
3335 -> Seq Scan on r1 (cost=xxx rows=6 width=xxx)
3339 \o results/ut-R.tmpout
3341 Leading(r1_ b1t1 b1t2 b1t3 b1t4)
3343 EXPLAIN UPDATE s1.r1_ SET c1 = c1 WHERE c1 = 1;
3346 Leading(r1_ b1t1 b1t2 b1t3 b1t4)
3352 \! sql/maskout.sh results/ut-R.tmpout
3354 ----------------------------------------------------------------------------------------------------
3355 Aggregate (cost=xxx rows=1 width=xxx)
3356 -> Nested Loop (cost=xxx rows=1 width=xxx)
3357 Join Filter: (b1t1.c1 = b1t4.c1)
3358 -> Tid Scan on t4 b1t4 (cost=xxx rows=1 width=xxx)
3359 TID Cond: (ctid = '(1,1)'::tid)
3360 -> Nested Loop (cost=xxx rows=1 width=xxx)
3361 Join Filter: (b1t1.c1 = b1t3.c1)
3362 -> Merge Join (cost=xxx rows=1 width=xxx)
3363 Merge Cond: (b1t1.c1 = b1t2.c1)
3364 -> Nested Loop (cost=xxx rows=6 width=xxx)
3365 -> Index Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
3366 Filter: (ctid = '(1,1)'::tid)
3367 -> Seq Scan on r1_ (cost=xxx rows=6 width=xxx)
3369 -> Sort (cost=xxx rows=1 width=xxx)
3371 -> Seq Scan on t2 b1t2 (cost=xxx rows=1 width=xxx)
3372 Filter: (ctid = '(1,1)'::tid)
3373 -> Materialize (cost=xxx rows=1 width=xxx)
3374 -> Tid Scan on t3 b1t3 (cost=xxx rows=1 width=xxx)
3375 TID Cond: (ctid = '(1,1)'::tid)
3378 \o results/ut-R.tmpout
3380 Leading(r1_ b1t1 b1t2 b1t3 b1t4)
3381 Rows(r1_ b1t1 b1t2 b1t3 b1t4 #2)
3382 Rows(r1_ b1t1 b1t2 b1t3 #2)
3383 Rows(r1_ b1t1 b1t2 #2)
3386 EXPLAIN UPDATE s1.r1_ SET c1 = c1 WHERE c1 = 1;
3389 Leading(r1_ b1t1 b1t2 b1t3 b1t4)
3391 Rows(b1t1 b1t2 r1_ #2)
3392 Rows(b1t1 b1t2 b1t3 r1_ #2)
3393 Rows(b1t1 b1t2 b1t3 b1t4 r1_ #2)
3399 \! sql/maskout.sh results/ut-R.tmpout
3401 -------------------------------------------------------------------------------------
3402 Aggregate (cost=xxx rows=1 width=xxx)
3403 -> Nested Loop (cost=xxx rows=2 width=xxx)
3404 Join Filter: (b1t1.c1 = b1t4.c1)
3405 -> Tid Scan on t4 b1t4 (cost=xxx rows=1 width=xxx)
3406 TID Cond: (ctid = '(1,1)'::tid)
3407 -> Nested Loop (cost=xxx rows=2 width=xxx)
3408 Join Filter: (b1t1.c1 = b1t3.c1)
3409 -> Tid Scan on t3 b1t3 (cost=xxx rows=1 width=xxx)
3410 TID Cond: (ctid = '(1,1)'::tid)
3411 -> Nested Loop (cost=xxx rows=2 width=xxx)
3412 Join Filter: (b1t1.c1 = b1t2.c1)
3413 -> Seq Scan on t2 b1t2 (cost=xxx rows=1 width=xxx)
3414 Filter: (ctid = '(1,1)'::tid)
3415 -> Nested Loop (cost=xxx rows=2 width=xxx)
3416 -> Tid Scan on t1 b1t1 (cost=xxx rows=1 width=xxx)
3417 TID Cond: (ctid = '(1,1)'::tid)
3418 -> Seq Scan on r1_ (cost=xxx rows=6 width=xxx)
3423 \o results/ut-R.tmpout
3425 Leading(r2 t1 t2 t3 t4)
3427 EXPLAIN UPDATE s1.r2 SET c1 = c1 WHERE c1 = 1;
3430 Leading(r2 t1 t2 t3 t4)
3437 Leading(r2 t1 t2 t3 t4)
3443 \! sql/maskout.sh results/ut-R.tmpout
3445 -----------------------------------------------------------------------------------------------
3446 Aggregate (cost=xxx rows=1 width=xxx)
3447 -> Nested Loop (cost=xxx rows=1 width=xxx)
3448 Join Filter: (t1.c1 = t4.c1)
3449 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3450 TID Cond: (ctid = '(1,1)'::tid)
3451 -> Nested Loop (cost=xxx rows=1 width=xxx)
3452 Join Filter: (t1.c1 = t3.c1)
3453 -> Merge Join (cost=xxx rows=1 width=xxx)
3454 Merge Cond: (t1.c1 = t2.c1)
3455 -> Nested Loop (cost=xxx rows=6 width=xxx)
3456 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
3457 Filter: (ctid = '(1,1)'::tid)
3458 -> Seq Scan on r2 (cost=xxx rows=6 width=xxx)
3460 -> Sort (cost=xxx rows=1 width=xxx)
3462 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3463 Filter: (ctid = '(1,1)'::tid)
3464 -> Materialize (cost=xxx rows=1 width=xxx)
3465 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3466 TID Cond: (ctid = '(1,1)'::tid)
3468 Aggregate (cost=xxx rows=1 width=xxx)
3469 -> Nested Loop (cost=xxx rows=1 width=xxx)
3470 Join Filter: (t1.c1 = t4.c1)
3471 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3472 TID Cond: (ctid = '(1,1)'::tid)
3473 -> Nested Loop (cost=xxx rows=1 width=xxx)
3474 Join Filter: (t1.c1 = t3.c1)
3475 -> Merge Join (cost=xxx rows=1 width=xxx)
3476 Merge Cond: (t1.c1 = t2.c1)
3477 -> Nested Loop (cost=xxx rows=6 width=xxx)
3478 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
3479 Filter: (ctid = '(1,1)'::tid)
3480 -> Seq Scan on r2 (cost=xxx rows=6 width=xxx)
3482 -> Sort (cost=xxx rows=1 width=xxx)
3484 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3485 Filter: (ctid = '(1,1)'::tid)
3486 -> Materialize (cost=xxx rows=1 width=xxx)
3487 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3488 TID Cond: (ctid = '(1,1)'::tid)
3491 \o results/ut-R.tmpout
3493 Leading(r2 t1 t2 t3 t4)
3494 Rows(r2 t1 t2 t3 t4 #2)
3495 Rows(r2 t1 t2 t3 #2)
3499 EXPLAIN UPDATE s1.r2 SET c1 = c1 WHERE c1 = 1;
3502 Leading(r2 t1 t2 t3 t4)
3505 Rows(r2 t1 t2 t3 #2)
3506 Rows(r2 t1 t2 t3 t4 #2)
3513 Leading(r2 t1 t2 t3 t4)
3516 Rows(r2 t1 t2 t3 #2)
3517 Rows(r2 t1 t2 t3 t4 #2)
3523 \! sql/maskout.sh results/ut-R.tmpout
3525 ---------------------------------------------------------------------------------
3526 Aggregate (cost=xxx rows=1 width=xxx)
3527 -> Nested Loop (cost=xxx rows=2 width=xxx)
3528 Join Filter: (t1.c1 = t4.c1)
3529 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3530 TID Cond: (ctid = '(1,1)'::tid)
3531 -> Nested Loop (cost=xxx rows=2 width=xxx)
3532 Join Filter: (t1.c1 = t3.c1)
3533 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3534 TID Cond: (ctid = '(1,1)'::tid)
3535 -> Nested Loop (cost=xxx rows=2 width=xxx)
3536 Join Filter: (t1.c1 = t2.c1)
3537 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3538 Filter: (ctid = '(1,1)'::tid)
3539 -> Nested Loop (cost=xxx rows=2 width=xxx)
3540 -> Tid Scan on t1 (cost=xxx rows=1 width=xxx)
3541 TID Cond: (ctid = '(1,1)'::tid)
3542 -> Seq Scan on r2 (cost=xxx rows=6 width=xxx)
3545 Aggregate (cost=xxx rows=1 width=xxx)
3546 -> Nested Loop (cost=xxx rows=2 width=xxx)
3547 Join Filter: (t1.c1 = t4.c1)
3548 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3549 TID Cond: (ctid = '(1,1)'::tid)
3550 -> Nested Loop (cost=xxx rows=2 width=xxx)
3551 Join Filter: (t1.c1 = t3.c1)
3552 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3553 TID Cond: (ctid = '(1,1)'::tid)
3554 -> Nested Loop (cost=xxx rows=2 width=xxx)
3555 Join Filter: (t1.c1 = t2.c1)
3556 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3557 Filter: (ctid = '(1,1)'::tid)
3558 -> Nested Loop (cost=xxx rows=2 width=xxx)
3559 -> Tid Scan on t1 (cost=xxx rows=1 width=xxx)
3560 TID Cond: (ctid = '(1,1)'::tid)
3561 -> Seq Scan on r2 (cost=xxx rows=6 width=xxx)
3565 \o results/ut-R.tmpout
3567 Leading(r2_ b1t1 b1t2 b1t3 b1t4)
3568 Leading(r2_ b2t1 b2t2 b2t3 b2t4)
3570 EXPLAIN UPDATE s1.r2_ SET c1 = c1 WHERE c1 = 1;
3573 Leading(r2_ b1t1 b1t2 b1t3 b1t4)
3575 Leading(r2_ b2t1 b2t2 b2t3 b2t4)
3581 Leading(r2_ b2t1 b2t2 b2t3 b2t4)
3583 Leading(r2_ b1t1 b1t2 b1t3 b1t4)
3588 \! sql/maskout.sh results/ut-R.tmpout
3590 ----------------------------------------------------------------------------------------------------
3591 Aggregate (cost=xxx rows=1 width=xxx)
3592 -> Nested Loop (cost=xxx rows=1 width=xxx)
3593 Join Filter: (b1t1.c1 = b1t4.c1)
3594 -> Tid Scan on t4 b1t4 (cost=xxx rows=1 width=xxx)
3595 TID Cond: (ctid = '(1,1)'::tid)
3596 -> Nested Loop (cost=xxx rows=1 width=xxx)
3597 Join Filter: (b1t1.c1 = b1t3.c1)
3598 -> Merge Join (cost=xxx rows=1 width=xxx)
3599 Merge Cond: (b1t1.c1 = b1t2.c1)
3600 -> Nested Loop (cost=xxx rows=6 width=xxx)
3601 -> Index Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
3602 Filter: (ctid = '(1,1)'::tid)
3603 -> Seq Scan on r2_ (cost=xxx rows=6 width=xxx)
3605 -> Sort (cost=xxx rows=1 width=xxx)
3607 -> Seq Scan on t2 b1t2 (cost=xxx rows=1 width=xxx)
3608 Filter: (ctid = '(1,1)'::tid)
3609 -> Materialize (cost=xxx rows=1 width=xxx)
3610 -> Tid Scan on t3 b1t3 (cost=xxx rows=1 width=xxx)
3611 TID Cond: (ctid = '(1,1)'::tid)
3613 Aggregate (cost=xxx rows=1 width=xxx)
3614 -> Nested Loop (cost=xxx rows=1 width=xxx)
3615 Join Filter: (b2t1.c1 = b2t4.c1)
3616 -> Tid Scan on t4 b2t4 (cost=xxx rows=1 width=xxx)
3617 TID Cond: (ctid = '(1,1)'::tid)
3618 -> Nested Loop (cost=xxx rows=1 width=xxx)
3619 Join Filter: (b2t1.c1 = b2t3.c1)
3620 -> Merge Join (cost=xxx rows=1 width=xxx)
3621 Merge Cond: (b2t1.c1 = b2t2.c1)
3622 -> Nested Loop (cost=xxx rows=6 width=xxx)
3623 -> Index Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1 width=xxx)
3624 Filter: (ctid = '(1,1)'::tid)
3625 -> Seq Scan on r2_ (cost=xxx rows=6 width=xxx)
3627 -> Sort (cost=xxx rows=1 width=xxx)
3629 -> Seq Scan on t2 b2t2 (cost=xxx rows=1 width=xxx)
3630 Filter: (ctid = '(1,1)'::tid)
3631 -> Materialize (cost=xxx rows=1 width=xxx)
3632 -> Tid Scan on t3 b2t3 (cost=xxx rows=1 width=xxx)
3633 TID Cond: (ctid = '(1,1)'::tid)
3636 \o results/ut-R.tmpout
3638 Leading(r2_ b1t1 b1t2 b1t3 b1t4)
3639 Leading(r2_ b2t1 b2t2 b2t3 b2t4)
3641 Rows(r2_ b1t1 b1t2 #2)
3642 Rows(r2_ b1t1 b1t2 b1t3 #2)
3643 Rows(r2_ b1t1 b1t2 b1t3 b1t4 #2)
3645 Rows(r2_ b2t1 b2t2 #2)
3646 Rows(r2_ b2t1 b2t2 b2t3 #2)
3647 Rows(r2_ b2t1 b2t2 b2t3 b2t4 #2)
3649 EXPLAIN UPDATE s1.r2_ SET c1 = c1 WHERE c1 = 1;
3652 Leading(r2_ b1t1 b1t2 b1t3 b1t4)
3654 Rows(b1t1 b1t2 r2_ #2)
3655 Rows(b1t1 b1t2 b1t3 r2_ #2)
3656 Rows(b1t1 b1t2 b1t3 b1t4 r2_ #2)
3658 Leading(r2_ b2t1 b2t2 b2t3 b2t4)
3660 Rows(b2t1 b2t2 r2_ #2)
3661 Rows(b2t1 b2t2 b2t3 r2_ #2)
3662 Rows(b2t1 b2t2 b2t3 b2t4 r2_ #2)
3668 Leading(r2_ b2t1 b2t2 b2t3 b2t4)
3670 Rows(b2t1 b2t2 r2_ #2)
3671 Rows(b2t1 b2t2 b2t3 r2_ #2)
3672 Rows(b2t1 b2t2 b2t3 b2t4 r2_ #2)
3674 Leading(r2_ b1t1 b1t2 b1t3 b1t4)
3676 Rows(b1t1 b1t2 r2_ #2)
3677 Rows(b1t1 b1t2 b1t3 r2_ #2)
3678 Rows(b1t1 b1t2 b1t3 b1t4 r2_ #2)
3683 \! sql/maskout.sh results/ut-R.tmpout
3685 -------------------------------------------------------------------------------------
3686 Aggregate (cost=xxx rows=1 width=xxx)
3687 -> Nested Loop (cost=xxx rows=2 width=xxx)
3688 Join Filter: (b1t1.c1 = b1t4.c1)
3689 -> Tid Scan on t4 b1t4 (cost=xxx rows=1 width=xxx)
3690 TID Cond: (ctid = '(1,1)'::tid)
3691 -> Nested Loop (cost=xxx rows=2 width=xxx)
3692 Join Filter: (b1t1.c1 = b1t3.c1)
3693 -> Tid Scan on t3 b1t3 (cost=xxx rows=1 width=xxx)
3694 TID Cond: (ctid = '(1,1)'::tid)
3695 -> Nested Loop (cost=xxx rows=2 width=xxx)
3696 Join Filter: (b1t1.c1 = b1t2.c1)
3697 -> Seq Scan on t2 b1t2 (cost=xxx rows=1 width=xxx)
3698 Filter: (ctid = '(1,1)'::tid)
3699 -> Nested Loop (cost=xxx rows=2 width=xxx)
3700 -> Tid Scan on t1 b1t1 (cost=xxx rows=1 width=xxx)
3701 TID Cond: (ctid = '(1,1)'::tid)
3702 -> Seq Scan on r2_ (cost=xxx rows=6 width=xxx)
3705 Aggregate (cost=xxx rows=1 width=xxx)
3706 -> Nested Loop (cost=xxx rows=2 width=xxx)
3707 Join Filter: (b2t1.c1 = b2t4.c1)
3708 -> Tid Scan on t4 b2t4 (cost=xxx rows=1 width=xxx)
3709 TID Cond: (ctid = '(1,1)'::tid)
3710 -> Nested Loop (cost=xxx rows=2 width=xxx)
3711 Join Filter: (b2t1.c1 = b2t3.c1)
3712 -> Tid Scan on t3 b2t3 (cost=xxx rows=1 width=xxx)
3713 TID Cond: (ctid = '(1,1)'::tid)
3714 -> Nested Loop (cost=xxx rows=2 width=xxx)
3715 Join Filter: (b2t1.c1 = b2t2.c1)
3716 -> Seq Scan on t2 b2t2 (cost=xxx rows=1 width=xxx)
3717 Filter: (ctid = '(1,1)'::tid)
3718 -> Nested Loop (cost=xxx rows=2 width=xxx)
3719 -> Tid Scan on t1 b2t1 (cost=xxx rows=1 width=xxx)
3720 TID Cond: (ctid = '(1,1)'::tid)
3721 -> Seq Scan on r2_ (cost=xxx rows=6 width=xxx)
3726 \o results/ut-R.tmpout
3728 Leading(r3 t1 t2 t3 t4)
3730 EXPLAIN UPDATE s1.r3 SET c1 = c1 WHERE c1 = 1;
3733 Leading(r3 t1 t2 t3 t4)
3740 Leading(r3 t1 t2 t3 t4)
3747 Leading(r3 t1 t2 t3 t4)
3753 \! sql/maskout.sh results/ut-R.tmpout
3755 -----------------------------------------------------------------------------------------------
3756 Aggregate (cost=xxx rows=1 width=xxx)
3757 -> Nested Loop (cost=xxx rows=1 width=xxx)
3758 Join Filter: (t1.c1 = t4.c1)
3759 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3760 TID Cond: (ctid = '(1,1)'::tid)
3761 -> Nested Loop (cost=xxx rows=1 width=xxx)
3762 Join Filter: (t1.c1 = t3.c1)
3763 -> Merge Join (cost=xxx rows=1 width=xxx)
3764 Merge Cond: (t1.c1 = t2.c1)
3765 -> Nested Loop (cost=xxx rows=6 width=xxx)
3766 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
3767 Filter: (ctid = '(1,1)'::tid)
3768 -> Seq Scan on r3 (cost=xxx rows=6 width=xxx)
3770 -> Sort (cost=xxx rows=1 width=xxx)
3772 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3773 Filter: (ctid = '(1,1)'::tid)
3774 -> Materialize (cost=xxx rows=1 width=xxx)
3775 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3776 TID Cond: (ctid = '(1,1)'::tid)
3778 Aggregate (cost=xxx rows=1 width=xxx)
3779 -> Nested Loop (cost=xxx rows=1 width=xxx)
3780 Join Filter: (t1.c1 = t4.c1)
3781 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3782 TID Cond: (ctid = '(1,1)'::tid)
3783 -> Nested Loop (cost=xxx rows=1 width=xxx)
3784 Join Filter: (t1.c1 = t3.c1)
3785 -> Merge Join (cost=xxx rows=1 width=xxx)
3786 Merge Cond: (t1.c1 = t2.c1)
3787 -> Nested Loop (cost=xxx rows=6 width=xxx)
3788 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
3789 Filter: (ctid = '(1,1)'::tid)
3790 -> Seq Scan on r3 (cost=xxx rows=6 width=xxx)
3792 -> Sort (cost=xxx rows=1 width=xxx)
3794 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3795 Filter: (ctid = '(1,1)'::tid)
3796 -> Materialize (cost=xxx rows=1 width=xxx)
3797 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3798 TID Cond: (ctid = '(1,1)'::tid)
3800 Aggregate (cost=xxx rows=1 width=xxx)
3801 -> Nested Loop (cost=xxx rows=1 width=xxx)
3802 Join Filter: (t1.c1 = t4.c1)
3803 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3804 TID Cond: (ctid = '(1,1)'::tid)
3805 -> Nested Loop (cost=xxx rows=1 width=xxx)
3806 Join Filter: (t1.c1 = t3.c1)
3807 -> Merge Join (cost=xxx rows=1 width=xxx)
3808 Merge Cond: (t1.c1 = t2.c1)
3809 -> Nested Loop (cost=xxx rows=6 width=xxx)
3810 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
3811 Filter: (ctid = '(1,1)'::tid)
3812 -> Seq Scan on r3 (cost=xxx rows=6 width=xxx)
3814 -> Sort (cost=xxx rows=1 width=xxx)
3816 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3817 Filter: (ctid = '(1,1)'::tid)
3818 -> Materialize (cost=xxx rows=1 width=xxx)
3819 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3820 TID Cond: (ctid = '(1,1)'::tid)
3823 \o results/ut-R.tmpout
3825 Leading(r3 t1 t2 t3 t4)
3826 Rows(r3 t1 t2 t3 t4 #2)
3827 Rows(r3 t1 t2 t3 #2)
3831 EXPLAIN UPDATE s1.r3 SET c1 = c1 WHERE c1 = 1;
3834 Leading(r3 t1 t2 t3 t4)
3837 Rows(r3 t1 t2 t3 #2)
3838 Rows(r3 t1 t2 t3 t4 #2)
3845 Leading(r3 t1 t2 t3 t4)
3848 Rows(r3 t1 t2 t3 #2)
3849 Rows(r3 t1 t2 t3 t4 #2)
3856 Leading(r3 t1 t2 t3 t4)
3859 Rows(r3 t1 t2 t3 #2)
3860 Rows(r3 t1 t2 t3 t4 #2)
3866 \! sql/maskout.sh results/ut-R.tmpout
3868 ---------------------------------------------------------------------------------
3869 Aggregate (cost=xxx rows=1 width=xxx)
3870 -> Nested Loop (cost=xxx rows=2 width=xxx)
3871 Join Filter: (t1.c1 = t4.c1)
3872 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3873 TID Cond: (ctid = '(1,1)'::tid)
3874 -> Nested Loop (cost=xxx rows=2 width=xxx)
3875 Join Filter: (t1.c1 = t3.c1)
3876 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3877 TID Cond: (ctid = '(1,1)'::tid)
3878 -> Nested Loop (cost=xxx rows=2 width=xxx)
3879 Join Filter: (t1.c1 = t2.c1)
3880 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3881 Filter: (ctid = '(1,1)'::tid)
3882 -> Nested Loop (cost=xxx rows=2 width=xxx)
3883 -> Tid Scan on t1 (cost=xxx rows=1 width=xxx)
3884 TID Cond: (ctid = '(1,1)'::tid)
3885 -> Seq Scan on r3 (cost=xxx rows=6 width=xxx)
3888 Aggregate (cost=xxx rows=1 width=xxx)
3889 -> Nested Loop (cost=xxx rows=2 width=xxx)
3890 Join Filter: (t1.c1 = t4.c1)
3891 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3892 TID Cond: (ctid = '(1,1)'::tid)
3893 -> Nested Loop (cost=xxx rows=2 width=xxx)
3894 Join Filter: (t1.c1 = t3.c1)
3895 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3896 TID Cond: (ctid = '(1,1)'::tid)
3897 -> Nested Loop (cost=xxx rows=2 width=xxx)
3898 Join Filter: (t1.c1 = t2.c1)
3899 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3900 Filter: (ctid = '(1,1)'::tid)
3901 -> Nested Loop (cost=xxx rows=2 width=xxx)
3902 -> Tid Scan on t1 (cost=xxx rows=1 width=xxx)
3903 TID Cond: (ctid = '(1,1)'::tid)
3904 -> Seq Scan on r3 (cost=xxx rows=6 width=xxx)
3907 Aggregate (cost=xxx rows=1 width=xxx)
3908 -> Nested Loop (cost=xxx rows=2 width=xxx)
3909 Join Filter: (t1.c1 = t4.c1)
3910 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3911 TID Cond: (ctid = '(1,1)'::tid)
3912 -> Nested Loop (cost=xxx rows=2 width=xxx)
3913 Join Filter: (t1.c1 = t3.c1)
3914 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3915 TID Cond: (ctid = '(1,1)'::tid)
3916 -> Nested Loop (cost=xxx rows=2 width=xxx)
3917 Join Filter: (t1.c1 = t2.c1)
3918 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3919 Filter: (ctid = '(1,1)'::tid)
3920 -> Nested Loop (cost=xxx rows=2 width=xxx)
3921 -> Tid Scan on t1 (cost=xxx rows=1 width=xxx)
3922 TID Cond: (ctid = '(1,1)'::tid)
3923 -> Seq Scan on r3 (cost=xxx rows=6 width=xxx)
3927 \o results/ut-R.tmpout
3929 Leading(r3_ b1t1 b1t2 b1t3 b1t4)
3930 Leading(r3_ b2t1 b2t2 b2t3 b2t4)
3931 Leading(r3_ b3t1 b3t2 b3t3 b3t4)
3933 EXPLAIN UPDATE s1.r3_ SET c1 = c1 WHERE c1 = 1;
3936 Leading(r3_ b1t1 b1t2 b1t3 b1t4)
3938 Leading(r3_ b2t1 b2t2 b2t3 b2t4)
3939 Leading(r3_ b3t1 b3t2 b3t3 b3t4)
3945 Leading(r3_ b2t1 b2t2 b2t3 b2t4)
3947 Leading(r3_ b1t1 b1t2 b1t3 b1t4)
3948 Leading(r3_ b3t1 b3t2 b3t3 b3t4)
3954 Leading(r3_ b3t1 b3t2 b3t3 b3t4)
3956 Leading(r3_ b1t1 b1t2 b1t3 b1t4)
3957 Leading(r3_ b2t1 b2t2 b2t3 b2t4)
3962 \! sql/maskout.sh results/ut-R.tmpout
3964 ----------------------------------------------------------------------------------------------------
3965 Aggregate (cost=xxx rows=1 width=xxx)
3966 -> Nested Loop (cost=xxx rows=1 width=xxx)
3967 Join Filter: (b1t1.c1 = b1t4.c1)
3968 -> Tid Scan on t4 b1t4 (cost=xxx rows=1 width=xxx)
3969 TID Cond: (ctid = '(1,1)'::tid)
3970 -> Nested Loop (cost=xxx rows=1 width=xxx)
3971 Join Filter: (b1t1.c1 = b1t3.c1)
3972 -> Merge Join (cost=xxx rows=1 width=xxx)
3973 Merge Cond: (b1t1.c1 = b1t2.c1)
3974 -> Nested Loop (cost=xxx rows=6 width=xxx)
3975 -> Index Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
3976 Filter: (ctid = '(1,1)'::tid)
3977 -> Seq Scan on r3_ (cost=xxx rows=6 width=xxx)
3979 -> Sort (cost=xxx rows=1 width=xxx)
3981 -> Seq Scan on t2 b1t2 (cost=xxx rows=1 width=xxx)
3982 Filter: (ctid = '(1,1)'::tid)
3983 -> Materialize (cost=xxx rows=1 width=xxx)
3984 -> Tid Scan on t3 b1t3 (cost=xxx rows=1 width=xxx)
3985 TID Cond: (ctid = '(1,1)'::tid)
3987 Aggregate (cost=xxx rows=1 width=xxx)
3988 -> Nested Loop (cost=xxx rows=1 width=xxx)
3989 Join Filter: (b2t1.c1 = b2t4.c1)
3990 -> Tid Scan on t4 b2t4 (cost=xxx rows=1 width=xxx)
3991 TID Cond: (ctid = '(1,1)'::tid)
3992 -> Nested Loop (cost=xxx rows=1 width=xxx)
3993 Join Filter: (b2t1.c1 = b2t3.c1)
3994 -> Merge Join (cost=xxx rows=1 width=xxx)
3995 Merge Cond: (b2t1.c1 = b2t2.c1)
3996 -> Nested Loop (cost=xxx rows=6 width=xxx)
3997 -> Index Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1 width=xxx)
3998 Filter: (ctid = '(1,1)'::tid)
3999 -> Seq Scan on r3_ (cost=xxx rows=6 width=xxx)
4001 -> Sort (cost=xxx rows=1 width=xxx)
4003 -> Seq Scan on t2 b2t2 (cost=xxx rows=1 width=xxx)
4004 Filter: (ctid = '(1,1)'::tid)
4005 -> Materialize (cost=xxx rows=1 width=xxx)
4006 -> Tid Scan on t3 b2t3 (cost=xxx rows=1 width=xxx)
4007 TID Cond: (ctid = '(1,1)'::tid)
4009 Aggregate (cost=xxx rows=1 width=xxx)
4010 -> Nested Loop (cost=xxx rows=1 width=xxx)
4011 Join Filter: (b3t1.c1 = b3t4.c1)
4012 -> Tid Scan on t4 b3t4 (cost=xxx rows=1 width=xxx)
4013 TID Cond: (ctid = '(1,1)'::tid)
4014 -> Nested Loop (cost=xxx rows=1 width=xxx)
4015 Join Filter: (b3t1.c1 = b3t3.c1)
4016 -> Merge Join (cost=xxx rows=1 width=xxx)
4017 Merge Cond: (b3t1.c1 = b3t2.c1)
4018 -> Nested Loop (cost=xxx rows=6 width=xxx)
4019 -> Index Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1 width=xxx)
4020 Filter: (ctid = '(1,1)'::tid)
4021 -> Seq Scan on r3_ (cost=xxx rows=6 width=xxx)
4023 -> Sort (cost=xxx rows=1 width=xxx)
4025 -> Seq Scan on t2 b3t2 (cost=xxx rows=1 width=xxx)
4026 Filter: (ctid = '(1,1)'::tid)
4027 -> Materialize (cost=xxx rows=1 width=xxx)
4028 -> Tid Scan on t3 b3t3 (cost=xxx rows=1 width=xxx)
4029 TID Cond: (ctid = '(1,1)'::tid)
4032 \o results/ut-R.tmpout
4034 Leading(r3_ b1t1 b1t2 b1t3 b1t4)
4035 Leading(r3_ b2t1 b2t2 b2t3 b2t4)
4036 Leading(r3_ b3t1 b3t2 b3t3 b3t4)
4038 Rows(r3_ b1t1 b1t2 #2)
4039 Rows(r3_ b1t1 b1t2 b1t3 #2)
4040 Rows(r3_ b1t1 b1t2 b1t3 b1t4 #2)
4042 Rows(r3_ b2t1 b2t2 #2)
4043 Rows(r3_ b2t1 b2t2 b2t3 #2)
4044 Rows(r3_ b2t1 b2t2 b2t3 b2t4 #2)
4046 Rows(r3_ b3t1 b3t2 #2)
4047 Rows(r3_ b3t1 b3t2 b3t3 #2)
4048 Rows(r3_ b3t1 b3t2 b3t3 b3t4 #2)
4050 EXPLAIN UPDATE s1.r3_ SET c1 = c1 WHERE c1 = 1;
4053 Leading(r3_ b1t1 b1t2 b1t3 b1t4)
4055 Rows(b1t1 b1t2 r3_ #2)
4056 Rows(b1t1 b1t2 b1t3 r3_ #2)
4057 Rows(b1t1 b1t2 b1t3 b1t4 r3_ #2)
4059 Leading(r3_ b2t1 b2t2 b2t3 b2t4)
4060 Leading(r3_ b3t1 b3t2 b3t3 b3t4)
4063 Rows(b2t1 b2t2 r3_ #2)
4064 Rows(b3t1 b3t2 r3_ #2)
4065 Rows(b2t1 b2t2 b2t3 r3_ #2)
4066 Rows(b3t1 b3t2 b3t3 r3_ #2)
4067 Rows(b2t1 b2t2 b2t3 b2t4 r3_ #2)
4068 Rows(b3t1 b3t2 b3t3 b3t4 r3_ #2)
4074 Leading(r3_ b2t1 b2t2 b2t3 b2t4)
4076 Rows(b2t1 b2t2 r3_ #2)
4077 Rows(b2t1 b2t2 b2t3 r3_ #2)
4078 Rows(b2t1 b2t2 b2t3 b2t4 r3_ #2)
4080 Leading(r3_ b1t1 b1t2 b1t3 b1t4)
4081 Leading(r3_ b3t1 b3t2 b3t3 b3t4)
4084 Rows(b1t1 b1t2 r3_ #2)
4085 Rows(b3t1 b3t2 r3_ #2)
4086 Rows(b1t1 b1t2 b1t3 r3_ #2)
4087 Rows(b3t1 b3t2 b3t3 r3_ #2)
4088 Rows(b1t1 b1t2 b1t3 b1t4 r3_ #2)
4089 Rows(b3t1 b3t2 b3t3 b3t4 r3_ #2)
4095 Leading(r3_ b3t1 b3t2 b3t3 b3t4)
4097 Rows(b3t1 b3t2 r3_ #2)
4098 Rows(b3t1 b3t2 b3t3 r3_ #2)
4099 Rows(b3t1 b3t2 b3t3 b3t4 r3_ #2)
4101 Leading(r3_ b1t1 b1t2 b1t3 b1t4)
4102 Leading(r3_ b2t1 b2t2 b2t3 b2t4)
4105 Rows(b1t1 b1t2 r3_ #2)
4106 Rows(b2t1 b2t2 r3_ #2)
4107 Rows(b1t1 b1t2 b1t3 r3_ #2)
4108 Rows(b2t1 b2t2 b2t3 r3_ #2)
4109 Rows(b1t1 b1t2 b1t3 b1t4 r3_ #2)
4110 Rows(b2t1 b2t2 b2t3 b2t4 r3_ #2)
4115 \! sql/maskout.sh results/ut-R.tmpout
4117 -------------------------------------------------------------------------------------
4118 Aggregate (cost=xxx rows=1 width=xxx)
4119 -> Nested Loop (cost=xxx rows=2 width=xxx)
4120 Join Filter: (b1t1.c1 = b1t4.c1)
4121 -> Tid Scan on t4 b1t4 (cost=xxx rows=1 width=xxx)
4122 TID Cond: (ctid = '(1,1)'::tid)
4123 -> Nested Loop (cost=xxx rows=2 width=xxx)
4124 Join Filter: (b1t1.c1 = b1t3.c1)
4125 -> Tid Scan on t3 b1t3 (cost=xxx rows=1 width=xxx)
4126 TID Cond: (ctid = '(1,1)'::tid)
4127 -> Nested Loop (cost=xxx rows=2 width=xxx)
4128 Join Filter: (b1t1.c1 = b1t2.c1)
4129 -> Seq Scan on t2 b1t2 (cost=xxx rows=1 width=xxx)
4130 Filter: (ctid = '(1,1)'::tid)
4131 -> Nested Loop (cost=xxx rows=2 width=xxx)
4132 -> Tid Scan on t1 b1t1 (cost=xxx rows=1 width=xxx)
4133 TID Cond: (ctid = '(1,1)'::tid)
4134 -> Seq Scan on r3_ (cost=xxx rows=6 width=xxx)
4137 Aggregate (cost=xxx rows=1 width=xxx)
4138 -> Nested Loop (cost=xxx rows=2 width=xxx)
4139 Join Filter: (b2t1.c1 = b2t4.c1)
4140 -> Tid Scan on t4 b2t4 (cost=xxx rows=1 width=xxx)
4141 TID Cond: (ctid = '(1,1)'::tid)
4142 -> Nested Loop (cost=xxx rows=2 width=xxx)
4143 Join Filter: (b2t1.c1 = b2t3.c1)
4144 -> Tid Scan on t3 b2t3 (cost=xxx rows=1 width=xxx)
4145 TID Cond: (ctid = '(1,1)'::tid)
4146 -> Nested Loop (cost=xxx rows=2 width=xxx)
4147 Join Filter: (b2t1.c1 = b2t2.c1)
4148 -> Seq Scan on t2 b2t2 (cost=xxx rows=1 width=xxx)
4149 Filter: (ctid = '(1,1)'::tid)
4150 -> Nested Loop (cost=xxx rows=2 width=xxx)
4151 -> Tid Scan on t1 b2t1 (cost=xxx rows=1 width=xxx)
4152 TID Cond: (ctid = '(1,1)'::tid)
4153 -> Seq Scan on r3_ (cost=xxx rows=6 width=xxx)
4156 Aggregate (cost=xxx rows=1 width=xxx)
4157 -> Nested Loop (cost=xxx rows=2 width=xxx)
4158 Join Filter: (b3t1.c1 = b3t4.c1)
4159 -> Tid Scan on t4 b3t4 (cost=xxx rows=1 width=xxx)
4160 TID Cond: (ctid = '(1,1)'::tid)
4161 -> Nested Loop (cost=xxx rows=2 width=xxx)
4162 Join Filter: (b3t1.c1 = b3t3.c1)
4163 -> Tid Scan on t3 b3t3 (cost=xxx rows=1 width=xxx)
4164 TID Cond: (ctid = '(1,1)'::tid)
4165 -> Nested Loop (cost=xxx rows=2 width=xxx)
4166 Join Filter: (b3t1.c1 = b3t2.c1)
4167 -> Seq Scan on t2 b3t2 (cost=xxx rows=1 width=xxx)
4168 Filter: (ctid = '(1,1)'::tid)
4169 -> Nested Loop (cost=xxx rows=2 width=xxx)
4170 -> Tid Scan on t1 b3t1 (cost=xxx rows=1 width=xxx)
4171 TID Cond: (ctid = '(1,1)'::tid)
4172 -> Seq Scan on r3_ (cost=xxx rows=6 width=xxx)
4177 \o results/ut-R.tmpout
4178 /*+HashJoin(v1t1 v1t1)*/
4179 EXPLAIN SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1;
4180 INFO: pg_hint_plan: hint syntax error at or near "HashJoin(v1t1 v1t1)"
4181 DETAIL: Relation name "v1t1" is ambiguous.
4190 \! sql/maskout.sh results/ut-R.tmpout
4192 --------------------------------------------------------------------------
4193 Hash Join (cost=xxx rows=1000 width=xxx)
4194 Hash Cond: (v1t1.c1 = v1t1_1.c1)
4195 -> Seq Scan on t1 v1t1 (cost=xxx rows=1000 width=xxx)
4196 -> Hash (cost=xxx rows=1000 width=xxx)
4197 -> Seq Scan on t1 v1t1_1 (cost=xxx rows=1000 width=xxx)
4200 \o results/ut-R.tmpout
4201 /*+HashJoin(v1t1 v1t1)Rows(v1t1 v1t1 #1)*/
4202 EXPLAIN SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1;
4203 INFO: pg_hint_plan: hint syntax error at or near "HashJoin(v1t1 v1t1)Rows(v1t1 v1t1 #1)"
4204 DETAIL: Relation name "v1t1" is ambiguous.
4205 INFO: pg_hint_plan: hint syntax error at or near "Rows(v1t1 v1t1 #1)"
4206 DETAIL: Relation name "v1t1" is ambiguous.
4216 \! sql/maskout.sh results/ut-R.tmpout
4218 --------------------------------------------------------------------------
4219 Hash Join (cost=xxx rows=1000 width=xxx)
4220 Hash Cond: (v1t1.c1 = v1t1_1.c1)
4221 -> Seq Scan on t1 v1t1 (cost=xxx rows=1000 width=xxx)
4222 -> Hash (cost=xxx rows=1000 width=xxx)
4223 -> Seq Scan on t1 v1t1_1 (cost=xxx rows=1000 width=xxx)
4227 \o results/ut-R.tmpout
4228 /*+NestLoop(v1t1 v1t1_)*/
4229 EXPLAIN SELECT * FROM s1.v1 v1, s1.v1_ v2 WHERE v1.c1 = v2.c1;
4232 NestLoop(v1t1 v1t1_)
4238 \! sql/maskout.sh results/ut-R.tmpout
4240 -----------------------------------------------------------------------------
4241 Nested Loop (cost=xxx rows=1000 width=xxx)
4242 -> Seq Scan on t1 v1t1 (cost=xxx rows=1000 width=xxx)
4243 -> Index Scan using t1_i1 on t1 v1t1_ (cost=xxx rows=1 width=xxx)
4244 Index Cond: (c1 = v1t1.c1)
4247 \o results/ut-R.tmpout
4248 /*+NestLoop(v1t1 v1t1_)Rows(v1t1 v1t1_ #1)*/
4249 EXPLAIN SELECT * FROM s1.v1 v1, s1.v1_ v2 WHERE v1.c1 = v2.c1;
4252 NestLoop(v1t1 v1t1_)
4259 \! sql/maskout.sh results/ut-R.tmpout
4261 -----------------------------------------------------------------------------
4262 Nested Loop (cost=xxx rows=1 width=xxx)
4263 -> Seq Scan on t1 v1t1 (cost=xxx rows=1000 width=xxx)
4264 -> Index Scan using t1_i1 on t1 v1t1_ (cost=xxx rows=1 width=xxx)
4265 Index Cond: (c1 = v1t1.c1)
4269 \o results/ut-R.tmpout
4270 /*+RowsHashJoin(r4t1 r4t1)*/
4271 EXPLAIN SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1;
4272 INFO: pg_hint_plan: hint syntax error at or near "RowsHashJoin(r4t1 r4t1)"
4273 DETAIL: Unrecognized hint keyword "RowsHashJoin".
4275 \! sql/maskout.sh results/ut-R.tmpout
4277 --------------------------------------------------------------------------
4278 Hash Join (cost=xxx rows=1000 width=xxx)
4279 Hash Cond: (r4t1.c1 = r4t1_1.c1)
4280 -> Seq Scan on t1 r4t1 (cost=xxx rows=1000 width=xxx)
4281 -> Hash (cost=xxx rows=1000 width=xxx)
4282 -> Seq Scan on t1 r4t1_1 (cost=xxx rows=1000 width=xxx)
4285 \o results/ut-R.tmpout
4286 /*+RowsHashJoin(r4t1 r4t1)Rows(r4t1 r4t1 #1)*/
4287 EXPLAIN SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1;
4288 INFO: pg_hint_plan: hint syntax error at or near "RowsHashJoin(r4t1 r4t1)Rows(r4t1 r4t1 #1)"
4289 DETAIL: Unrecognized hint keyword "RowsHashJoin".
4291 \! sql/maskout.sh results/ut-R.tmpout
4293 --------------------------------------------------------------------------
4294 Hash Join (cost=xxx rows=1000 width=xxx)
4295 Hash Cond: (r4t1.c1 = r4t1_1.c1)
4296 -> Seq Scan on t1 r4t1 (cost=xxx rows=1000 width=xxx)
4297 -> Hash (cost=xxx rows=1000 width=xxx)
4298 -> Seq Scan on t1 r4t1_1 (cost=xxx rows=1000 width=xxx)
4302 \o results/ut-R.tmpout
4303 /*+NestLoop(r4t1 r5t1)*/
4304 EXPLAIN SELECT * FROM s1.r4 t1, s1.r5 t2 WHERE t1.c1 = t2.c1;
4313 \! sql/maskout.sh results/ut-R.tmpout
4315 ----------------------------------------------------------------------------
4316 Nested Loop (cost=xxx rows=1000 width=xxx)
4317 -> Seq Scan on t1 r4t1 (cost=xxx rows=1000 width=xxx)
4318 -> Index Scan using t1_i1 on t1 r5t1 (cost=xxx rows=1 width=xxx)
4319 Index Cond: (c1 = r4t1.c1)
4322 \o results/ut-R.tmpout
4323 /*+NestLoop(r4t1 r5t1)Rows(r4t1 r5t1 #1)*/
4324 EXPLAIN SELECT * FROM s1.r4 t1, s1.r5 t2 WHERE t1.c1 = t2.c1;
4334 \! sql/maskout.sh results/ut-R.tmpout
4336 ----------------------------------------------------------------------------
4337 Nested Loop (cost=xxx rows=1 width=xxx)
4338 -> Seq Scan on t1 r4t1 (cost=xxx rows=1000 width=xxx)
4339 -> Index Scan using t1_i1 on t1 r5t1 (cost=xxx rows=1 width=xxx)
4340 Index Cond: (c1 = r4t1.c1)
4344 ---- No. R-2-4 VALUES clause
4347 \o results/ut-R.tmpout
4348 EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t3 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1;
4350 \! sql/maskout.sh results/ut-R.tmpout
4352 --------------------------------------------------------------------------------
4353 Nested Loop (cost=xxx rows=1 width=xxx)
4354 -> Hash Join (cost=xxx rows=2 width=xxx)
4355 Hash Cond: (t2.c1 = "*VALUES*".column1)
4356 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4357 -> Hash (cost=xxx rows=2 width=xxx)
4358 -> Values Scan on "*VALUES*" (cost=xxx rows=2 width=xxx)
4359 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
4360 Index Cond: (c1 = t2.c1)
4363 \o results/ut-R.tmpout
4364 /*+ Leading(t3 t1 t2) Rows(t3 t1 #2)Rows(t3 t1 t2 #2)*/
4365 EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t3 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1;
4376 \! sql/maskout.sh results/ut-R.tmpout
4378 --------------------------------------------------------------------------------
4379 Nested Loop (cost=xxx rows=1 width=xxx)
4380 -> Hash Join (cost=xxx rows=2 width=xxx)
4381 Hash Cond: (t2.c1 = "*VALUES*".column1)
4382 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4383 -> Hash (cost=xxx rows=2 width=xxx)
4384 -> Values Scan on "*VALUES*" (cost=xxx rows=2 width=xxx)
4385 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
4386 Index Cond: (c1 = t2.c1)
4389 \o results/ut-R.tmpout
4390 /*+ Leading(*VALUES* t1 t2) Rows(*VALUES* t1 #2)Rows(*VALUES* t1 t2 #20)*/
4391 EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t3 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1;
4394 Leading(*VALUES* t1 t2)
4395 Rows(*VALUES* t1 #2)
4396 Rows(*VALUES* t1 t2 #20)
4402 \! sql/maskout.sh results/ut-R.tmpout
4404 -----------------------------------------------------------------------------
4405 Nested Loop (cost=xxx rows=20 width=xxx)
4406 -> Nested Loop (cost=xxx rows=2 width=xxx)
4407 -> Values Scan on "*VALUES*" (cost=xxx rows=2 width=xxx)
4408 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
4409 Index Cond: (c1 = "*VALUES*".column1)
4410 -> Index Scan using t2_i1 on t2 (cost=xxx rows=1 width=xxx)
4411 Index Cond: (c1 = t1.c1)
4415 \o results/ut-R.tmpout
4416 EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t3 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t4 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
4418 \! sql/maskout.sh results/ut-R.tmpout
4420 --------------------------------------------------------------------------------------
4421 Nested Loop (cost=xxx rows=1 width=xxx)
4422 -> Nested Loop (cost=xxx rows=1 width=xxx)
4423 Join Filter: (t2.c1 = "*VALUES*_1".column1)
4424 -> Hash Join (cost=xxx rows=2 width=xxx)
4425 Hash Cond: (t2.c1 = "*VALUES*".column1)
4426 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4427 -> Hash (cost=xxx rows=2 width=xxx)
4428 -> Values Scan on "*VALUES*" (cost=xxx rows=2 width=xxx)
4429 -> Materialize (cost=xxx rows=2 width=xxx)
4430 -> Values Scan on "*VALUES*_1" (cost=xxx rows=2 width=xxx)
4431 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
4432 Index Cond: (c1 = t2.c1)
4435 \o results/ut-R.tmpout
4436 /*+ Leading(t4 t3 t2 t1) Rows(t4 t3 #2) Rows(t4 t3 t2 #2)Rows(t4 t3 t2 t1 #2)*/
4437 EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t3 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t4 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
4441 Leading(t4 t3 t2 t1)
4444 Rows(t1 t2 t3 t4 #2)
4449 \! sql/maskout.sh results/ut-R.tmpout
4451 --------------------------------------------------------------------------------------
4452 Nested Loop (cost=xxx rows=1 width=xxx)
4453 -> Nested Loop (cost=xxx rows=1 width=xxx)
4454 Join Filter: (t2.c1 = "*VALUES*_1".column1)
4455 -> Hash Join (cost=xxx rows=2 width=xxx)
4456 Hash Cond: (t2.c1 = "*VALUES*".column1)
4457 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4458 -> Hash (cost=xxx rows=2 width=xxx)
4459 -> Values Scan on "*VALUES*" (cost=xxx rows=2 width=xxx)
4460 -> Materialize (cost=xxx rows=2 width=xxx)
4461 -> Values Scan on "*VALUES*_1" (cost=xxx rows=2 width=xxx)
4462 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
4463 Index Cond: (c1 = t2.c1)
4466 \o results/ut-R.tmpout
4467 /*+ Leading(*VALUES* t3 t2 t1) Rows(t4 t3 #2)Rows(*VALUES* t3 t2 #2)Rows(*VALUES* t3 t2 t1 #2)*/
4468 EXPLAIN SELECT * FROM s1.t1, s1.t2, (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t3 (c1, c2, c3, c4), (VALUES(1,1,1,'1'), (2,2,2,'2')) AS t4 (c1, c2, c3, c4) WHERE t1.c1 = t2.c1 AND t1.c1 = t3.c1 AND t1.c1 = t4.c1;
4469 INFO: pg_hint_plan: hint syntax error at or near "Rows(*VALUES* t3 t2 #2)Rows(*VALUES* t3 t2 t1 #2)"
4470 DETAIL: Relation name "*VALUES*" is ambiguous.
4471 INFO: pg_hint_plan: hint syntax error at or near "Rows(*VALUES* t3 t2 t1 #2)"
4472 DETAIL: Relation name "*VALUES*" is ambiguous.
4473 INFO: pg_hint_plan: hint syntax error at or near "Leading(*VALUES* t3 t2 t1) Rows(t4 t3 #2)Rows(*VALUES* t3 t2 #2)Rows(*VALUES* t3 t2 t1 #2)"
4474 DETAIL: Relation name "*VALUES*" is ambiguous.
4481 Leading(*VALUES* t3 t2 t1)
4482 Rows(*VALUES* t2 t3 #2)
4483 Rows(*VALUES* t1 t2 t3 #2)
4486 \! sql/maskout.sh results/ut-R.tmpout
4488 --------------------------------------------------------------------------------------
4489 Nested Loop (cost=xxx rows=1 width=xxx)
4490 -> Nested Loop (cost=xxx rows=1 width=xxx)
4491 Join Filter: (t2.c1 = "*VALUES*_1".column1)
4492 -> Hash Join (cost=xxx rows=2 width=xxx)
4493 Hash Cond: (t2.c1 = "*VALUES*".column1)
4494 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4495 -> Hash (cost=xxx rows=2 width=xxx)
4496 -> Values Scan on "*VALUES*" (cost=xxx rows=2 width=xxx)
4497 -> Materialize (cost=xxx rows=2 width=xxx)
4498 -> Values Scan on "*VALUES*_1" (cost=xxx rows=2 width=xxx)
4499 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
4500 Index Cond: (c1 = t2.c1)
4507 \o results/ut-R.tmpout
4508 EXPLAIN SELECT max(bmt1.c1) FROM s1.t1 bmt1, (SELECT ctid, * FROM s1.t2 bmt2) sbmt2, (SELECT ctid, * FROM s1.t3 bmt3) sbmt3, (SELECT ctid, * FROM s1.t4 bmt4) sbmt4 WHERE bmt1.c1 = sbmt2.c1 AND bmt1.c1 = sbmt3.c1 AND bmt1.c1 = sbmt4.c1;
4510 \! sql/maskout.sh results/ut-R.tmpout
4512 ------------------------------------------------------------------------------------------------------
4513 Aggregate (cost=xxx rows=1 width=xxx)
4514 -> Nested Loop (cost=xxx rows=100 width=xxx)
4515 -> Merge Join (cost=xxx rows=100 width=xxx)
4516 Merge Cond: (bmt1.c1 = bmt2.c1)
4517 -> Merge Join (cost=xxx rows=1000 width=xxx)
4518 Merge Cond: (bmt1.c1 = bmt3.c1)
4519 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
4520 -> Index Only Scan using t3_i1 on t3 bmt3 (cost=xxx rows=1130 width=xxx)
4521 -> Sort (cost=xxx rows=100 width=xxx)
4523 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
4524 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
4525 Index Cond: (c1 = bmt1.c1)
4528 \o results/ut-R.tmpout
4530 Leading(bmt4 bmt3 bmt2 bmt1)
4531 Rows(bmt1 bmt2 bmt3 bmt4 *0.7)
4533 EXPLAIN SELECT bmt1.c1 FROM s1.t1 bmt1, (SELECT ctid, * FROM s1.t2 bmt2) sbmt2, (SELECT ctid, * FROM s1.t3 bmt3) sbmt3, (SELECT ctid, * FROM s1.t4 bmt4) sbmt4 WHERE bmt1.c1 = sbmt2.c1 AND bmt1.c1 = sbmt3.c1 AND bmt1.c1 = sbmt4.c1;
4536 Leading(bmt4 bmt3 bmt2 bmt1)
4537 Rows(bmt1 bmt2 bmt3 bmt4 *0.7)
4543 \! sql/maskout.sh results/ut-R.tmpout
4545 -----------------------------------------------------------------------------------------
4546 Merge Join (cost=xxx rows=70 width=xxx)
4547 Merge Cond: (bmt1.c1 = bmt2.c1)
4548 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
4549 -> Sort (cost=xxx rows=100 width=xxx)
4551 -> Hash Join (cost=xxx rows=100 width=xxx)
4552 Hash Cond: (bmt3.c1 = bmt2.c1)
4553 -> Hash Join (cost=xxx rows=1130 width=xxx)
4554 Hash Cond: (bmt3.c1 = bmt4.c1)
4555 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
4556 -> Hash (cost=xxx rows=1130 width=xxx)
4557 -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
4558 -> Hash (cost=xxx rows=100 width=xxx)
4559 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
4563 \o results/ut-R.tmpout
4564 EXPLAIN SELECT bmt1.c1 FROM s1.t1 bmt1, (SELECT ctid, * FROM s1.t2 bmt2) sbmt2, (SELECT ctid, * FROM s1.t3 bmt3) sbmt3, (SELECT ctid, * FROM s1.t4 bmt4) sbmt4 WHERE bmt1.c1 = sbmt2.c1 AND bmt1.c1 = sbmt3.c1 AND bmt1.c1 = sbmt4.c1;
4566 \! sql/maskout.sh results/ut-R.tmpout
4568 ------------------------------------------------------------------------------------------------
4569 Nested Loop (cost=xxx rows=100 width=xxx)
4570 -> Merge Join (cost=xxx rows=100 width=xxx)
4571 Merge Cond: (bmt1.c1 = bmt2.c1)
4572 -> Merge Join (cost=xxx rows=1000 width=xxx)
4573 Merge Cond: (bmt1.c1 = bmt3.c1)
4574 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
4575 -> Index Only Scan using t3_i1 on t3 bmt3 (cost=xxx rows=1130 width=xxx)
4576 -> Sort (cost=xxx rows=100 width=xxx)
4578 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
4579 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
4580 Index Cond: (c1 = bmt1.c1)
4583 \o results/ut-R.tmpout
4585 Leading(bmt4 bmt3 bmt2 bmt1)
4586 Rows(bmt4 bmt3 *0.6)
4588 EXPLAIN SELECT bmt1.c1 FROM s1.t1 bmt1, (SELECT ctid, * FROM s1.t2 bmt2) sbmt2, (SELECT ctid, * FROM s1.t3 bmt3) sbmt3, (SELECT ctid, * FROM s1.t4 bmt4) sbmt4 WHERE bmt1.c1 = sbmt2.c1 AND bmt1.c1 = sbmt3.c1 AND bmt1.c1 = sbmt4.c1;
4591 Leading(bmt4 bmt3 bmt2 bmt1)
4592 Rows(bmt3 bmt4 *0.6)
4598 \! sql/maskout.sh results/ut-R.tmpout
4600 -----------------------------------------------------------------------------------------
4601 Merge Join (cost=xxx rows=60 width=xxx)
4602 Merge Cond: (bmt1.c1 = bmt2.c1)
4603 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
4604 -> Sort (cost=xxx rows=60 width=xxx)
4606 -> Hash Join (cost=xxx rows=60 width=xxx)
4607 Hash Cond: (bmt3.c1 = bmt2.c1)
4608 -> Hash Join (cost=xxx rows=678 width=xxx)
4609 Hash Cond: (bmt3.c1 = bmt4.c1)
4610 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
4611 -> Hash (cost=xxx rows=1130 width=xxx)
4612 -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
4613 -> Hash (cost=xxx rows=100 width=xxx)
4614 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
4618 \o results/ut-R.tmpout
4619 EXPLAIN SELECT bmt1.c1 FROM s1.t1 bmt1, (SELECT ctid, * FROM s1.t2 bmt2) sbmt2, (SELECT ctid, * FROM s1.t3 bmt3) sbmt3, (SELECT ctid, * FROM s1.t4 bmt4) sbmt4 WHERE bmt1.c1 = sbmt2.c1 AND bmt1.c1 = sbmt3.c1 AND bmt1.c1 = sbmt4.c1;
4621 \! sql/maskout.sh results/ut-R.tmpout
4623 ------------------------------------------------------------------------------------------------
4624 Nested Loop (cost=xxx rows=100 width=xxx)
4625 -> Merge Join (cost=xxx rows=100 width=xxx)
4626 Merge Cond: (bmt1.c1 = bmt2.c1)
4627 -> Merge Join (cost=xxx rows=1000 width=xxx)
4628 Merge Cond: (bmt1.c1 = bmt3.c1)
4629 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
4630 -> Index Only Scan using t3_i1 on t3 bmt3 (cost=xxx rows=1130 width=xxx)
4631 -> Sort (cost=xxx rows=100 width=xxx)
4633 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
4634 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
4635 Index Cond: (c1 = bmt1.c1)
4638 \o results/ut-R.tmpout
4640 Leading(bmt4 bmt3 bmt2 bmt1)
4641 Rows(bmt4 bmt1 *0.5)
4643 EXPLAIN SELECT bmt1.c1 FROM s1.t1 bmt1, (SELECT ctid, * FROM s1.t2 bmt2) sbmt2, (SELECT ctid, * FROM s1.t3 bmt3) sbmt3, (SELECT ctid, * FROM s1.t4 bmt4) sbmt4 WHERE bmt1.c1 = sbmt2.c1 AND bmt1.c1 = sbmt3.c1 AND bmt1.c1 = sbmt4.c1;
4646 Leading(bmt4 bmt3 bmt2 bmt1)
4647 Rows(bmt1 bmt4 *0.5)
4653 \! sql/maskout.sh results/ut-R.tmpout
4655 -----------------------------------------------------------------------------------------
4656 Merge Join (cost=xxx rows=50 width=xxx)
4657 Merge Cond: (bmt1.c1 = bmt2.c1)
4658 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
4659 -> Sort (cost=xxx rows=100 width=xxx)
4661 -> Hash Join (cost=xxx rows=100 width=xxx)
4662 Hash Cond: (bmt3.c1 = bmt2.c1)
4663 -> Hash Join (cost=xxx rows=1130 width=xxx)
4664 Hash Cond: (bmt3.c1 = bmt4.c1)
4665 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
4666 -> Hash (cost=xxx rows=1130 width=xxx)
4667 -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
4668 -> Hash (cost=xxx rows=100 width=xxx)
4669 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
4673 ---- No. R-3-1 abusolute value
4676 \o results/ut-R.tmpout
4678 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4679 WARNING: Force estimate to be at least one row, to avoid possible divide-by-zero when interpolating costs : Rows(t1 t2 #0)
4688 \! sql/maskout.sh results/ut-R.tmpout
4690 ---------------------------------------------------------------------------
4691 Merge Join (cost=xxx rows=1 width=xxx)
4692 Merge Cond: (t1.c1 = t2.c1)
4693 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
4694 -> Sort (cost=xxx rows=100 width=xxx)
4696 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4700 \o results/ut-R.tmpout
4702 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4711 \! sql/maskout.sh results/ut-R.tmpout
4713 ---------------------------------------------------------------------------
4714 Merge Join (cost=xxx rows=5 width=xxx)
4715 Merge Cond: (t1.c1 = t2.c1)
4716 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
4717 -> Sort (cost=xxx rows=100 width=xxx)
4719 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4723 ---- No. R-3-2 increase or decrease value
4726 \o results/ut-R.tmpout
4728 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4737 \! sql/maskout.sh results/ut-R.tmpout
4739 ---------------------------------------------------------------------------
4740 Merge Join (cost=xxx rows=101 width=xxx)
4741 Merge Cond: (t1.c1 = t2.c1)
4742 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
4743 -> Sort (cost=xxx rows=100 width=xxx)
4745 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4749 \o results/ut-R.tmpout
4751 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4760 \! sql/maskout.sh results/ut-R.tmpout
4762 ---------------------------------------------------------------------------
4763 Merge Join (cost=xxx rows=99 width=xxx)
4764 Merge Cond: (t1.c1 = t2.c1)
4765 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
4766 -> Sort (cost=xxx rows=100 width=xxx)
4768 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4772 \o results/ut-R.tmpout
4773 /*+Rows(t1 t2 -1000)*/
4774 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4775 WARNING: Force estimate to be at least one row, to avoid possible divide-by-zero when interpolating costs : Rows(t1 t2 -1000)
4784 \! sql/maskout.sh results/ut-R.tmpout
4786 ---------------------------------------------------------------------------
4787 Merge Join (cost=xxx rows=1 width=xxx)
4788 Merge Cond: (t1.c1 = t2.c1)
4789 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
4790 -> Sort (cost=xxx rows=100 width=xxx)
4792 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4796 ---- No. R-3-3 multiple
4799 \o results/ut-R.tmpout
4801 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4802 WARNING: Force estimate to be at least one row, to avoid possible divide-by-zero when interpolating costs : Rows(t1 t2 *0)
4811 \! sql/maskout.sh results/ut-R.tmpout
4813 ---------------------------------------------------------------------------
4814 Merge Join (cost=xxx rows=1 width=xxx)
4815 Merge Cond: (t1.c1 = t2.c1)
4816 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
4817 -> Sort (cost=xxx rows=100 width=xxx)
4819 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4823 \o results/ut-R.tmpout
4825 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4834 \! sql/maskout.sh results/ut-R.tmpout
4836 ---------------------------------------------------------------------------
4837 Merge Join (cost=xxx rows=200 width=xxx)
4838 Merge Cond: (t1.c1 = t2.c1)
4839 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
4840 -> Sort (cost=xxx rows=100 width=xxx)
4842 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4846 \o results/ut-R.tmpout
4847 /*+Rows(t1 t2 *0.1)*/
4848 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4857 \! sql/maskout.sh results/ut-R.tmpout
4859 ---------------------------------------------------------------------------
4860 Merge Join (cost=xxx rows=10 width=xxx)
4861 Merge Cond: (t1.c1 = t2.c1)
4862 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
4863 -> Sort (cost=xxx rows=100 width=xxx)
4865 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4869 ---- No. R-3-4 join inherit tables
4872 \o results/ut-R.tmpout
4873 EXPLAIN SELECT * FROM s1.p1, s1.p2 WHERE p1.c1 = p2.c1;
4875 \! sql/maskout.sh results/ut-R.tmpout
4877 -------------------------------------------------------------------------
4878 Hash Join (cost=xxx rows=301 width=xxx)
4879 Hash Cond: (p2.c1 = p1.c1)
4880 -> Append (cost=xxx rows=304 width=xxx)
4881 -> Seq Scan on p2 (cost=xxx rows=1 width=xxx)
4882 -> Seq Scan on p2c1 (cost=xxx rows=1 width=xxx)
4883 -> Seq Scan on p2c2 (cost=xxx rows=1 width=xxx)
4884 -> Seq Scan on p2c3 (cost=xxx rows=1 width=xxx)
4885 -> Seq Scan on p2c1c1 (cost=xxx rows=50 width=xxx)
4886 -> Seq Scan on p2c1c2 (cost=xxx rows=50 width=xxx)
4887 -> Seq Scan on p2c2c1 (cost=xxx rows=50 width=xxx)
4888 -> Seq Scan on p2c2c2 (cost=xxx rows=50 width=xxx)
4889 -> Seq Scan on p2c3c1 (cost=xxx rows=50 width=xxx)
4890 -> Seq Scan on p2c3c2 (cost=xxx rows=50 width=xxx)
4891 -> Hash (cost=xxx rows=301 width=xxx)
4892 -> Append (cost=xxx rows=301 width=xxx)
4893 -> Seq Scan on p1 (cost=xxx rows=1 width=xxx)
4894 -> Seq Scan on p1c1 (cost=xxx rows=100 width=xxx)
4895 -> Seq Scan on p1c2 (cost=xxx rows=100 width=xxx)
4896 -> Seq Scan on p1c3 (cost=xxx rows=100 width=xxx)
4899 \o results/ut-R.tmpout
4901 EXPLAIN SELECT * FROM s1.p1, s1.p2 WHERE p1.c1 = p2.c1;
4910 \! sql/maskout.sh results/ut-R.tmpout
4912 -------------------------------------------------------------------------
4913 Hash Join (cost=xxx rows=1 width=xxx)
4914 Hash Cond: (p2.c1 = p1.c1)
4915 -> Append (cost=xxx rows=304 width=xxx)
4916 -> Seq Scan on p2 (cost=xxx rows=1 width=xxx)
4917 -> Seq Scan on p2c1 (cost=xxx rows=1 width=xxx)
4918 -> Seq Scan on p2c2 (cost=xxx rows=1 width=xxx)
4919 -> Seq Scan on p2c3 (cost=xxx rows=1 width=xxx)
4920 -> Seq Scan on p2c1c1 (cost=xxx rows=50 width=xxx)
4921 -> Seq Scan on p2c1c2 (cost=xxx rows=50 width=xxx)
4922 -> Seq Scan on p2c2c1 (cost=xxx rows=50 width=xxx)
4923 -> Seq Scan on p2c2c2 (cost=xxx rows=50 width=xxx)
4924 -> Seq Scan on p2c3c1 (cost=xxx rows=50 width=xxx)
4925 -> Seq Scan on p2c3c2 (cost=xxx rows=50 width=xxx)
4926 -> Hash (cost=xxx rows=301 width=xxx)
4927 -> Append (cost=xxx rows=301 width=xxx)
4928 -> Seq Scan on p1 (cost=xxx rows=1 width=xxx)
4929 -> Seq Scan on p1c1 (cost=xxx rows=100 width=xxx)
4930 -> Seq Scan on p1c2 (cost=xxx rows=100 width=xxx)
4931 -> Seq Scan on p1c3 (cost=xxx rows=100 width=xxx)
4935 \o results/ut-R.tmpout
4936 EXPLAIN SELECT * FROM s1.p1, s1.p2 WHERE p1.c1 = p2.c1;
4938 \! sql/maskout.sh results/ut-R.tmpout
4940 -------------------------------------------------------------------------
4941 Hash Join (cost=xxx rows=301 width=xxx)
4942 Hash Cond: (p2.c1 = p1.c1)
4943 -> Append (cost=xxx rows=304 width=xxx)
4944 -> Seq Scan on p2 (cost=xxx rows=1 width=xxx)
4945 -> Seq Scan on p2c1 (cost=xxx rows=1 width=xxx)
4946 -> Seq Scan on p2c2 (cost=xxx rows=1 width=xxx)
4947 -> Seq Scan on p2c3 (cost=xxx rows=1 width=xxx)
4948 -> Seq Scan on p2c1c1 (cost=xxx rows=50 width=xxx)
4949 -> Seq Scan on p2c1c2 (cost=xxx rows=50 width=xxx)
4950 -> Seq Scan on p2c2c1 (cost=xxx rows=50 width=xxx)
4951 -> Seq Scan on p2c2c2 (cost=xxx rows=50 width=xxx)
4952 -> Seq Scan on p2c3c1 (cost=xxx rows=50 width=xxx)
4953 -> Seq Scan on p2c3c2 (cost=xxx rows=50 width=xxx)
4954 -> Hash (cost=xxx rows=301 width=xxx)
4955 -> Append (cost=xxx rows=301 width=xxx)
4956 -> Seq Scan on p1 (cost=xxx rows=1 width=xxx)
4957 -> Seq Scan on p1c1 (cost=xxx rows=100 width=xxx)
4958 -> Seq Scan on p1c2 (cost=xxx rows=100 width=xxx)
4959 -> Seq Scan on p1c3 (cost=xxx rows=100 width=xxx)
4962 \o results/ut-R.tmpout
4963 /*+Rows(p1c1 p2c1 #1)*/
4964 EXPLAIN SELECT * FROM s1.p1, s1.p2 WHERE p1.c1 = p2.c1;
4973 \! sql/maskout.sh results/ut-R.tmpout
4975 -------------------------------------------------------------------------
4976 Hash Join (cost=xxx rows=301 width=xxx)
4977 Hash Cond: (p2.c1 = p1.c1)
4978 -> Append (cost=xxx rows=304 width=xxx)
4979 -> Seq Scan on p2 (cost=xxx rows=1 width=xxx)
4980 -> Seq Scan on p2c1 (cost=xxx rows=1 width=xxx)
4981 -> Seq Scan on p2c2 (cost=xxx rows=1 width=xxx)
4982 -> Seq Scan on p2c3 (cost=xxx rows=1 width=xxx)
4983 -> Seq Scan on p2c1c1 (cost=xxx rows=50 width=xxx)
4984 -> Seq Scan on p2c1c2 (cost=xxx rows=50 width=xxx)
4985 -> Seq Scan on p2c2c1 (cost=xxx rows=50 width=xxx)
4986 -> Seq Scan on p2c2c2 (cost=xxx rows=50 width=xxx)
4987 -> Seq Scan on p2c3c1 (cost=xxx rows=50 width=xxx)
4988 -> Seq Scan on p2c3c2 (cost=xxx rows=50 width=xxx)
4989 -> Hash (cost=xxx rows=301 width=xxx)
4990 -> Append (cost=xxx rows=301 width=xxx)
4991 -> Seq Scan on p1 (cost=xxx rows=1 width=xxx)
4992 -> Seq Scan on p1c1 (cost=xxx rows=100 width=xxx)
4993 -> Seq Scan on p1c2 (cost=xxx rows=100 width=xxx)
4994 -> Seq Scan on p1c3 (cost=xxx rows=100 width=xxx)
4998 ---- No. R-3-5 conflict join method hint
5001 \o results/ut-R.tmpout
5002 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5004 \! sql/maskout.sh results/ut-R.tmpout
5006 ---------------------------------------------------------------------------
5007 Merge Join (cost=xxx rows=100 width=xxx)
5008 Merge Cond: (t1.c1 = t2.c1)
5009 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5010 -> Sort (cost=xxx rows=100 width=xxx)
5012 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5015 \o results/ut-R.tmpout
5016 /*+Rows(t1 t2 #1)Rows(t1 t2 #1)*/
5017 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5018 INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t1 t2 #1)"
5019 DETAIL: Conflict rows hint.
5029 \! sql/maskout.sh results/ut-R.tmpout
5031 ---------------------------------------------------------------------------
5032 Merge Join (cost=xxx rows=1 width=xxx)
5033 Merge Cond: (t1.c1 = t2.c1)
5034 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5035 -> Sort (cost=xxx rows=100 width=xxx)
5037 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5041 \o results/ut-R.tmpout
5042 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5044 \! sql/maskout.sh results/ut-R.tmpout
5046 ---------------------------------------------------------------------------
5047 Merge Join (cost=xxx rows=100 width=xxx)
5048 Merge Cond: (t1.c1 = t2.c1)
5049 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5050 -> Sort (cost=xxx rows=100 width=xxx)
5052 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5055 \o results/ut-R.tmpout
5056 /*+Rows(t1 t2 #1)Rows(t1 t2 #1)Rows(t1 t2 #1)*/
5057 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5058 INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t1 t2 #1)Rows(t1 t2 #1)"
5059 DETAIL: Conflict rows hint.
5060 INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t1 t2 #1)"
5061 DETAIL: Conflict rows hint.
5072 \! sql/maskout.sh results/ut-R.tmpout
5074 ---------------------------------------------------------------------------
5075 Merge Join (cost=xxx rows=1 width=xxx)
5076 Merge Cond: (t1.c1 = t2.c1)
5077 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5078 -> Sort (cost=xxx rows=100 width=xxx)
5080 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5084 \o results/ut-R.tmpout
5085 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5087 \! sql/maskout.sh results/ut-R.tmpout
5089 ---------------------------------------------------------------------------
5090 Merge Join (cost=xxx rows=100 width=xxx)
5091 Merge Cond: (t1.c1 = t2.c1)
5092 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5093 -> Sort (cost=xxx rows=100 width=xxx)
5095 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5098 \o results/ut-R.tmpout
5099 /*+Rows(t1 t2 #1)Rows(t2 t1 #1)*/
5100 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5101 INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t2 t1 #1)"
5102 DETAIL: Conflict rows hint.
5112 \! sql/maskout.sh results/ut-R.tmpout
5114 ---------------------------------------------------------------------------
5115 Merge Join (cost=xxx rows=1 width=xxx)
5116 Merge Cond: (t1.c1 = t2.c1)
5117 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5118 -> Sort (cost=xxx rows=100 width=xxx)
5120 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5124 \o results/ut-R.tmpout
5125 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5127 \! sql/maskout.sh results/ut-R.tmpout
5129 ---------------------------------------------------------------------------
5130 Merge Join (cost=xxx rows=100 width=xxx)
5131 Merge Cond: (t1.c1 = t2.c1)
5132 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5133 -> Sort (cost=xxx rows=100 width=xxx)
5135 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5138 \o results/ut-R.tmpout
5139 /*+Rows(t2 t1 #1)Rows(t1 t2 #1)Rows(t2 t1 #1)*/
5140 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5141 INFO: pg_hint_plan: hint syntax error at or near "Rows(t2 t1 #1)Rows(t1 t2 #1)Rows(t2 t1 #1)"
5142 DETAIL: Conflict rows hint.
5143 INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t2 t1 #1)"
5144 DETAIL: Conflict rows hint.
5155 \! sql/maskout.sh results/ut-R.tmpout
5157 ---------------------------------------------------------------------------
5158 Merge Join (cost=xxx rows=1 width=xxx)
5159 Merge Cond: (t1.c1 = t2.c1)
5160 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5161 -> Sort (cost=xxx rows=100 width=xxx)
5163 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5167 ---- No. R-3-6 hint state output
5170 SET client_min_messages TO DEBUG1;
5171 \o results/ut-R.tmpout
5172 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5174 \! sql/maskout.sh results/ut-R.tmpout
5176 ---------------------------------------------------------------------------
5177 Merge Join (cost=xxx rows=100 width=xxx)
5178 Merge Cond: (t1.c1 = t2.c1)
5179 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5180 -> Sort (cost=xxx rows=100 width=xxx)
5182 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5185 \o results/ut-R.tmpout
5187 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5188 DEBUG: adjusted rows 100 to 101
5197 \! sql/maskout.sh results/ut-R.tmpout
5199 ---------------------------------------------------------------------------
5200 Merge Join (cost=xxx rows=101 width=xxx)
5201 Merge Cond: (t1.c1 = t2.c1)
5202 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5203 -> Sort (cost=xxx rows=100 width=xxx)
5205 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5208 \! rm results/ut-R.tmpout