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 Join Filter: (c1.c1 = bmt1.c1)
2367 -> Hash Join (cost=xxx rows=1 width=xxx)
2368 Hash Cond: (c2.c1 = c1.c1)
2369 -> Merge Join (cost=xxx rows=1 width=xxx)
2370 Merge Cond: (c2.c1 = c3.c1)
2371 -> Sort (cost=xxx rows=1 width=xxx)
2373 -> CTE Scan on c2 (cost=xxx rows=1 width=xxx)
2374 -> Sort (cost=xxx rows=1 width=xxx)
2376 -> CTE Scan on c3 (cost=xxx rows=1 width=xxx)
2377 -> Hash (cost=xxx rows=1 width=xxx)
2378 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
2379 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1 width=xxx)
2380 Index Cond: (c1 = c2.c1)
2381 -> Sort (cost=xxx rows=100 width=xxx)
2383 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
2384 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
2385 Index Cond: (c1 = bmt1.c1)
2388 \o results/ut-R.tmpout
2390 Leading(c3 c2 c1 bmt1 bmt2 bmt3 bmt4)
2391 Leading(b1t2 b1t3 b1t4 b1t1)
2392 Leading(b2t3 b2t4 b2t1 b2t2)
2393 Leading(b3t4 b3t1 b3t2 b3t3)
2394 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)
2395 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
2396 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
2397 MergeJoin(b3t4 b3t1)HashJoin(b3t4 b3t1 b3t2)NestLoop(b3t1 b3t2 b3t3 b3t4)
2398 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)
2399 Rows(b1t2 b1t3 #1)Rows(b1t2 b1t3 b1t4 #1)Rows(b1t2 b1t3 b1t4 b1t1 #1)
2400 Rows(b2t3 b2t4 #1)Rows(b2t3 b2t4 b2t1 #1)Rows(b2t3 b2t4 b2t1 b2t2 #1)
2401 Rows(b3t4 b3t1 #1)Rows(b3t4 b3t1 b3t2 #1)Rows(b3t1 b3t2 b3t3 b3t4 #1)
2405 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
2408 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
2411 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
2413 SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4
2415 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1
2418 AND bmt1.c1 = c3.c1;
2421 MergeJoin(b1t2 b1t3)
2422 MergeJoin(b2t3 b2t4)
2423 MergeJoin(b3t1 b3t4)
2425 HashJoin(b1t2 b1t3 b1t4)
2426 HashJoin(b2t1 b2t3 b2t4)
2427 HashJoin(b3t1 b3t2 b3t4)
2429 NestLoop(b1t1 b1t2 b1t3 b1t4)
2430 NestLoop(b2t1 b2t2 b2t3 b2t4)
2431 NestLoop(b3t1 b3t2 b3t3 b3t4)
2432 NestLoop(bmt1 c1 c2 c3)
2433 MergeJoin(bmt1 bmt2 c1 c2 c3)
2434 HashJoin(bmt1 bmt2 bmt3 c1 c2 c3)
2435 NestLoop(bmt1 bmt2 bmt3 bmt4 c1 c2 c3)
2436 Leading(c3 c2 c1 bmt1 bmt2 bmt3 bmt4)
2437 Leading(b1t2 b1t3 b1t4 b1t1)
2438 Leading(b2t3 b2t4 b2t1 b2t2)
2439 Leading(b3t4 b3t1 b3t2 b3t3)
2444 Rows(b1t2 b1t3 b1t4 #1)
2445 Rows(b2t1 b2t3 b2t4 #1)
2446 Rows(b3t1 b3t2 b3t4 #1)
2448 Rows(b1t1 b1t2 b1t3 b1t4 #1)
2449 Rows(b2t1 b2t2 b2t3 b2t4 #1)
2450 Rows(b3t1 b3t2 b3t3 b3t4 #1)
2451 Rows(bmt1 c1 c2 c3 #1)
2452 Rows(bmt1 bmt2 c1 c2 c3 #1)
2453 Rows(bmt1 bmt2 bmt3 c1 c2 c3 #1)
2454 Rows(bmt1 bmt2 bmt3 bmt4 c1 c2 c3 #1)
2460 \! sql/maskout.sh results/ut-R.tmpout
2462 --------------------------------------------------------------------------------------------------------------------
2463 Aggregate (cost=xxx rows=1 width=xxx)
2465 -> Aggregate (cost=xxx rows=1 width=xxx)
2466 -> Nested Loop (cost=xxx rows=1 width=xxx)
2467 Join Filter: (b1t2.c1 = b1t1.c1)
2468 -> Hash Join (cost=xxx rows=1 width=xxx)
2469 Hash Cond: (b1t4.c1 = b1t2.c1)
2470 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
2471 -> Hash (cost=xxx rows=1 width=xxx)
2472 -> Merge Join (cost=xxx rows=1 width=xxx)
2473 Merge Cond: (b1t3.c1 = b1t2.c1)
2474 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
2475 -> Sort (cost=xxx rows=100 width=xxx)
2477 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
2478 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
2479 Index Cond: (c1 = b1t3.c1)
2481 -> Aggregate (cost=xxx rows=1 width=xxx)
2482 -> Nested Loop (cost=xxx rows=1 width=xxx)
2483 -> Hash Join (cost=xxx rows=1 width=xxx)
2484 Hash Cond: (b2t1.c1 = b2t3.c1)
2485 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
2486 -> Hash (cost=xxx rows=1 width=xxx)
2487 -> Merge Join (cost=xxx rows=1 width=xxx)
2488 Merge Cond: (b2t3.c1 = b2t4.c1)
2489 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
2490 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
2491 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
2492 Index Cond: (c1 = b2t1.c1)
2494 -> Aggregate (cost=xxx rows=1 width=xxx)
2495 -> Nested Loop (cost=xxx rows=1 width=xxx)
2496 -> Hash Join (cost=xxx rows=1 width=xxx)
2497 Hash Cond: (b3t1.c1 = b3t2.c1)
2498 -> Merge Join (cost=xxx rows=1 width=xxx)
2499 Merge Cond: (b3t1.c1 = b3t4.c1)
2500 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
2501 -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1130 width=xxx)
2502 -> Hash (cost=xxx rows=100 width=xxx)
2503 -> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
2504 -> Index Only Scan using t3_i1 on t3 b3t3 (cost=xxx rows=1 width=xxx)
2505 Index Cond: (c1 = b3t1.c1)
2506 -> Nested Loop (cost=xxx rows=1 width=xxx)
2507 -> Hash Join (cost=xxx rows=1 width=xxx)
2508 Hash Cond: (bmt3.c1 = bmt1.c1)
2509 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
2510 -> Hash (cost=xxx rows=1 width=xxx)
2511 -> Merge Join (cost=xxx rows=1 width=xxx)
2512 Merge Cond: (bmt1.c1 = bmt2.c1)
2513 -> Sort (cost=xxx rows=1 width=xxx)
2515 -> Nested Loop (cost=xxx rows=1 width=xxx)
2516 Join Filter: (c1.c1 = bmt1.c1)
2517 -> Hash Join (cost=xxx rows=1 width=xxx)
2518 Hash Cond: (c2.c1 = c1.c1)
2519 -> Merge Join (cost=xxx rows=1 width=xxx)
2520 Merge Cond: (c2.c1 = c3.c1)
2521 -> Sort (cost=xxx rows=1 width=xxx)
2523 -> CTE Scan on c2 (cost=xxx rows=1 width=xxx)
2524 -> Sort (cost=xxx rows=1 width=xxx)
2526 -> CTE Scan on c3 (cost=xxx rows=1 width=xxx)
2527 -> Hash (cost=xxx rows=1 width=xxx)
2528 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
2529 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1 width=xxx)
2530 Index Cond: (c1 = c2.c1)
2531 -> Sort (cost=xxx rows=100 width=xxx)
2533 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
2534 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
2535 Index Cond: (c1 = bmt1.c1)
2539 ---- No. R-2-2 the number of the tables per quiry block
2542 \o results/ut-R.tmpout
2548 SELECT b1t1.c1 FROM s1.t1 b1t1 WHERE b1t1.c1 = 1
2551 SELECT b2t1.c1 FROM s1.t1 b2t1 WHERE b2t1.c1 = 1
2553 FROM s1.t1 bmt1, c1 WHERE bmt1.c1 = 1
2556 SELECT b3t1.c1 FROM s1.t1 b3t1 WHERE b3t1.c1 = 1
2566 \! sql/maskout.sh results/ut-R.tmpout
2568 ----------------------------------------------------------------------------------
2569 Nested Loop (cost=xxx rows=1 width=xxx)
2571 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
2572 Index Cond: (c1 = 1)
2573 InitPlan 2 (returns $1)
2574 -> Index Only Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1 width=xxx)
2575 Index Cond: (c1 = 1)
2576 InitPlan 3 (returns $2)
2577 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1 width=xxx)
2578 Index Cond: (c1 = 1)
2579 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1 width=xxx)
2580 Index Cond: (c1 = 1)
2582 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
2586 \o results/ut-R.tmpout
2596 SELECT b1t1.c1 FROM s1.t1 b1t1 WHERE b1t1.c1 = 1
2599 SELECT b2t1.c1 FROM s1.t1 b2t1 WHERE b2t1.c1 = 1
2601 FROM s1.t1 bmt1, c1 WHERE bmt1.c1 = 1
2604 SELECT b3t1.c1 FROM s1.t1 b3t1 WHERE b3t1.c1 = 1
2618 \! sql/maskout.sh results/ut-R.tmpout
2620 ----------------------------------------------------------------------------------
2621 Nested Loop (cost=xxx rows=1 width=xxx)
2623 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
2624 Index Cond: (c1 = 1)
2625 InitPlan 2 (returns $1)
2626 -> Index Only Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1 width=xxx)
2627 Index Cond: (c1 = 1)
2628 InitPlan 3 (returns $2)
2629 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1 width=xxx)
2630 Index Cond: (c1 = 1)
2631 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1 width=xxx)
2632 Index Cond: (c1 = 1)
2634 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
2639 \o results/ut-R.tmpout
2641 Leading(c1 bmt2 bmt1)
2646 HashJoin(c1 bmt1 bmt2)
2647 MergeJoin(b1t1 b1t2)
2648 MergeJoin(b2t1 b2t2)
2649 MergeJoin(b3t1 b3t2)
2653 SELECT b1t1.c1 FROM s1.t1 b1t1, s1.t2 b1t2 WHERE b1t1.c1 = b1t2.c1
2656 SELECT b2t1.c1 FROM s1.t1 b2t1, s1.t2 b2t2 WHERE b2t1.c1 = b2t2.c1
2658 FROM s1.t1 bmt1, s1.t2 bmt2, c1 WHERE bmt1.c1 = bmt2.c1
2661 SELECT b3t1.c1 FROM s1.t1 b3t1, s1.t2 b3t2 WHERE b3t1.c1 = b3t2.c1
2665 MergeJoin(b1t1 b1t2)
2666 MergeJoin(b2t1 b2t2)
2667 MergeJoin(b3t1 b3t2)
2669 HashJoin(bmt1 bmt2 c1)
2670 Leading(c1 bmt2 bmt1)
2679 \! sql/maskout.sh results/ut-R.tmpout
2681 --------------------------------------------------------------------------------------------
2682 Hash Join (cost=xxx rows=10 width=xxx)
2683 Hash Cond: (bmt1.c1 = bmt2.c1)
2685 -> Merge Join (cost=xxx rows=100 width=xxx)
2686 Merge Cond: (b1t1.c1 = b1t2.c1)
2687 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1000 width=xxx)
2688 -> Sort (cost=xxx rows=100 width=xxx)
2690 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
2691 InitPlan 2 (returns $1)
2692 -> Merge Join (cost=xxx rows=100 width=xxx)
2693 Merge Cond: (b2t1.c1 = b2t2.c1)
2694 -> Index Only Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1000 width=xxx)
2695 -> Sort (cost=xxx rows=100 width=xxx)
2697 -> Seq Scan on t2 b2t2 (cost=xxx rows=100 width=xxx)
2698 InitPlan 3 (returns $2)
2699 -> Merge Join (cost=xxx rows=100 width=xxx)
2700 Merge Cond: (b3t1.c1 = b3t2.c1)
2701 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
2702 -> Sort (cost=xxx rows=100 width=xxx)
2704 -> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
2705 -> Seq Scan on t1 bmt1 (cost=xxx rows=999 width=xxx)
2707 -> Hash (cost=xxx rows=100 width=xxx)
2708 -> Merge Join (cost=xxx rows=100 width=xxx)
2709 Merge Cond: (bmt2.c1 = c1.c1)
2710 -> Sort (cost=xxx rows=100 width=xxx)
2712 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
2713 -> Sort (cost=xxx rows=100 width=xxx)
2715 -> CTE Scan on c1 (cost=xxx rows=100 width=xxx)
2718 \o results/ut-R.tmpout
2720 Leading(c1 bmt2 bmt1)
2725 HashJoin(c1 bmt1 bmt2)
2726 MergeJoin(b1t1 b1t2)
2727 MergeJoin(b2t1 b2t2)
2728 MergeJoin(b3t1 b3t2)
2730 Rows(c1 bmt1 bmt2 #1)
2737 SELECT b1t1.c1 FROM s1.t1 b1t1, s1.t2 b1t2 WHERE b1t1.c1 = b1t2.c1
2740 SELECT b2t1.c1 FROM s1.t1 b2t1, s1.t2 b2t2 WHERE b2t1.c1 = b2t2.c1
2742 FROM s1.t1 bmt1, s1.t2 bmt2, c1 WHERE bmt1.c1 = bmt2.c1
2745 SELECT b3t1.c1 FROM s1.t1 b3t1, s1.t2 b3t2 WHERE b3t1.c1 = b3t2.c1
2750 MergeJoin(b1t1 b1t2)
2751 MergeJoin(b2t1 b2t2)
2752 MergeJoin(b3t1 b3t2)
2754 HashJoin(bmt1 bmt2 c1)
2755 Leading(c1 bmt2 bmt1)
2763 Rows(bmt1 bmt2 c1 #1)
2769 \! sql/maskout.sh results/ut-R.tmpout
2771 --------------------------------------------------------------------------------------------
2772 Hash Join (cost=xxx rows=1 width=xxx)
2773 Hash Cond: (bmt1.c1 = bmt2.c1)
2775 -> Merge Join (cost=xxx rows=1 width=xxx)
2776 Merge Cond: (b1t1.c1 = b1t2.c1)
2777 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1000 width=xxx)
2778 -> Sort (cost=xxx rows=100 width=xxx)
2780 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
2781 InitPlan 2 (returns $1)
2782 -> Merge Join (cost=xxx rows=1 width=xxx)
2783 Merge Cond: (b2t1.c1 = b2t2.c1)
2784 -> Index Only Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1000 width=xxx)
2785 -> Sort (cost=xxx rows=100 width=xxx)
2787 -> Seq Scan on t2 b2t2 (cost=xxx rows=100 width=xxx)
2788 InitPlan 3 (returns $2)
2789 -> Merge Join (cost=xxx rows=1 width=xxx)
2790 Merge Cond: (b3t1.c1 = b3t2.c1)
2791 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
2792 -> Sort (cost=xxx rows=100 width=xxx)
2794 -> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
2795 -> Seq Scan on t1 bmt1 (cost=xxx rows=999 width=xxx)
2797 -> Hash (cost=xxx rows=1 width=xxx)
2798 -> Merge Join (cost=xxx rows=1 width=xxx)
2799 Merge Cond: (bmt2.c1 = c1.c1)
2800 -> Sort (cost=xxx rows=100 width=xxx)
2802 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
2803 -> Sort (cost=xxx rows=1 width=xxx)
2805 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
2809 \o results/ut-R.tmpout
2811 Leading(c1 bmt4 bmt3 bmt2 bmt1)
2812 Leading(b1t4 b1t3 b1t2 b1t1)
2813 Leading(b2t4 b2t3 b2t2 b2t1)
2814 Leading(b3t4 b3t3 b3t2 b3t1)
2816 HashJoin(c1 bmt4 bmt3)
2817 NestLoop(c1 bmt4 bmt3 bmt2)
2818 MergeJoin(c1 bmt4 bmt3 bmt2 bmt1)
2820 NestLoop(b1t4 b1t3 b1t2)
2821 MergeJoin(b1t4 b1t3 b1t2 b1t1)
2823 NestLoop(b2t4 b2t3 b2t2)
2824 MergeJoin(b2t4 b2t3 b2t2 b2t1)
2826 NestLoop(b3t4 b3t3 b3t2)
2827 MergeJoin(b3t4 b3t3 b3t2 b3t1)
2831 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
2834 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
2836 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
2838 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
2846 NestLoop(b1t2 b1t3 b1t4)
2847 NestLoop(b2t2 b2t3 b2t4)
2848 NestLoop(b3t2 b3t3 b3t4)
2849 HashJoin(bmt3 bmt4 c1)
2850 MergeJoin(b1t1 b1t2 b1t3 b1t4)
2851 MergeJoin(b2t1 b2t2 b2t3 b2t4)
2852 MergeJoin(b3t1 b3t2 b3t3 b3t4)
2853 NestLoop(bmt2 bmt3 bmt4 c1)
2854 MergeJoin(bmt1 bmt2 bmt3 bmt4 c1)
2855 Leading(c1 bmt4 bmt3 bmt2 bmt1)
2856 Leading(b1t4 b1t3 b1t2 b1t1)
2857 Leading(b2t4 b2t3 b2t2 b2t1)
2858 Leading(b3t4 b3t3 b3t2 b3t1)
2864 \! sql/maskout.sh results/ut-R.tmpout
2866 ------------------------------------------------------------------------------------------------------------------
2867 Merge Join (cost=xxx rows=10 width=xxx)
2868 Merge Cond: (bmt1.c1 = bmt2.c1)
2870 -> Merge Join (cost=xxx rows=100 width=xxx)
2871 Merge Cond: (b1t1.c1 = b1t2.c1)
2872 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1000 width=xxx)
2873 -> Sort (cost=xxx rows=100 width=xxx)
2875 -> Nested Loop (cost=xxx rows=100 width=xxx)
2876 -> Hash Join (cost=xxx rows=1130 width=xxx)
2877 Hash Cond: (b1t3.c1 = b1t4.c1)
2878 -> Seq Scan on t3 b1t3 (cost=xxx rows=1130 width=xxx)
2879 -> Hash (cost=xxx rows=1130 width=xxx)
2880 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
2881 -> Index Only Scan using t2_i1 on t2 b1t2 (cost=xxx rows=1 width=xxx)
2882 Index Cond: (c1 = b1t3.c1)
2883 InitPlan 2 (returns $3)
2884 -> Merge Join (cost=xxx rows=100 width=xxx)
2885 Merge Cond: (b2t1.c1 = b2t2.c1)
2886 -> Index Only Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1000 width=xxx)
2887 -> Sort (cost=xxx rows=100 width=xxx)
2889 -> Nested Loop (cost=xxx rows=100 width=xxx)
2890 -> Hash Join (cost=xxx rows=1130 width=xxx)
2891 Hash Cond: (b2t3.c1 = b2t4.c1)
2892 -> Seq Scan on t3 b2t3 (cost=xxx rows=1130 width=xxx)
2893 -> Hash (cost=xxx rows=1130 width=xxx)
2894 -> Seq Scan on t4 b2t4 (cost=xxx rows=1130 width=xxx)
2895 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
2896 Index Cond: (c1 = b2t3.c1)
2897 InitPlan 3 (returns $5)
2898 -> Merge Join (cost=xxx rows=100 width=xxx)
2899 Merge Cond: (b3t1.c1 = b3t2.c1)
2900 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
2901 -> Sort (cost=xxx rows=100 width=xxx)
2903 -> Nested Loop (cost=xxx rows=100 width=xxx)
2904 -> Hash Join (cost=xxx rows=1130 width=xxx)
2905 Hash Cond: (b3t3.c1 = b3t4.c1)
2906 -> Seq Scan on t3 b3t3 (cost=xxx rows=1130 width=xxx)
2907 -> Hash (cost=xxx rows=1130 width=xxx)
2908 -> Seq Scan on t4 b3t4 (cost=xxx rows=1130 width=xxx)
2909 -> Index Only Scan using t2_i1 on t2 b3t2 (cost=xxx rows=1 width=xxx)
2910 Index Cond: (c1 = b3t3.c1)
2911 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=999 width=xxx)
2913 -> Sort (cost=xxx rows=100 width=xxx)
2915 -> Nested Loop (cost=xxx rows=100 width=xxx)
2916 -> Hash Join (cost=xxx rows=100 width=xxx)
2917 Hash Cond: (bmt3.c1 = bmt4.c1)
2918 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
2919 -> Hash (cost=xxx rows=100 width=xxx)
2920 -> Merge Join (cost=xxx rows=100 width=xxx)
2921 Merge Cond: (bmt4.c1 = c1.c1)
2922 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1130 width=xxx)
2923 -> Sort (cost=xxx rows=100 width=xxx)
2925 -> CTE Scan on c1 (cost=xxx rows=100 width=xxx)
2926 -> Index Only Scan using t2_i1 on t2 bmt2 (cost=xxx rows=1 width=xxx)
2927 Index Cond: (c1 = bmt3.c1)
2930 \o results/ut-R.tmpout
2932 Leading(c1 bmt4 bmt3 bmt2 bmt1)
2933 Leading(b1t4 b1t3 b1t2 b1t1)
2934 Leading(b2t4 b2t3 b2t2 b2t1)
2935 Leading(b3t4 b3t3 b3t2 b3t1)
2937 HashJoin(c1 bmt4 bmt3)
2938 NestLoop(c1 bmt4 bmt3 bmt2)
2939 MergeJoin(c1 bmt4 bmt3 bmt2 bmt1)
2941 NestLoop(b1t4 b1t3 b1t2)
2942 MergeJoin(b1t4 b1t3 b1t2 b1t1)
2944 NestLoop(b2t4 b2t3 b2t2)
2945 MergeJoin(b2t4 b2t3 b2t2 b2t1)
2947 NestLoop(b3t4 b3t3 b3t2)
2948 MergeJoin(b3t4 b3t3 b3t2 b3t1)
2950 Rows(c1 bmt4 bmt3 #1)
2951 Rows(c1 bmt4 bmt3 bmt2 #1)
2952 Rows(c1 bmt4 bmt3 bmt2 bmt1 #1)
2954 Rows(b1t4 b1t3 b1t2 #1)
2955 Rows(b1t4 b1t3 b1t2 b1t1 #1)
2957 Rows(b2t4 b2t3 b2t2 #1)
2958 Rows(b2t4 b2t3 b2t2 b2t1 #1)
2960 Rows(b3t4 b3t3 b3t2 #1)
2961 Rows(b3t4 b3t3 b3t2 b3t1 #1)
2965 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
2968 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
2970 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
2972 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
2980 NestLoop(b1t2 b1t3 b1t4)
2981 NestLoop(b2t2 b2t3 b2t4)
2982 NestLoop(b3t2 b3t3 b3t4)
2983 HashJoin(bmt3 bmt4 c1)
2984 MergeJoin(b1t1 b1t2 b1t3 b1t4)
2985 MergeJoin(b2t1 b2t2 b2t3 b2t4)
2986 MergeJoin(b3t1 b3t2 b3t3 b3t4)
2987 NestLoop(bmt2 bmt3 bmt4 c1)
2988 MergeJoin(bmt1 bmt2 bmt3 bmt4 c1)
2989 Leading(c1 bmt4 bmt3 bmt2 bmt1)
2990 Leading(b1t4 b1t3 b1t2 b1t1)
2991 Leading(b2t4 b2t3 b2t2 b2t1)
2992 Leading(b3t4 b3t3 b3t2 b3t1)
2997 Rows(b1t2 b1t3 b1t4 #1)
2998 Rows(b2t2 b2t3 b2t4 #1)
2999 Rows(b3t2 b3t3 b3t4 #1)
3000 Rows(bmt3 bmt4 c1 #1)
3001 Rows(b1t1 b1t2 b1t3 b1t4 #1)
3002 Rows(b2t1 b2t2 b2t3 b2t4 #1)
3003 Rows(b3t1 b3t2 b3t3 b3t4 #1)
3004 Rows(bmt2 bmt3 bmt4 c1 #1)
3005 Rows(bmt1 bmt2 bmt3 bmt4 c1 #1)
3011 \! sql/maskout.sh results/ut-R.tmpout
3013 ------------------------------------------------------------------------------------------------------------------
3014 Merge Join (cost=xxx rows=1 width=xxx)
3015 Merge Cond: (bmt1.c1 = bmt2.c1)
3017 -> Merge Join (cost=xxx rows=1 width=xxx)
3018 Merge Cond: (b1t1.c1 = b1t2.c1)
3019 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1000 width=xxx)
3020 -> Sort (cost=xxx rows=1 width=xxx)
3022 -> Nested Loop (cost=xxx rows=1 width=xxx)
3023 -> Hash Join (cost=xxx rows=1 width=xxx)
3024 Hash Cond: (b1t3.c1 = b1t4.c1)
3025 -> Seq Scan on t3 b1t3 (cost=xxx rows=1130 width=xxx)
3026 -> Hash (cost=xxx rows=1130 width=xxx)
3027 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
3028 -> Index Only Scan using t2_i1 on t2 b1t2 (cost=xxx rows=1 width=xxx)
3029 Index Cond: (c1 = b1t3.c1)
3030 InitPlan 2 (returns $3)
3031 -> Merge Join (cost=xxx rows=1 width=xxx)
3032 Merge Cond: (b2t1.c1 = b2t2.c1)
3033 -> Index Only Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1000 width=xxx)
3034 -> Sort (cost=xxx rows=1 width=xxx)
3036 -> Nested Loop (cost=xxx rows=1 width=xxx)
3037 -> Hash Join (cost=xxx rows=1 width=xxx)
3038 Hash Cond: (b2t3.c1 = b2t4.c1)
3039 -> Seq Scan on t3 b2t3 (cost=xxx rows=1130 width=xxx)
3040 -> Hash (cost=xxx rows=1130 width=xxx)
3041 -> Seq Scan on t4 b2t4 (cost=xxx rows=1130 width=xxx)
3042 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
3043 Index Cond: (c1 = b2t3.c1)
3044 InitPlan 3 (returns $5)
3045 -> Merge Join (cost=xxx rows=1 width=xxx)
3046 Merge Cond: (b3t1.c1 = b3t2.c1)
3047 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
3048 -> Sort (cost=xxx rows=1 width=xxx)
3050 -> Nested Loop (cost=xxx rows=1 width=xxx)
3051 -> Hash Join (cost=xxx rows=1 width=xxx)
3052 Hash Cond: (b3t3.c1 = b3t4.c1)
3053 -> Seq Scan on t3 b3t3 (cost=xxx rows=1130 width=xxx)
3054 -> Hash (cost=xxx rows=1130 width=xxx)
3055 -> Seq Scan on t4 b3t4 (cost=xxx rows=1130 width=xxx)
3056 -> Index Only Scan using t2_i1 on t2 b3t2 (cost=xxx rows=1 width=xxx)
3057 Index Cond: (c1 = b3t3.c1)
3058 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=999 width=xxx)
3060 -> Sort (cost=xxx rows=1 width=xxx)
3062 -> Nested Loop (cost=xxx rows=1 width=xxx)
3063 -> Hash Join (cost=xxx rows=1 width=xxx)
3064 Hash Cond: (bmt3.c1 = bmt4.c1)
3065 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
3066 -> Hash (cost=xxx rows=1 width=xxx)
3067 -> Merge Join (cost=xxx rows=1 width=xxx)
3068 Merge Cond: (bmt4.c1 = c1.c1)
3069 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1130 width=xxx)
3070 -> Sort (cost=xxx rows=1 width=xxx)
3072 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
3073 -> Index Only Scan using t2_i1 on t2 bmt2 (cost=xxx rows=1 width=xxx)
3074 Index Cond: (c1 = bmt3.c1)
3078 \o results/ut-R.tmpout
3080 Leading(c1 bmt4 bmt3 bmt2 bmt1)
3081 Leading(b1t4 b1t3 b1t2 b1t1)
3083 HashJoin(c1 bmt4 bmt3)
3084 NestLoop(c1 bmt4 bmt3 bmt2)
3085 MergeJoin(c1 bmt4 bmt3 bmt2 bmt1)
3086 MergeJoin(b1t4 b1t3)
3087 HashJoin(b1t4 b1t3 b1t2)
3088 NestLoop(b1t4 b1t3 b1t2 b1t1)
3092 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
3095 SELECT b2t1.c1 FROM s1.t1 b2t1 WHERE b2t1.c1 = 1
3097 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
3099 SELECT b3t1.c1 FROM s1.t1 b3t1
3103 MergeJoin(b1t3 b1t4)
3105 HashJoin(b1t2 b1t3 b1t4)
3106 HashJoin(bmt3 bmt4 c1)
3107 NestLoop(b1t1 b1t2 b1t3 b1t4)
3108 NestLoop(bmt2 bmt3 bmt4 c1)
3109 MergeJoin(bmt1 bmt2 bmt3 bmt4 c1)
3110 Leading(c1 bmt4 bmt3 bmt2 bmt1)
3111 Leading(b1t4 b1t3 b1t2 b1t1)
3117 \! sql/maskout.sh results/ut-R.tmpout
3119 ------------------------------------------------------------------------------------------------------------------
3120 Merge Join (cost=xxx rows=10 width=xxx)
3121 Merge Cond: (bmt1.c1 = bmt2.c1)
3123 -> Nested Loop (cost=xxx rows=100 width=xxx)
3124 Join Filter: (b1t2.c1 = b1t1.c1)
3125 -> Hash Join (cost=xxx rows=100 width=xxx)
3126 Hash Cond: (b1t3.c1 = b1t2.c1)
3127 -> Merge Join (cost=xxx rows=1130 width=xxx)
3128 Merge Cond: (b1t3.c1 = b1t4.c1)
3129 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
3130 -> Index Only Scan using t4_i1 on t4 b1t4 (cost=xxx rows=1130 width=xxx)
3131 -> Hash (cost=xxx rows=100 width=xxx)
3132 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
3133 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
3134 Index Cond: (c1 = b1t3.c1)
3135 InitPlan 2 (returns $2)
3136 -> Index Only Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1 width=xxx)
3137 Index Cond: (c1 = 1)
3138 InitPlan 3 (returns $3)
3139 -> Seq Scan on t1 b3t1 (cost=xxx rows=1000 width=xxx)
3140 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=999 width=xxx)
3142 -> Sort (cost=xxx rows=100 width=xxx)
3144 -> Nested Loop (cost=xxx rows=100 width=xxx)
3145 -> Hash Join (cost=xxx rows=100 width=xxx)
3146 Hash Cond: (bmt3.c1 = bmt4.c1)
3147 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
3148 -> Hash (cost=xxx rows=100 width=xxx)
3149 -> Merge Join (cost=xxx rows=100 width=xxx)
3150 Merge Cond: (bmt4.c1 = c1.c1)
3151 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1130 width=xxx)
3152 -> Sort (cost=xxx rows=100 width=xxx)
3154 -> CTE Scan on c1 (cost=xxx rows=100 width=xxx)
3155 -> Index Only Scan using t2_i1 on t2 bmt2 (cost=xxx rows=1 width=xxx)
3156 Index Cond: (c1 = bmt3.c1)
3159 \o results/ut-R.tmpout
3161 Leading(c1 bmt4 bmt3 bmt2 bmt1)
3162 Leading(b1t4 b1t3 b1t2 b1t1)
3164 HashJoin(c1 bmt4 bmt3)
3165 NestLoop(c1 bmt4 bmt3 bmt2)
3166 MergeJoin(c1 bmt4 bmt3 bmt2 bmt1)
3167 MergeJoin(b1t4 b1t3)
3168 HashJoin(b1t4 b1t3 b1t2)
3169 NestLoop(b1t4 b1t3 b1t2 b1t1)
3171 Rows(c1 bmt4 bmt3 #1)
3172 Rows(c1 bmt4 bmt3 bmt2 #1)
3173 Rows(c1 bmt4 bmt3 bmt2 bmt1 #1)
3175 Rows(b1t4 b1t3 b1t2 #1)
3176 Rows(b1t4 b1t3 b1t2 b1t1 #1)
3180 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
3183 SELECT b2t1.c1 FROM s1.t1 b2t1 WHERE b2t1.c1 = 1
3185 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
3187 SELECT b3t1.c1 FROM s1.t1 b3t1
3191 MergeJoin(b1t3 b1t4)
3193 HashJoin(b1t2 b1t3 b1t4)
3194 HashJoin(bmt3 bmt4 c1)
3195 NestLoop(b1t1 b1t2 b1t3 b1t4)
3196 NestLoop(bmt2 bmt3 bmt4 c1)
3197 MergeJoin(bmt1 bmt2 bmt3 bmt4 c1)
3198 Leading(c1 bmt4 bmt3 bmt2 bmt1)
3199 Leading(b1t4 b1t3 b1t2 b1t1)
3202 Rows(b1t2 b1t3 b1t4 #1)
3203 Rows(bmt3 bmt4 c1 #1)
3204 Rows(b1t1 b1t2 b1t3 b1t4 #1)
3205 Rows(bmt2 bmt3 bmt4 c1 #1)
3206 Rows(bmt1 bmt2 bmt3 bmt4 c1 #1)
3212 \! sql/maskout.sh results/ut-R.tmpout
3214 ------------------------------------------------------------------------------------------------------------------
3215 Merge Join (cost=xxx rows=1 width=xxx)
3216 Merge Cond: (bmt1.c1 = bmt2.c1)
3218 -> Nested Loop (cost=xxx rows=1 width=xxx)
3219 Join Filter: (b1t2.c1 = b1t1.c1)
3220 -> Hash Join (cost=xxx rows=1 width=xxx)
3221 Hash Cond: (b1t3.c1 = b1t2.c1)
3222 -> Merge Join (cost=xxx rows=1 width=xxx)
3223 Merge Cond: (b1t3.c1 = b1t4.c1)
3224 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
3225 -> Index Only Scan using t4_i1 on t4 b1t4 (cost=xxx rows=1130 width=xxx)
3226 -> Hash (cost=xxx rows=100 width=xxx)
3227 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
3228 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
3229 Index Cond: (c1 = b1t3.c1)
3230 InitPlan 2 (returns $2)
3231 -> Index Only Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1 width=xxx)
3232 Index Cond: (c1 = 1)
3233 InitPlan 3 (returns $3)
3234 -> Seq Scan on t1 b3t1 (cost=xxx rows=1000 width=xxx)
3235 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=999 width=xxx)
3237 -> Sort (cost=xxx rows=1 width=xxx)
3239 -> Nested Loop (cost=xxx rows=1 width=xxx)
3240 -> Hash Join (cost=xxx rows=1 width=xxx)
3241 Hash Cond: (bmt3.c1 = bmt4.c1)
3242 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
3243 -> Hash (cost=xxx rows=1 width=xxx)
3244 -> Merge Join (cost=xxx rows=1 width=xxx)
3245 Merge Cond: (bmt4.c1 = c1.c1)
3246 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1130 width=xxx)
3247 -> Sort (cost=xxx rows=1 width=xxx)
3249 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
3250 -> Index Only Scan using t2_i1 on t2 bmt2 (cost=xxx rows=1 width=xxx)
3251 Index Cond: (c1 = bmt3.c1)
3255 ---- No. R-2-3 RULE or VIEW
3258 \o results/ut-R.tmpout
3260 Leading(r1 t1 t2 t3 t4)
3262 EXPLAIN UPDATE s1.r1 SET c1 = c1 WHERE c1 = 1;
3265 Leading(r1 t1 t2 t3 t4)
3271 \! sql/maskout.sh results/ut-R.tmpout
3273 -----------------------------------------------------------------------------------------------
3274 Aggregate (cost=xxx rows=1 width=xxx)
3275 -> Nested Loop (cost=xxx rows=1 width=xxx)
3276 Join Filter: (t1.c1 = t4.c1)
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 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3291 TID Cond: (ctid = '(1,1)'::tid)
3292 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3293 TID Cond: (ctid = '(1,1)'::tid)
3296 \o results/ut-R.tmpout
3298 Leading(r1 t1 t2 t3 t4)
3299 Rows(r1 t1 t2 t3 t4 #2)
3300 Rows(r1 t1 t2 t3 #2)
3304 EXPLAIN UPDATE s1.r1 SET c1 = c1 WHERE c1 = 1;
3307 Leading(r1 t1 t2 t3 t4)
3310 Rows(r1 t1 t2 t3 #2)
3311 Rows(r1 t1 t2 t3 t4 #2)
3317 \! sql/maskout.sh results/ut-R.tmpout
3319 ---------------------------------------------------------------------------------
3320 Aggregate (cost=xxx rows=1 width=xxx)
3321 -> Nested Loop (cost=xxx rows=2 width=xxx)
3322 Join Filter: (t1.c1 = t4.c1)
3323 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3324 TID Cond: (ctid = '(1,1)'::tid)
3325 -> Nested Loop (cost=xxx rows=2 width=xxx)
3326 Join Filter: (t1.c1 = t3.c1)
3327 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3328 TID Cond: (ctid = '(1,1)'::tid)
3329 -> Nested Loop (cost=xxx rows=2 width=xxx)
3330 Join Filter: (t1.c1 = t2.c1)
3331 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3332 Filter: (ctid = '(1,1)'::tid)
3333 -> Nested Loop (cost=xxx rows=2 width=xxx)
3334 -> Tid Scan on t1 (cost=xxx rows=1 width=xxx)
3335 TID Cond: (ctid = '(1,1)'::tid)
3336 -> Seq Scan on r1 (cost=xxx rows=6 width=xxx)
3340 \o results/ut-R.tmpout
3342 Leading(r1_ b1t1 b1t2 b1t3 b1t4)
3344 EXPLAIN UPDATE s1.r1_ SET c1 = c1 WHERE c1 = 1;
3347 Leading(r1_ b1t1 b1t2 b1t3 b1t4)
3353 \! sql/maskout.sh results/ut-R.tmpout
3355 ----------------------------------------------------------------------------------------------------
3356 Aggregate (cost=xxx rows=1 width=xxx)
3357 -> Nested Loop (cost=xxx rows=1 width=xxx)
3358 Join Filter: (b1t1.c1 = b1t4.c1)
3359 -> Nested Loop (cost=xxx rows=1 width=xxx)
3360 Join Filter: (b1t1.c1 = b1t3.c1)
3361 -> Merge Join (cost=xxx rows=1 width=xxx)
3362 Merge Cond: (b1t1.c1 = b1t2.c1)
3363 -> Nested Loop (cost=xxx rows=6 width=xxx)
3364 -> Index Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
3365 Filter: (ctid = '(1,1)'::tid)
3366 -> Seq Scan on r1_ (cost=xxx rows=6 width=xxx)
3368 -> Sort (cost=xxx rows=1 width=xxx)
3370 -> Seq Scan on t2 b1t2 (cost=xxx rows=1 width=xxx)
3371 Filter: (ctid = '(1,1)'::tid)
3372 -> Tid Scan on t3 b1t3 (cost=xxx rows=1 width=xxx)
3373 TID Cond: (ctid = '(1,1)'::tid)
3374 -> Tid Scan on t4 b1t4 (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 -> Nested Loop (cost=xxx rows=1 width=xxx)
3450 Join Filter: (t1.c1 = t3.c1)
3451 -> Merge Join (cost=xxx rows=1 width=xxx)
3452 Merge Cond: (t1.c1 = t2.c1)
3453 -> Nested Loop (cost=xxx rows=6 width=xxx)
3454 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
3455 Filter: (ctid = '(1,1)'::tid)
3456 -> Seq Scan on r2 (cost=xxx rows=6 width=xxx)
3458 -> Sort (cost=xxx rows=1 width=xxx)
3460 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3461 Filter: (ctid = '(1,1)'::tid)
3462 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3463 TID Cond: (ctid = '(1,1)'::tid)
3464 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3465 TID Cond: (ctid = '(1,1)'::tid)
3467 Aggregate (cost=xxx rows=1 width=xxx)
3468 -> Nested Loop (cost=xxx rows=1 width=xxx)
3469 Join Filter: (t1.c1 = t4.c1)
3470 -> Nested Loop (cost=xxx rows=1 width=xxx)
3471 Join Filter: (t1.c1 = t3.c1)
3472 -> Merge Join (cost=xxx rows=1 width=xxx)
3473 Merge Cond: (t1.c1 = t2.c1)
3474 -> Nested Loop (cost=xxx rows=6 width=xxx)
3475 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
3476 Filter: (ctid = '(1,1)'::tid)
3477 -> Seq Scan on r2 (cost=xxx rows=6 width=xxx)
3479 -> Sort (cost=xxx rows=1 width=xxx)
3481 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3482 Filter: (ctid = '(1,1)'::tid)
3483 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3484 TID Cond: (ctid = '(1,1)'::tid)
3485 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3486 TID Cond: (ctid = '(1,1)'::tid)
3489 \o results/ut-R.tmpout
3491 Leading(r2 t1 t2 t3 t4)
3492 Rows(r2 t1 t2 t3 t4 #2)
3493 Rows(r2 t1 t2 t3 #2)
3497 EXPLAIN UPDATE s1.r2 SET c1 = c1 WHERE c1 = 1;
3500 Leading(r2 t1 t2 t3 t4)
3503 Rows(r2 t1 t2 t3 #2)
3504 Rows(r2 t1 t2 t3 t4 #2)
3511 Leading(r2 t1 t2 t3 t4)
3514 Rows(r2 t1 t2 t3 #2)
3515 Rows(r2 t1 t2 t3 t4 #2)
3521 \! sql/maskout.sh results/ut-R.tmpout
3523 ---------------------------------------------------------------------------------
3524 Aggregate (cost=xxx rows=1 width=xxx)
3525 -> Nested Loop (cost=xxx rows=2 width=xxx)
3526 Join Filter: (t1.c1 = t4.c1)
3527 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3528 TID Cond: (ctid = '(1,1)'::tid)
3529 -> Nested Loop (cost=xxx rows=2 width=xxx)
3530 Join Filter: (t1.c1 = t3.c1)
3531 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3532 TID Cond: (ctid = '(1,1)'::tid)
3533 -> Nested Loop (cost=xxx rows=2 width=xxx)
3534 Join Filter: (t1.c1 = t2.c1)
3535 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3536 Filter: (ctid = '(1,1)'::tid)
3537 -> Nested Loop (cost=xxx rows=2 width=xxx)
3538 -> Tid Scan on t1 (cost=xxx rows=1 width=xxx)
3539 TID Cond: (ctid = '(1,1)'::tid)
3540 -> Seq Scan on r2 (cost=xxx rows=6 width=xxx)
3543 Aggregate (cost=xxx rows=1 width=xxx)
3544 -> Nested Loop (cost=xxx rows=2 width=xxx)
3545 Join Filter: (t1.c1 = t4.c1)
3546 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3547 TID Cond: (ctid = '(1,1)'::tid)
3548 -> Nested Loop (cost=xxx rows=2 width=xxx)
3549 Join Filter: (t1.c1 = t3.c1)
3550 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3551 TID Cond: (ctid = '(1,1)'::tid)
3552 -> Nested Loop (cost=xxx rows=2 width=xxx)
3553 Join Filter: (t1.c1 = t2.c1)
3554 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3555 Filter: (ctid = '(1,1)'::tid)
3556 -> Nested Loop (cost=xxx rows=2 width=xxx)
3557 -> Tid Scan on t1 (cost=xxx rows=1 width=xxx)
3558 TID Cond: (ctid = '(1,1)'::tid)
3559 -> Seq Scan on r2 (cost=xxx rows=6 width=xxx)
3563 \o results/ut-R.tmpout
3565 Leading(r2_ b1t1 b1t2 b1t3 b1t4)
3566 Leading(r2_ b2t1 b2t2 b2t3 b2t4)
3568 EXPLAIN UPDATE s1.r2_ SET c1 = c1 WHERE c1 = 1;
3571 Leading(r2_ b1t1 b1t2 b1t3 b1t4)
3573 Leading(r2_ b2t1 b2t2 b2t3 b2t4)
3579 Leading(r2_ b2t1 b2t2 b2t3 b2t4)
3581 Leading(r2_ b1t1 b1t2 b1t3 b1t4)
3586 \! sql/maskout.sh results/ut-R.tmpout
3588 ----------------------------------------------------------------------------------------------------
3589 Aggregate (cost=xxx rows=1 width=xxx)
3590 -> Nested Loop (cost=xxx rows=1 width=xxx)
3591 Join Filter: (b1t1.c1 = b1t4.c1)
3592 -> Nested Loop (cost=xxx rows=1 width=xxx)
3593 Join Filter: (b1t1.c1 = b1t3.c1)
3594 -> Merge Join (cost=xxx rows=1 width=xxx)
3595 Merge Cond: (b1t1.c1 = b1t2.c1)
3596 -> Nested Loop (cost=xxx rows=6 width=xxx)
3597 -> Index Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
3598 Filter: (ctid = '(1,1)'::tid)
3599 -> Seq Scan on r2_ (cost=xxx rows=6 width=xxx)
3601 -> Sort (cost=xxx rows=1 width=xxx)
3603 -> Seq Scan on t2 b1t2 (cost=xxx rows=1 width=xxx)
3604 Filter: (ctid = '(1,1)'::tid)
3605 -> Tid Scan on t3 b1t3 (cost=xxx rows=1 width=xxx)
3606 TID Cond: (ctid = '(1,1)'::tid)
3607 -> Tid Scan on t4 b1t4 (cost=xxx rows=1 width=xxx)
3608 TID Cond: (ctid = '(1,1)'::tid)
3610 Aggregate (cost=xxx rows=1 width=xxx)
3611 -> Nested Loop (cost=xxx rows=1 width=xxx)
3612 Join Filter: (b2t1.c1 = b2t4.c1)
3613 -> Nested Loop (cost=xxx rows=1 width=xxx)
3614 Join Filter: (b2t1.c1 = b2t3.c1)
3615 -> Merge Join (cost=xxx rows=1 width=xxx)
3616 Merge Cond: (b2t1.c1 = b2t2.c1)
3617 -> Nested Loop (cost=xxx rows=6 width=xxx)
3618 -> Index Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1 width=xxx)
3619 Filter: (ctid = '(1,1)'::tid)
3620 -> Seq Scan on r2_ (cost=xxx rows=6 width=xxx)
3622 -> Sort (cost=xxx rows=1 width=xxx)
3624 -> Seq Scan on t2 b2t2 (cost=xxx rows=1 width=xxx)
3625 Filter: (ctid = '(1,1)'::tid)
3626 -> Tid Scan on t3 b2t3 (cost=xxx rows=1 width=xxx)
3627 TID Cond: (ctid = '(1,1)'::tid)
3628 -> Tid Scan on t4 b2t4 (cost=xxx rows=1 width=xxx)
3629 TID Cond: (ctid = '(1,1)'::tid)
3632 \o results/ut-R.tmpout
3634 Leading(r2_ b1t1 b1t2 b1t3 b1t4)
3635 Leading(r2_ b2t1 b2t2 b2t3 b2t4)
3637 Rows(r2_ b1t1 b1t2 #2)
3638 Rows(r2_ b1t1 b1t2 b1t3 #2)
3639 Rows(r2_ b1t1 b1t2 b1t3 b1t4 #2)
3641 Rows(r2_ b2t1 b2t2 #2)
3642 Rows(r2_ b2t1 b2t2 b2t3 #2)
3643 Rows(r2_ b2t1 b2t2 b2t3 b2t4 #2)
3645 EXPLAIN UPDATE s1.r2_ SET c1 = c1 WHERE c1 = 1;
3648 Leading(r2_ b1t1 b1t2 b1t3 b1t4)
3650 Rows(b1t1 b1t2 r2_ #2)
3651 Rows(b1t1 b1t2 b1t3 r2_ #2)
3652 Rows(b1t1 b1t2 b1t3 b1t4 r2_ #2)
3654 Leading(r2_ b2t1 b2t2 b2t3 b2t4)
3656 Rows(b2t1 b2t2 r2_ #2)
3657 Rows(b2t1 b2t2 b2t3 r2_ #2)
3658 Rows(b2t1 b2t2 b2t3 b2t4 r2_ #2)
3664 Leading(r2_ b2t1 b2t2 b2t3 b2t4)
3666 Rows(b2t1 b2t2 r2_ #2)
3667 Rows(b2t1 b2t2 b2t3 r2_ #2)
3668 Rows(b2t1 b2t2 b2t3 b2t4 r2_ #2)
3670 Leading(r2_ b1t1 b1t2 b1t3 b1t4)
3672 Rows(b1t1 b1t2 r2_ #2)
3673 Rows(b1t1 b1t2 b1t3 r2_ #2)
3674 Rows(b1t1 b1t2 b1t3 b1t4 r2_ #2)
3679 \! sql/maskout.sh results/ut-R.tmpout
3681 -------------------------------------------------------------------------------------
3682 Aggregate (cost=xxx rows=1 width=xxx)
3683 -> Nested Loop (cost=xxx rows=2 width=xxx)
3684 Join Filter: (b1t1.c1 = b1t4.c1)
3685 -> Tid Scan on t4 b1t4 (cost=xxx rows=1 width=xxx)
3686 TID Cond: (ctid = '(1,1)'::tid)
3687 -> Nested Loop (cost=xxx rows=2 width=xxx)
3688 Join Filter: (b1t1.c1 = b1t3.c1)
3689 -> Tid Scan on t3 b1t3 (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 = b1t2.c1)
3693 -> Seq Scan on t2 b1t2 (cost=xxx rows=1 width=xxx)
3694 Filter: (ctid = '(1,1)'::tid)
3695 -> Nested Loop (cost=xxx rows=2 width=xxx)
3696 -> Tid Scan on t1 b1t1 (cost=xxx rows=1 width=xxx)
3697 TID Cond: (ctid = '(1,1)'::tid)
3698 -> Seq Scan on r2_ (cost=xxx rows=6 width=xxx)
3701 Aggregate (cost=xxx rows=1 width=xxx)
3702 -> Nested Loop (cost=xxx rows=2 width=xxx)
3703 Join Filter: (b2t1.c1 = b2t4.c1)
3704 -> Tid Scan on t4 b2t4 (cost=xxx rows=1 width=xxx)
3705 TID Cond: (ctid = '(1,1)'::tid)
3706 -> Nested Loop (cost=xxx rows=2 width=xxx)
3707 Join Filter: (b2t1.c1 = b2t3.c1)
3708 -> Tid Scan on t3 b2t3 (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 = b2t2.c1)
3712 -> Seq Scan on t2 b2t2 (cost=xxx rows=1 width=xxx)
3713 Filter: (ctid = '(1,1)'::tid)
3714 -> Nested Loop (cost=xxx rows=2 width=xxx)
3715 -> Tid Scan on t1 b2t1 (cost=xxx rows=1 width=xxx)
3716 TID Cond: (ctid = '(1,1)'::tid)
3717 -> Seq Scan on r2_ (cost=xxx rows=6 width=xxx)
3722 \o results/ut-R.tmpout
3724 Leading(r3 t1 t2 t3 t4)
3726 EXPLAIN UPDATE s1.r3 SET c1 = c1 WHERE c1 = 1;
3729 Leading(r3 t1 t2 t3 t4)
3736 Leading(r3 t1 t2 t3 t4)
3743 Leading(r3 t1 t2 t3 t4)
3749 \! sql/maskout.sh results/ut-R.tmpout
3751 -----------------------------------------------------------------------------------------------
3752 Aggregate (cost=xxx rows=1 width=xxx)
3753 -> Nested Loop (cost=xxx rows=1 width=xxx)
3754 Join Filter: (t1.c1 = t4.c1)
3755 -> Nested Loop (cost=xxx rows=1 width=xxx)
3756 Join Filter: (t1.c1 = t3.c1)
3757 -> Merge Join (cost=xxx rows=1 width=xxx)
3758 Merge Cond: (t1.c1 = t2.c1)
3759 -> Nested Loop (cost=xxx rows=6 width=xxx)
3760 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
3761 Filter: (ctid = '(1,1)'::tid)
3762 -> Seq Scan on r3 (cost=xxx rows=6 width=xxx)
3764 -> Sort (cost=xxx rows=1 width=xxx)
3766 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3767 Filter: (ctid = '(1,1)'::tid)
3768 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3769 TID Cond: (ctid = '(1,1)'::tid)
3770 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3771 TID Cond: (ctid = '(1,1)'::tid)
3773 Aggregate (cost=xxx rows=1 width=xxx)
3774 -> Nested Loop (cost=xxx rows=1 width=xxx)
3775 Join Filter: (t1.c1 = t4.c1)
3776 -> Nested Loop (cost=xxx rows=1 width=xxx)
3777 Join Filter: (t1.c1 = t3.c1)
3778 -> Merge Join (cost=xxx rows=1 width=xxx)
3779 Merge Cond: (t1.c1 = t2.c1)
3780 -> Nested Loop (cost=xxx rows=6 width=xxx)
3781 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
3782 Filter: (ctid = '(1,1)'::tid)
3783 -> Seq Scan on r3 (cost=xxx rows=6 width=xxx)
3785 -> Sort (cost=xxx rows=1 width=xxx)
3787 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3788 Filter: (ctid = '(1,1)'::tid)
3789 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3790 TID Cond: (ctid = '(1,1)'::tid)
3791 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3792 TID Cond: (ctid = '(1,1)'::tid)
3794 Aggregate (cost=xxx rows=1 width=xxx)
3795 -> Nested Loop (cost=xxx rows=1 width=xxx)
3796 Join Filter: (t1.c1 = t4.c1)
3797 -> Nested Loop (cost=xxx rows=1 width=xxx)
3798 Join Filter: (t1.c1 = t3.c1)
3799 -> Merge Join (cost=xxx rows=1 width=xxx)
3800 Merge Cond: (t1.c1 = t2.c1)
3801 -> Nested Loop (cost=xxx rows=6 width=xxx)
3802 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
3803 Filter: (ctid = '(1,1)'::tid)
3804 -> Seq Scan on r3 (cost=xxx rows=6 width=xxx)
3806 -> Sort (cost=xxx rows=1 width=xxx)
3808 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3809 Filter: (ctid = '(1,1)'::tid)
3810 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3811 TID Cond: (ctid = '(1,1)'::tid)
3812 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3813 TID Cond: (ctid = '(1,1)'::tid)
3816 \o results/ut-R.tmpout
3818 Leading(r3 t1 t2 t3 t4)
3819 Rows(r3 t1 t2 t3 t4 #2)
3820 Rows(r3 t1 t2 t3 #2)
3824 EXPLAIN UPDATE s1.r3 SET c1 = c1 WHERE c1 = 1;
3827 Leading(r3 t1 t2 t3 t4)
3830 Rows(r3 t1 t2 t3 #2)
3831 Rows(r3 t1 t2 t3 t4 #2)
3838 Leading(r3 t1 t2 t3 t4)
3841 Rows(r3 t1 t2 t3 #2)
3842 Rows(r3 t1 t2 t3 t4 #2)
3849 Leading(r3 t1 t2 t3 t4)
3852 Rows(r3 t1 t2 t3 #2)
3853 Rows(r3 t1 t2 t3 t4 #2)
3859 \! sql/maskout.sh results/ut-R.tmpout
3861 ---------------------------------------------------------------------------------
3862 Aggregate (cost=xxx rows=1 width=xxx)
3863 -> Nested Loop (cost=xxx rows=2 width=xxx)
3864 Join Filter: (t1.c1 = t4.c1)
3865 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3866 TID Cond: (ctid = '(1,1)'::tid)
3867 -> Nested Loop (cost=xxx rows=2 width=xxx)
3868 Join Filter: (t1.c1 = t3.c1)
3869 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3870 TID Cond: (ctid = '(1,1)'::tid)
3871 -> Nested Loop (cost=xxx rows=2 width=xxx)
3872 Join Filter: (t1.c1 = t2.c1)
3873 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3874 Filter: (ctid = '(1,1)'::tid)
3875 -> Nested Loop (cost=xxx rows=2 width=xxx)
3876 -> Tid Scan on t1 (cost=xxx rows=1 width=xxx)
3877 TID Cond: (ctid = '(1,1)'::tid)
3878 -> Seq Scan on r3 (cost=xxx rows=6 width=xxx)
3881 Aggregate (cost=xxx rows=1 width=xxx)
3882 -> Nested Loop (cost=xxx rows=2 width=xxx)
3883 Join Filter: (t1.c1 = t4.c1)
3884 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3885 TID Cond: (ctid = '(1,1)'::tid)
3886 -> Nested Loop (cost=xxx rows=2 width=xxx)
3887 Join Filter: (t1.c1 = t3.c1)
3888 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3889 TID Cond: (ctid = '(1,1)'::tid)
3890 -> Nested Loop (cost=xxx rows=2 width=xxx)
3891 Join Filter: (t1.c1 = t2.c1)
3892 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3893 Filter: (ctid = '(1,1)'::tid)
3894 -> Nested Loop (cost=xxx rows=2 width=xxx)
3895 -> Tid Scan on t1 (cost=xxx rows=1 width=xxx)
3896 TID Cond: (ctid = '(1,1)'::tid)
3897 -> Seq Scan on r3 (cost=xxx rows=6 width=xxx)
3900 Aggregate (cost=xxx rows=1 width=xxx)
3901 -> Nested Loop (cost=xxx rows=2 width=xxx)
3902 Join Filter: (t1.c1 = t4.c1)
3903 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3904 TID Cond: (ctid = '(1,1)'::tid)
3905 -> Nested Loop (cost=xxx rows=2 width=xxx)
3906 Join Filter: (t1.c1 = t3.c1)
3907 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3908 TID Cond: (ctid = '(1,1)'::tid)
3909 -> Nested Loop (cost=xxx rows=2 width=xxx)
3910 Join Filter: (t1.c1 = t2.c1)
3911 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3912 Filter: (ctid = '(1,1)'::tid)
3913 -> Nested Loop (cost=xxx rows=2 width=xxx)
3914 -> Tid Scan on t1 (cost=xxx rows=1 width=xxx)
3915 TID Cond: (ctid = '(1,1)'::tid)
3916 -> Seq Scan on r3 (cost=xxx rows=6 width=xxx)
3920 \o results/ut-R.tmpout
3922 Leading(r3_ b1t1 b1t2 b1t3 b1t4)
3923 Leading(r3_ b2t1 b2t2 b2t3 b2t4)
3924 Leading(r3_ b3t1 b3t2 b3t3 b3t4)
3926 EXPLAIN UPDATE s1.r3_ SET c1 = c1 WHERE c1 = 1;
3929 Leading(r3_ b1t1 b1t2 b1t3 b1t4)
3931 Leading(r3_ b2t1 b2t2 b2t3 b2t4)
3932 Leading(r3_ b3t1 b3t2 b3t3 b3t4)
3938 Leading(r3_ b2t1 b2t2 b2t3 b2t4)
3940 Leading(r3_ b1t1 b1t2 b1t3 b1t4)
3941 Leading(r3_ b3t1 b3t2 b3t3 b3t4)
3947 Leading(r3_ b3t1 b3t2 b3t3 b3t4)
3949 Leading(r3_ b1t1 b1t2 b1t3 b1t4)
3950 Leading(r3_ b2t1 b2t2 b2t3 b2t4)
3955 \! sql/maskout.sh results/ut-R.tmpout
3957 ----------------------------------------------------------------------------------------------------
3958 Aggregate (cost=xxx rows=1 width=xxx)
3959 -> Nested Loop (cost=xxx rows=1 width=xxx)
3960 Join Filter: (b1t1.c1 = b1t4.c1)
3961 -> Nested Loop (cost=xxx rows=1 width=xxx)
3962 Join Filter: (b1t1.c1 = b1t3.c1)
3963 -> Merge Join (cost=xxx rows=1 width=xxx)
3964 Merge Cond: (b1t1.c1 = b1t2.c1)
3965 -> Nested Loop (cost=xxx rows=6 width=xxx)
3966 -> Index Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
3967 Filter: (ctid = '(1,1)'::tid)
3968 -> Seq Scan on r3_ (cost=xxx rows=6 width=xxx)
3970 -> Sort (cost=xxx rows=1 width=xxx)
3972 -> Seq Scan on t2 b1t2 (cost=xxx rows=1 width=xxx)
3973 Filter: (ctid = '(1,1)'::tid)
3974 -> Tid Scan on t3 b1t3 (cost=xxx rows=1 width=xxx)
3975 TID Cond: (ctid = '(1,1)'::tid)
3976 -> Tid Scan on t4 b1t4 (cost=xxx rows=1 width=xxx)
3977 TID Cond: (ctid = '(1,1)'::tid)
3979 Aggregate (cost=xxx rows=1 width=xxx)
3980 -> Nested Loop (cost=xxx rows=1 width=xxx)
3981 Join Filter: (b2t1.c1 = b2t4.c1)
3982 -> Nested Loop (cost=xxx rows=1 width=xxx)
3983 Join Filter: (b2t1.c1 = b2t3.c1)
3984 -> Merge Join (cost=xxx rows=1 width=xxx)
3985 Merge Cond: (b2t1.c1 = b2t2.c1)
3986 -> Nested Loop (cost=xxx rows=6 width=xxx)
3987 -> Index Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1 width=xxx)
3988 Filter: (ctid = '(1,1)'::tid)
3989 -> Seq Scan on r3_ (cost=xxx rows=6 width=xxx)
3991 -> Sort (cost=xxx rows=1 width=xxx)
3993 -> Seq Scan on t2 b2t2 (cost=xxx rows=1 width=xxx)
3994 Filter: (ctid = '(1,1)'::tid)
3995 -> Tid Scan on t3 b2t3 (cost=xxx rows=1 width=xxx)
3996 TID Cond: (ctid = '(1,1)'::tid)
3997 -> Tid Scan on t4 b2t4 (cost=xxx rows=1 width=xxx)
3998 TID Cond: (ctid = '(1,1)'::tid)
4000 Aggregate (cost=xxx rows=1 width=xxx)
4001 -> Nested Loop (cost=xxx rows=1 width=xxx)
4002 Join Filter: (b3t1.c1 = b3t4.c1)
4003 -> Nested Loop (cost=xxx rows=1 width=xxx)
4004 Join Filter: (b3t1.c1 = b3t3.c1)
4005 -> Merge Join (cost=xxx rows=1 width=xxx)
4006 Merge Cond: (b3t1.c1 = b3t2.c1)
4007 -> Nested Loop (cost=xxx rows=6 width=xxx)
4008 -> Index Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1 width=xxx)
4009 Filter: (ctid = '(1,1)'::tid)
4010 -> Seq Scan on r3_ (cost=xxx rows=6 width=xxx)
4012 -> Sort (cost=xxx rows=1 width=xxx)
4014 -> Seq Scan on t2 b3t2 (cost=xxx rows=1 width=xxx)
4015 Filter: (ctid = '(1,1)'::tid)
4016 -> Tid Scan on t3 b3t3 (cost=xxx rows=1 width=xxx)
4017 TID Cond: (ctid = '(1,1)'::tid)
4018 -> Tid Scan on t4 b3t4 (cost=xxx rows=1 width=xxx)
4019 TID Cond: (ctid = '(1,1)'::tid)
4022 \o results/ut-R.tmpout
4024 Leading(r3_ b1t1 b1t2 b1t3 b1t4)
4025 Leading(r3_ b2t1 b2t2 b2t3 b2t4)
4026 Leading(r3_ b3t1 b3t2 b3t3 b3t4)
4028 Rows(r3_ b1t1 b1t2 #2)
4029 Rows(r3_ b1t1 b1t2 b1t3 #2)
4030 Rows(r3_ b1t1 b1t2 b1t3 b1t4 #2)
4032 Rows(r3_ b2t1 b2t2 #2)
4033 Rows(r3_ b2t1 b2t2 b2t3 #2)
4034 Rows(r3_ b2t1 b2t2 b2t3 b2t4 #2)
4036 Rows(r3_ b3t1 b3t2 #2)
4037 Rows(r3_ b3t1 b3t2 b3t3 #2)
4038 Rows(r3_ b3t1 b3t2 b3t3 b3t4 #2)
4040 EXPLAIN UPDATE s1.r3_ SET c1 = c1 WHERE c1 = 1;
4043 Leading(r3_ b1t1 b1t2 b1t3 b1t4)
4045 Rows(b1t1 b1t2 r3_ #2)
4046 Rows(b1t1 b1t2 b1t3 r3_ #2)
4047 Rows(b1t1 b1t2 b1t3 b1t4 r3_ #2)
4049 Leading(r3_ b2t1 b2t2 b2t3 b2t4)
4050 Leading(r3_ b3t1 b3t2 b3t3 b3t4)
4053 Rows(b2t1 b2t2 r3_ #2)
4054 Rows(b3t1 b3t2 r3_ #2)
4055 Rows(b2t1 b2t2 b2t3 r3_ #2)
4056 Rows(b3t1 b3t2 b3t3 r3_ #2)
4057 Rows(b2t1 b2t2 b2t3 b2t4 r3_ #2)
4058 Rows(b3t1 b3t2 b3t3 b3t4 r3_ #2)
4064 Leading(r3_ b2t1 b2t2 b2t3 b2t4)
4066 Rows(b2t1 b2t2 r3_ #2)
4067 Rows(b2t1 b2t2 b2t3 r3_ #2)
4068 Rows(b2t1 b2t2 b2t3 b2t4 r3_ #2)
4070 Leading(r3_ b1t1 b1t2 b1t3 b1t4)
4071 Leading(r3_ b3t1 b3t2 b3t3 b3t4)
4074 Rows(b1t1 b1t2 r3_ #2)
4075 Rows(b3t1 b3t2 r3_ #2)
4076 Rows(b1t1 b1t2 b1t3 r3_ #2)
4077 Rows(b3t1 b3t2 b3t3 r3_ #2)
4078 Rows(b1t1 b1t2 b1t3 b1t4 r3_ #2)
4079 Rows(b3t1 b3t2 b3t3 b3t4 r3_ #2)
4085 Leading(r3_ b3t1 b3t2 b3t3 b3t4)
4087 Rows(b3t1 b3t2 r3_ #2)
4088 Rows(b3t1 b3t2 b3t3 r3_ #2)
4089 Rows(b3t1 b3t2 b3t3 b3t4 r3_ #2)
4091 Leading(r3_ b1t1 b1t2 b1t3 b1t4)
4092 Leading(r3_ b2t1 b2t2 b2t3 b2t4)
4095 Rows(b1t1 b1t2 r3_ #2)
4096 Rows(b2t1 b2t2 r3_ #2)
4097 Rows(b1t1 b1t2 b1t3 r3_ #2)
4098 Rows(b2t1 b2t2 b2t3 r3_ #2)
4099 Rows(b1t1 b1t2 b1t3 b1t4 r3_ #2)
4100 Rows(b2t1 b2t2 b2t3 b2t4 r3_ #2)
4105 \! sql/maskout.sh results/ut-R.tmpout
4107 -------------------------------------------------------------------------------------
4108 Aggregate (cost=xxx rows=1 width=xxx)
4109 -> Nested Loop (cost=xxx rows=2 width=xxx)
4110 Join Filter: (b1t1.c1 = b1t4.c1)
4111 -> Tid Scan on t4 b1t4 (cost=xxx rows=1 width=xxx)
4112 TID Cond: (ctid = '(1,1)'::tid)
4113 -> Nested Loop (cost=xxx rows=2 width=xxx)
4114 Join Filter: (b1t1.c1 = b1t3.c1)
4115 -> Tid Scan on t3 b1t3 (cost=xxx rows=1 width=xxx)
4116 TID Cond: (ctid = '(1,1)'::tid)
4117 -> Nested Loop (cost=xxx rows=2 width=xxx)
4118 Join Filter: (b1t1.c1 = b1t2.c1)
4119 -> Seq Scan on t2 b1t2 (cost=xxx rows=1 width=xxx)
4120 Filter: (ctid = '(1,1)'::tid)
4121 -> Nested Loop (cost=xxx rows=2 width=xxx)
4122 -> Tid Scan on t1 b1t1 (cost=xxx rows=1 width=xxx)
4123 TID Cond: (ctid = '(1,1)'::tid)
4124 -> Seq Scan on r3_ (cost=xxx rows=6 width=xxx)
4127 Aggregate (cost=xxx rows=1 width=xxx)
4128 -> Nested Loop (cost=xxx rows=2 width=xxx)
4129 Join Filter: (b2t1.c1 = b2t4.c1)
4130 -> Tid Scan on t4 b2t4 (cost=xxx rows=1 width=xxx)
4131 TID Cond: (ctid = '(1,1)'::tid)
4132 -> Nested Loop (cost=xxx rows=2 width=xxx)
4133 Join Filter: (b2t1.c1 = b2t3.c1)
4134 -> Tid Scan on t3 b2t3 (cost=xxx rows=1 width=xxx)
4135 TID Cond: (ctid = '(1,1)'::tid)
4136 -> Nested Loop (cost=xxx rows=2 width=xxx)
4137 Join Filter: (b2t1.c1 = b2t2.c1)
4138 -> Seq Scan on t2 b2t2 (cost=xxx rows=1 width=xxx)
4139 Filter: (ctid = '(1,1)'::tid)
4140 -> Nested Loop (cost=xxx rows=2 width=xxx)
4141 -> Tid Scan on t1 b2t1 (cost=xxx rows=1 width=xxx)
4142 TID Cond: (ctid = '(1,1)'::tid)
4143 -> Seq Scan on r3_ (cost=xxx rows=6 width=xxx)
4146 Aggregate (cost=xxx rows=1 width=xxx)
4147 -> Nested Loop (cost=xxx rows=2 width=xxx)
4148 Join Filter: (b3t1.c1 = b3t4.c1)
4149 -> Tid Scan on t4 b3t4 (cost=xxx rows=1 width=xxx)
4150 TID Cond: (ctid = '(1,1)'::tid)
4151 -> Nested Loop (cost=xxx rows=2 width=xxx)
4152 Join Filter: (b3t1.c1 = b3t3.c1)
4153 -> Tid Scan on t3 b3t3 (cost=xxx rows=1 width=xxx)
4154 TID Cond: (ctid = '(1,1)'::tid)
4155 -> Nested Loop (cost=xxx rows=2 width=xxx)
4156 Join Filter: (b3t1.c1 = b3t2.c1)
4157 -> Seq Scan on t2 b3t2 (cost=xxx rows=1 width=xxx)
4158 Filter: (ctid = '(1,1)'::tid)
4159 -> Nested Loop (cost=xxx rows=2 width=xxx)
4160 -> Tid Scan on t1 b3t1 (cost=xxx rows=1 width=xxx)
4161 TID Cond: (ctid = '(1,1)'::tid)
4162 -> Seq Scan on r3_ (cost=xxx rows=6 width=xxx)
4167 \o results/ut-R.tmpout
4168 /*+HashJoin(v1t1 v1t1)*/
4169 EXPLAIN SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1;
4170 INFO: pg_hint_plan: hint syntax error at or near "HashJoin(v1t1 v1t1)"
4171 DETAIL: Relation name "v1t1" is ambiguous.
4180 \! sql/maskout.sh results/ut-R.tmpout
4182 --------------------------------------------------------------------------
4183 Hash Join (cost=xxx rows=1000 width=xxx)
4184 Hash Cond: (v1t1.c1 = v1t1_1.c1)
4185 -> Seq Scan on t1 v1t1 (cost=xxx rows=1000 width=xxx)
4186 -> Hash (cost=xxx rows=1000 width=xxx)
4187 -> Seq Scan on t1 v1t1_1 (cost=xxx rows=1000 width=xxx)
4190 \o results/ut-R.tmpout
4191 /*+HashJoin(v1t1 v1t1)Rows(v1t1 v1t1 #1)*/
4192 EXPLAIN SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1;
4193 INFO: pg_hint_plan: hint syntax error at or near "HashJoin(v1t1 v1t1)Rows(v1t1 v1t1 #1)"
4194 DETAIL: Relation name "v1t1" is ambiguous.
4195 INFO: pg_hint_plan: hint syntax error at or near "Rows(v1t1 v1t1 #1)"
4196 DETAIL: Relation name "v1t1" is ambiguous.
4206 \! sql/maskout.sh results/ut-R.tmpout
4208 --------------------------------------------------------------------------
4209 Hash Join (cost=xxx rows=1000 width=xxx)
4210 Hash Cond: (v1t1.c1 = v1t1_1.c1)
4211 -> Seq Scan on t1 v1t1 (cost=xxx rows=1000 width=xxx)
4212 -> Hash (cost=xxx rows=1000 width=xxx)
4213 -> Seq Scan on t1 v1t1_1 (cost=xxx rows=1000 width=xxx)
4217 \o results/ut-R.tmpout
4218 /*+NestLoop(v1t1 v1t1_)*/
4219 EXPLAIN SELECT * FROM s1.v1 v1, s1.v1_ v2 WHERE v1.c1 = v2.c1;
4222 NestLoop(v1t1 v1t1_)
4228 \! sql/maskout.sh results/ut-R.tmpout
4230 -----------------------------------------------------------------------------
4231 Nested Loop (cost=xxx rows=1000 width=xxx)
4232 -> Seq Scan on t1 v1t1 (cost=xxx rows=1000 width=xxx)
4233 -> Index Scan using t1_i1 on t1 v1t1_ (cost=xxx rows=1 width=xxx)
4234 Index Cond: (c1 = v1t1.c1)
4237 \o results/ut-R.tmpout
4238 /*+NestLoop(v1t1 v1t1_)Rows(v1t1 v1t1_ #1)*/
4239 EXPLAIN SELECT * FROM s1.v1 v1, s1.v1_ v2 WHERE v1.c1 = v2.c1;
4242 NestLoop(v1t1 v1t1_)
4249 \! sql/maskout.sh results/ut-R.tmpout
4251 -----------------------------------------------------------------------------
4252 Nested Loop (cost=xxx rows=1 width=xxx)
4253 -> Seq Scan on t1 v1t1 (cost=xxx rows=1000 width=xxx)
4254 -> Index Scan using t1_i1 on t1 v1t1_ (cost=xxx rows=1 width=xxx)
4255 Index Cond: (c1 = v1t1.c1)
4259 \o results/ut-R.tmpout
4260 /*+RowsHashJoin(r4t1 r4t1)*/
4261 EXPLAIN SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1;
4262 INFO: pg_hint_plan: hint syntax error at or near "RowsHashJoin(r4t1 r4t1)"
4263 DETAIL: Unrecognized hint keyword "RowsHashJoin".
4265 \! sql/maskout.sh results/ut-R.tmpout
4267 --------------------------------------------------------------------------
4268 Hash Join (cost=xxx rows=1000 width=xxx)
4269 Hash Cond: (r4t1.c1 = r4t1_1.c1)
4270 -> Seq Scan on t1 r4t1 (cost=xxx rows=1000 width=xxx)
4271 -> Hash (cost=xxx rows=1000 width=xxx)
4272 -> Seq Scan on t1 r4t1_1 (cost=xxx rows=1000 width=xxx)
4275 \o results/ut-R.tmpout
4276 /*+RowsHashJoin(r4t1 r4t1)Rows(r4t1 r4t1 #1)*/
4277 EXPLAIN SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1;
4278 INFO: pg_hint_plan: hint syntax error at or near "RowsHashJoin(r4t1 r4t1)Rows(r4t1 r4t1 #1)"
4279 DETAIL: Unrecognized hint keyword "RowsHashJoin".
4281 \! sql/maskout.sh results/ut-R.tmpout
4283 --------------------------------------------------------------------------
4284 Hash Join (cost=xxx rows=1000 width=xxx)
4285 Hash Cond: (r4t1.c1 = r4t1_1.c1)
4286 -> Seq Scan on t1 r4t1 (cost=xxx rows=1000 width=xxx)
4287 -> Hash (cost=xxx rows=1000 width=xxx)
4288 -> Seq Scan on t1 r4t1_1 (cost=xxx rows=1000 width=xxx)
4292 \o results/ut-R.tmpout
4293 /*+NestLoop(r4t1 r5t1)*/
4294 EXPLAIN SELECT * FROM s1.r4 t1, s1.r5 t2 WHERE t1.c1 = t2.c1;
4303 \! sql/maskout.sh results/ut-R.tmpout
4305 ----------------------------------------------------------------------------
4306 Nested Loop (cost=xxx rows=1000 width=xxx)
4307 -> Seq Scan on t1 r4t1 (cost=xxx rows=1000 width=xxx)
4308 -> Index Scan using t1_i1 on t1 r5t1 (cost=xxx rows=1 width=xxx)
4309 Index Cond: (c1 = r4t1.c1)
4312 \o results/ut-R.tmpout
4313 /*+NestLoop(r4t1 r5t1)Rows(r4t1 r5t1 #1)*/
4314 EXPLAIN SELECT * FROM s1.r4 t1, s1.r5 t2 WHERE t1.c1 = t2.c1;
4324 \! sql/maskout.sh results/ut-R.tmpout
4326 ----------------------------------------------------------------------------
4327 Nested Loop (cost=xxx rows=1 width=xxx)
4328 -> Seq Scan on t1 r4t1 (cost=xxx rows=1000 width=xxx)
4329 -> Index Scan using t1_i1 on t1 r5t1 (cost=xxx rows=1 width=xxx)
4330 Index Cond: (c1 = r4t1.c1)
4334 ---- No. R-2-4 VALUES clause
4337 \o results/ut-R.tmpout
4338 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;
4340 \! sql/maskout.sh results/ut-R.tmpout
4342 --------------------------------------------------------------------------------
4343 Nested Loop (cost=xxx rows=1 width=xxx)
4344 -> Hash Join (cost=xxx rows=2 width=xxx)
4345 Hash Cond: (t2.c1 = "*VALUES*".column1)
4346 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4347 -> Hash (cost=xxx rows=2 width=xxx)
4348 -> Values Scan on "*VALUES*" (cost=xxx rows=2 width=xxx)
4349 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
4350 Index Cond: (c1 = t2.c1)
4353 \o results/ut-R.tmpout
4354 /*+ Leading(t3 t1 t2) Rows(t3 t1 #2)Rows(t3 t1 t2 #2)*/
4355 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;
4366 \! sql/maskout.sh results/ut-R.tmpout
4368 --------------------------------------------------------------------------------
4369 Nested Loop (cost=xxx rows=1 width=xxx)
4370 -> Hash Join (cost=xxx rows=2 width=xxx)
4371 Hash Cond: (t2.c1 = "*VALUES*".column1)
4372 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4373 -> Hash (cost=xxx rows=2 width=xxx)
4374 -> Values Scan on "*VALUES*" (cost=xxx rows=2 width=xxx)
4375 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
4376 Index Cond: (c1 = t2.c1)
4379 \o results/ut-R.tmpout
4380 /*+ Leading(*VALUES* t1 t2) Rows(*VALUES* t1 #2)Rows(*VALUES* t1 t2 #20)*/
4381 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;
4384 Leading(*VALUES* t1 t2)
4385 Rows(*VALUES* t1 #2)
4386 Rows(*VALUES* t1 t2 #20)
4392 \! sql/maskout.sh results/ut-R.tmpout
4394 -----------------------------------------------------------------------------
4395 Nested Loop (cost=xxx rows=20 width=xxx)
4396 -> Nested Loop (cost=xxx rows=2 width=xxx)
4397 -> Values Scan on "*VALUES*" (cost=xxx rows=2 width=xxx)
4398 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
4399 Index Cond: (c1 = "*VALUES*".column1)
4400 -> Index Scan using t2_i1 on t2 (cost=xxx rows=1 width=xxx)
4401 Index Cond: (c1 = t1.c1)
4405 \o results/ut-R.tmpout
4406 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;
4408 \! sql/maskout.sh results/ut-R.tmpout
4410 --------------------------------------------------------------------------------------
4411 Nested Loop (cost=xxx rows=1 width=xxx)
4412 -> Nested Loop (cost=xxx rows=1 width=xxx)
4413 Join Filter: (t2.c1 = "*VALUES*_1".column1)
4414 -> Hash Join (cost=xxx rows=2 width=xxx)
4415 Hash Cond: (t2.c1 = "*VALUES*".column1)
4416 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4417 -> Hash (cost=xxx rows=2 width=xxx)
4418 -> Values Scan on "*VALUES*" (cost=xxx rows=2 width=xxx)
4419 -> Materialize (cost=xxx rows=2 width=xxx)
4420 -> Values Scan on "*VALUES*_1" (cost=xxx rows=2 width=xxx)
4421 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
4422 Index Cond: (c1 = t2.c1)
4425 \o results/ut-R.tmpout
4426 /*+ Leading(t4 t3 t2 t1) Rows(t4 t3 #2) Rows(t4 t3 t2 #2)Rows(t4 t3 t2 t1 #2)*/
4427 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;
4431 Leading(t4 t3 t2 t1)
4434 Rows(t1 t2 t3 t4 #2)
4439 \! sql/maskout.sh results/ut-R.tmpout
4441 --------------------------------------------------------------------------------------
4442 Nested Loop (cost=xxx rows=1 width=xxx)
4443 -> Nested Loop (cost=xxx rows=1 width=xxx)
4444 Join Filter: (t2.c1 = "*VALUES*_1".column1)
4445 -> Hash Join (cost=xxx rows=2 width=xxx)
4446 Hash Cond: (t2.c1 = "*VALUES*".column1)
4447 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4448 -> Hash (cost=xxx rows=2 width=xxx)
4449 -> Values Scan on "*VALUES*" (cost=xxx rows=2 width=xxx)
4450 -> Materialize (cost=xxx rows=2 width=xxx)
4451 -> Values Scan on "*VALUES*_1" (cost=xxx rows=2 width=xxx)
4452 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
4453 Index Cond: (c1 = t2.c1)
4456 \o results/ut-R.tmpout
4457 /*+ Leading(*VALUES* t3 t2 t1) Rows(t4 t3 #2)Rows(*VALUES* t3 t2 #2)Rows(*VALUES* t3 t2 t1 #2)*/
4458 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;
4459 INFO: pg_hint_plan: hint syntax error at or near "Rows(*VALUES* t3 t2 #2)Rows(*VALUES* t3 t2 t1 #2)"
4460 DETAIL: Relation name "*VALUES*" is ambiguous.
4461 INFO: pg_hint_plan: hint syntax error at or near "Rows(*VALUES* t3 t2 t1 #2)"
4462 DETAIL: Relation name "*VALUES*" is ambiguous.
4463 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)"
4464 DETAIL: Relation name "*VALUES*" is ambiguous.
4471 Leading(*VALUES* t3 t2 t1)
4472 Rows(*VALUES* t2 t3 #2)
4473 Rows(*VALUES* t1 t2 t3 #2)
4476 \! sql/maskout.sh results/ut-R.tmpout
4478 --------------------------------------------------------------------------------------
4479 Nested Loop (cost=xxx rows=1 width=xxx)
4480 -> Nested Loop (cost=xxx rows=1 width=xxx)
4481 Join Filter: (t2.c1 = "*VALUES*_1".column1)
4482 -> Hash Join (cost=xxx rows=2 width=xxx)
4483 Hash Cond: (t2.c1 = "*VALUES*".column1)
4484 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4485 -> Hash (cost=xxx rows=2 width=xxx)
4486 -> Values Scan on "*VALUES*" (cost=xxx rows=2 width=xxx)
4487 -> Materialize (cost=xxx rows=2 width=xxx)
4488 -> Values Scan on "*VALUES*_1" (cost=xxx rows=2 width=xxx)
4489 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
4490 Index Cond: (c1 = t2.c1)
4497 \o results/ut-R.tmpout
4498 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;
4500 \! sql/maskout.sh results/ut-R.tmpout
4502 ------------------------------------------------------------------------------------------------------
4503 Aggregate (cost=xxx rows=1 width=xxx)
4504 -> Nested Loop (cost=xxx rows=100 width=xxx)
4505 -> Merge Join (cost=xxx rows=100 width=xxx)
4506 Merge Cond: (bmt1.c1 = bmt2.c1)
4507 -> Merge Join (cost=xxx rows=1000 width=xxx)
4508 Merge Cond: (bmt1.c1 = bmt3.c1)
4509 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
4510 -> Index Only Scan using t3_i1 on t3 bmt3 (cost=xxx rows=1130 width=xxx)
4511 -> Sort (cost=xxx rows=100 width=xxx)
4513 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
4514 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
4515 Index Cond: (c1 = bmt1.c1)
4518 \o results/ut-R.tmpout
4520 Leading(bmt4 bmt3 bmt2 bmt1)
4521 Rows(bmt1 bmt2 bmt3 bmt4 *0.7)
4523 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;
4526 Leading(bmt4 bmt3 bmt2 bmt1)
4527 Rows(bmt1 bmt2 bmt3 bmt4 *0.7)
4533 \! sql/maskout.sh results/ut-R.tmpout
4535 -----------------------------------------------------------------------------------------
4536 Merge Join (cost=xxx rows=70 width=xxx)
4537 Merge Cond: (bmt1.c1 = bmt2.c1)
4538 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
4539 -> Sort (cost=xxx rows=100 width=xxx)
4541 -> Hash Join (cost=xxx rows=100 width=xxx)
4542 Hash Cond: (bmt3.c1 = bmt2.c1)
4543 -> Hash Join (cost=xxx rows=1130 width=xxx)
4544 Hash Cond: (bmt3.c1 = bmt4.c1)
4545 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
4546 -> Hash (cost=xxx rows=1130 width=xxx)
4547 -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
4548 -> Hash (cost=xxx rows=100 width=xxx)
4549 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
4553 \o results/ut-R.tmpout
4554 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;
4556 \! sql/maskout.sh results/ut-R.tmpout
4558 ------------------------------------------------------------------------------------------------
4559 Nested Loop (cost=xxx rows=100 width=xxx)
4560 -> Merge Join (cost=xxx rows=100 width=xxx)
4561 Merge Cond: (bmt1.c1 = bmt2.c1)
4562 -> Merge Join (cost=xxx rows=1000 width=xxx)
4563 Merge Cond: (bmt1.c1 = bmt3.c1)
4564 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
4565 -> Index Only Scan using t3_i1 on t3 bmt3 (cost=xxx rows=1130 width=xxx)
4566 -> Sort (cost=xxx rows=100 width=xxx)
4568 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
4569 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
4570 Index Cond: (c1 = bmt1.c1)
4573 \o results/ut-R.tmpout
4575 Leading(bmt4 bmt3 bmt2 bmt1)
4576 Rows(bmt4 bmt3 *0.6)
4578 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;
4581 Leading(bmt4 bmt3 bmt2 bmt1)
4582 Rows(bmt3 bmt4 *0.6)
4588 \! sql/maskout.sh results/ut-R.tmpout
4590 -----------------------------------------------------------------------------------------
4591 Merge Join (cost=xxx rows=60 width=xxx)
4592 Merge Cond: (bmt1.c1 = bmt2.c1)
4593 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
4594 -> Sort (cost=xxx rows=60 width=xxx)
4596 -> Hash Join (cost=xxx rows=60 width=xxx)
4597 Hash Cond: (bmt3.c1 = bmt2.c1)
4598 -> Hash Join (cost=xxx rows=678 width=xxx)
4599 Hash Cond: (bmt3.c1 = bmt4.c1)
4600 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
4601 -> Hash (cost=xxx rows=1130 width=xxx)
4602 -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
4603 -> Hash (cost=xxx rows=100 width=xxx)
4604 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
4608 \o results/ut-R.tmpout
4609 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;
4611 \! sql/maskout.sh results/ut-R.tmpout
4613 ------------------------------------------------------------------------------------------------
4614 Nested Loop (cost=xxx rows=100 width=xxx)
4615 -> Merge Join (cost=xxx rows=100 width=xxx)
4616 Merge Cond: (bmt1.c1 = bmt2.c1)
4617 -> Merge Join (cost=xxx rows=1000 width=xxx)
4618 Merge Cond: (bmt1.c1 = bmt3.c1)
4619 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
4620 -> Index Only Scan using t3_i1 on t3 bmt3 (cost=xxx rows=1130 width=xxx)
4621 -> Sort (cost=xxx rows=100 width=xxx)
4623 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
4624 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
4625 Index Cond: (c1 = bmt1.c1)
4628 \o results/ut-R.tmpout
4630 Leading(bmt4 bmt3 bmt2 bmt1)
4631 Rows(bmt4 bmt1 *0.5)
4633 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;
4636 Leading(bmt4 bmt3 bmt2 bmt1)
4637 Rows(bmt1 bmt4 *0.5)
4643 \! sql/maskout.sh results/ut-R.tmpout
4645 -----------------------------------------------------------------------------------------
4646 Merge Join (cost=xxx rows=50 width=xxx)
4647 Merge Cond: (bmt1.c1 = bmt2.c1)
4648 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
4649 -> Sort (cost=xxx rows=100 width=xxx)
4651 -> Hash Join (cost=xxx rows=100 width=xxx)
4652 Hash Cond: (bmt3.c1 = bmt2.c1)
4653 -> Hash Join (cost=xxx rows=1130 width=xxx)
4654 Hash Cond: (bmt3.c1 = bmt4.c1)
4655 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
4656 -> Hash (cost=xxx rows=1130 width=xxx)
4657 -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
4658 -> Hash (cost=xxx rows=100 width=xxx)
4659 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
4663 ---- No. R-3-1 abusolute value
4666 \o results/ut-R.tmpout
4668 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4669 WARNING: Force estimate to be at least one row, to avoid possible divide-by-zero when interpolating costs : Rows(t1 t2 #0)
4678 \! sql/maskout.sh results/ut-R.tmpout
4680 ---------------------------------------------------------------------------
4681 Merge Join (cost=xxx rows=1 width=xxx)
4682 Merge Cond: (t1.c1 = t2.c1)
4683 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
4684 -> Sort (cost=xxx rows=100 width=xxx)
4686 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4690 \o results/ut-R.tmpout
4692 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4701 \! sql/maskout.sh results/ut-R.tmpout
4703 ---------------------------------------------------------------------------
4704 Merge Join (cost=xxx rows=5 width=xxx)
4705 Merge Cond: (t1.c1 = t2.c1)
4706 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
4707 -> Sort (cost=xxx rows=100 width=xxx)
4709 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4713 ---- No. R-3-2 increase or decrease value
4716 \o results/ut-R.tmpout
4718 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4727 \! sql/maskout.sh results/ut-R.tmpout
4729 ---------------------------------------------------------------------------
4730 Merge Join (cost=xxx rows=101 width=xxx)
4731 Merge Cond: (t1.c1 = t2.c1)
4732 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
4733 -> Sort (cost=xxx rows=100 width=xxx)
4735 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4739 \o results/ut-R.tmpout
4741 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4750 \! sql/maskout.sh results/ut-R.tmpout
4752 ---------------------------------------------------------------------------
4753 Merge Join (cost=xxx rows=99 width=xxx)
4754 Merge Cond: (t1.c1 = t2.c1)
4755 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
4756 -> Sort (cost=xxx rows=100 width=xxx)
4758 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4762 \o results/ut-R.tmpout
4763 /*+Rows(t1 t2 -1000)*/
4764 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4765 WARNING: Force estimate to be at least one row, to avoid possible divide-by-zero when interpolating costs : Rows(t1 t2 -1000)
4774 \! sql/maskout.sh results/ut-R.tmpout
4776 ---------------------------------------------------------------------------
4777 Merge Join (cost=xxx rows=1 width=xxx)
4778 Merge Cond: (t1.c1 = t2.c1)
4779 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
4780 -> Sort (cost=xxx rows=100 width=xxx)
4782 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4786 ---- No. R-3-3 multiple
4789 \o results/ut-R.tmpout
4791 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4792 WARNING: Force estimate to be at least one row, to avoid possible divide-by-zero when interpolating costs : Rows(t1 t2 *0)
4801 \! sql/maskout.sh results/ut-R.tmpout
4803 ---------------------------------------------------------------------------
4804 Merge Join (cost=xxx rows=1 width=xxx)
4805 Merge Cond: (t1.c1 = t2.c1)
4806 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
4807 -> Sort (cost=xxx rows=100 width=xxx)
4809 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4813 \o results/ut-R.tmpout
4815 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4824 \! sql/maskout.sh results/ut-R.tmpout
4826 ---------------------------------------------------------------------------
4827 Merge Join (cost=xxx rows=200 width=xxx)
4828 Merge Cond: (t1.c1 = t2.c1)
4829 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
4830 -> Sort (cost=xxx rows=100 width=xxx)
4832 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4836 \o results/ut-R.tmpout
4837 /*+Rows(t1 t2 *0.1)*/
4838 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4847 \! sql/maskout.sh results/ut-R.tmpout
4849 ---------------------------------------------------------------------------
4850 Merge Join (cost=xxx rows=10 width=xxx)
4851 Merge Cond: (t1.c1 = t2.c1)
4852 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
4853 -> Sort (cost=xxx rows=100 width=xxx)
4855 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4859 ---- No. R-3-4 join inherit tables
4862 \o results/ut-R.tmpout
4863 EXPLAIN SELECT * FROM s1.p1, s1.p2 WHERE p1.c1 = p2.c1;
4865 \! sql/maskout.sh results/ut-R.tmpout
4867 -------------------------------------------------------------------------
4868 Hash Join (cost=xxx rows=301 width=xxx)
4869 Hash Cond: (p2.c1 = p1.c1)
4870 -> Append (cost=xxx rows=304 width=xxx)
4871 -> Seq Scan on p2 (cost=xxx rows=1 width=xxx)
4872 -> Seq Scan on p2c1 (cost=xxx rows=1 width=xxx)
4873 -> Seq Scan on p2c2 (cost=xxx rows=1 width=xxx)
4874 -> Seq Scan on p2c3 (cost=xxx rows=1 width=xxx)
4875 -> Seq Scan on p2c1c1 (cost=xxx rows=50 width=xxx)
4876 -> Seq Scan on p2c1c2 (cost=xxx rows=50 width=xxx)
4877 -> Seq Scan on p2c2c1 (cost=xxx rows=50 width=xxx)
4878 -> Seq Scan on p2c2c2 (cost=xxx rows=50 width=xxx)
4879 -> Seq Scan on p2c3c1 (cost=xxx rows=50 width=xxx)
4880 -> Seq Scan on p2c3c2 (cost=xxx rows=50 width=xxx)
4881 -> Hash (cost=xxx rows=301 width=xxx)
4882 -> Append (cost=xxx rows=301 width=xxx)
4883 -> Seq Scan on p1 (cost=xxx rows=1 width=xxx)
4884 -> Seq Scan on p1c1 (cost=xxx rows=100 width=xxx)
4885 -> Seq Scan on p1c2 (cost=xxx rows=100 width=xxx)
4886 -> Seq Scan on p1c3 (cost=xxx rows=100 width=xxx)
4889 \o results/ut-R.tmpout
4891 EXPLAIN SELECT * FROM s1.p1, s1.p2 WHERE p1.c1 = p2.c1;
4900 \! sql/maskout.sh results/ut-R.tmpout
4902 -------------------------------------------------------------------------
4903 Hash Join (cost=xxx rows=1 width=xxx)
4904 Hash Cond: (p2.c1 = p1.c1)
4905 -> Append (cost=xxx rows=304 width=xxx)
4906 -> Seq Scan on p2 (cost=xxx rows=1 width=xxx)
4907 -> Seq Scan on p2c1 (cost=xxx rows=1 width=xxx)
4908 -> Seq Scan on p2c2 (cost=xxx rows=1 width=xxx)
4909 -> Seq Scan on p2c3 (cost=xxx rows=1 width=xxx)
4910 -> Seq Scan on p2c1c1 (cost=xxx rows=50 width=xxx)
4911 -> Seq Scan on p2c1c2 (cost=xxx rows=50 width=xxx)
4912 -> Seq Scan on p2c2c1 (cost=xxx rows=50 width=xxx)
4913 -> Seq Scan on p2c2c2 (cost=xxx rows=50 width=xxx)
4914 -> Seq Scan on p2c3c1 (cost=xxx rows=50 width=xxx)
4915 -> Seq Scan on p2c3c2 (cost=xxx rows=50 width=xxx)
4916 -> Hash (cost=xxx rows=301 width=xxx)
4917 -> Append (cost=xxx rows=301 width=xxx)
4918 -> Seq Scan on p1 (cost=xxx rows=1 width=xxx)
4919 -> Seq Scan on p1c1 (cost=xxx rows=100 width=xxx)
4920 -> Seq Scan on p1c2 (cost=xxx rows=100 width=xxx)
4921 -> Seq Scan on p1c3 (cost=xxx rows=100 width=xxx)
4925 \o results/ut-R.tmpout
4926 EXPLAIN SELECT * FROM s1.p1, s1.p2 WHERE p1.c1 = p2.c1;
4928 \! sql/maskout.sh results/ut-R.tmpout
4930 -------------------------------------------------------------------------
4931 Hash Join (cost=xxx rows=301 width=xxx)
4932 Hash Cond: (p2.c1 = p1.c1)
4933 -> Append (cost=xxx rows=304 width=xxx)
4934 -> Seq Scan on p2 (cost=xxx rows=1 width=xxx)
4935 -> Seq Scan on p2c1 (cost=xxx rows=1 width=xxx)
4936 -> Seq Scan on p2c2 (cost=xxx rows=1 width=xxx)
4937 -> Seq Scan on p2c3 (cost=xxx rows=1 width=xxx)
4938 -> Seq Scan on p2c1c1 (cost=xxx rows=50 width=xxx)
4939 -> Seq Scan on p2c1c2 (cost=xxx rows=50 width=xxx)
4940 -> Seq Scan on p2c2c1 (cost=xxx rows=50 width=xxx)
4941 -> Seq Scan on p2c2c2 (cost=xxx rows=50 width=xxx)
4942 -> Seq Scan on p2c3c1 (cost=xxx rows=50 width=xxx)
4943 -> Seq Scan on p2c3c2 (cost=xxx rows=50 width=xxx)
4944 -> Hash (cost=xxx rows=301 width=xxx)
4945 -> Append (cost=xxx rows=301 width=xxx)
4946 -> Seq Scan on p1 (cost=xxx rows=1 width=xxx)
4947 -> Seq Scan on p1c1 (cost=xxx rows=100 width=xxx)
4948 -> Seq Scan on p1c2 (cost=xxx rows=100 width=xxx)
4949 -> Seq Scan on p1c3 (cost=xxx rows=100 width=xxx)
4952 \o results/ut-R.tmpout
4953 /*+Rows(p1c1 p2c1 #1)*/
4954 EXPLAIN SELECT * FROM s1.p1, s1.p2 WHERE p1.c1 = p2.c1;
4963 \! sql/maskout.sh results/ut-R.tmpout
4965 -------------------------------------------------------------------------
4966 Hash Join (cost=xxx rows=301 width=xxx)
4967 Hash Cond: (p2.c1 = p1.c1)
4968 -> Append (cost=xxx rows=304 width=xxx)
4969 -> Seq Scan on p2 (cost=xxx rows=1 width=xxx)
4970 -> Seq Scan on p2c1 (cost=xxx rows=1 width=xxx)
4971 -> Seq Scan on p2c2 (cost=xxx rows=1 width=xxx)
4972 -> Seq Scan on p2c3 (cost=xxx rows=1 width=xxx)
4973 -> Seq Scan on p2c1c1 (cost=xxx rows=50 width=xxx)
4974 -> Seq Scan on p2c1c2 (cost=xxx rows=50 width=xxx)
4975 -> Seq Scan on p2c2c1 (cost=xxx rows=50 width=xxx)
4976 -> Seq Scan on p2c2c2 (cost=xxx rows=50 width=xxx)
4977 -> Seq Scan on p2c3c1 (cost=xxx rows=50 width=xxx)
4978 -> Seq Scan on p2c3c2 (cost=xxx rows=50 width=xxx)
4979 -> Hash (cost=xxx rows=301 width=xxx)
4980 -> Append (cost=xxx rows=301 width=xxx)
4981 -> Seq Scan on p1 (cost=xxx rows=1 width=xxx)
4982 -> Seq Scan on p1c1 (cost=xxx rows=100 width=xxx)
4983 -> Seq Scan on p1c2 (cost=xxx rows=100 width=xxx)
4984 -> Seq Scan on p1c3 (cost=xxx rows=100 width=xxx)
4988 ---- No. R-3-5 conflict join method hint
4991 \o results/ut-R.tmpout
4992 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4994 \! sql/maskout.sh results/ut-R.tmpout
4996 ---------------------------------------------------------------------------
4997 Merge Join (cost=xxx rows=100 width=xxx)
4998 Merge Cond: (t1.c1 = t2.c1)
4999 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5000 -> Sort (cost=xxx rows=100 width=xxx)
5002 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5005 \o results/ut-R.tmpout
5006 /*+Rows(t1 t2 #1)Rows(t1 t2 #1)*/
5007 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5008 INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t1 t2 #1)"
5009 DETAIL: Conflict rows hint.
5019 \! sql/maskout.sh results/ut-R.tmpout
5021 ---------------------------------------------------------------------------
5022 Merge Join (cost=xxx rows=1 width=xxx)
5023 Merge Cond: (t1.c1 = t2.c1)
5024 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5025 -> Sort (cost=xxx rows=100 width=xxx)
5027 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5031 \o results/ut-R.tmpout
5032 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5034 \! sql/maskout.sh results/ut-R.tmpout
5036 ---------------------------------------------------------------------------
5037 Merge Join (cost=xxx rows=100 width=xxx)
5038 Merge Cond: (t1.c1 = t2.c1)
5039 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5040 -> Sort (cost=xxx rows=100 width=xxx)
5042 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5045 \o results/ut-R.tmpout
5046 /*+Rows(t1 t2 #1)Rows(t1 t2 #1)Rows(t1 t2 #1)*/
5047 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5048 INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t1 t2 #1)Rows(t1 t2 #1)"
5049 DETAIL: Conflict rows hint.
5050 INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t1 t2 #1)"
5051 DETAIL: Conflict rows hint.
5062 \! sql/maskout.sh results/ut-R.tmpout
5064 ---------------------------------------------------------------------------
5065 Merge Join (cost=xxx rows=1 width=xxx)
5066 Merge Cond: (t1.c1 = t2.c1)
5067 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5068 -> Sort (cost=xxx rows=100 width=xxx)
5070 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5074 \o results/ut-R.tmpout
5075 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5077 \! sql/maskout.sh results/ut-R.tmpout
5079 ---------------------------------------------------------------------------
5080 Merge Join (cost=xxx rows=100 width=xxx)
5081 Merge Cond: (t1.c1 = t2.c1)
5082 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5083 -> Sort (cost=xxx rows=100 width=xxx)
5085 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5088 \o results/ut-R.tmpout
5089 /*+Rows(t1 t2 #1)Rows(t2 t1 #1)*/
5090 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5091 INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t2 t1 #1)"
5092 DETAIL: Conflict rows hint.
5102 \! sql/maskout.sh results/ut-R.tmpout
5104 ---------------------------------------------------------------------------
5105 Merge Join (cost=xxx rows=1 width=xxx)
5106 Merge Cond: (t1.c1 = t2.c1)
5107 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5108 -> Sort (cost=xxx rows=100 width=xxx)
5110 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5114 \o results/ut-R.tmpout
5115 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5117 \! sql/maskout.sh results/ut-R.tmpout
5119 ---------------------------------------------------------------------------
5120 Merge Join (cost=xxx rows=100 width=xxx)
5121 Merge Cond: (t1.c1 = t2.c1)
5122 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5123 -> Sort (cost=xxx rows=100 width=xxx)
5125 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5128 \o results/ut-R.tmpout
5129 /*+Rows(t2 t1 #1)Rows(t1 t2 #1)Rows(t2 t1 #1)*/
5130 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5131 INFO: pg_hint_plan: hint syntax error at or near "Rows(t2 t1 #1)Rows(t1 t2 #1)Rows(t2 t1 #1)"
5132 DETAIL: Conflict rows hint.
5133 INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t2 t1 #1)"
5134 DETAIL: Conflict rows hint.
5145 \! sql/maskout.sh results/ut-R.tmpout
5147 ---------------------------------------------------------------------------
5148 Merge Join (cost=xxx rows=1 width=xxx)
5149 Merge Cond: (t1.c1 = t2.c1)
5150 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5151 -> Sort (cost=xxx rows=100 width=xxx)
5153 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5157 ---- No. R-3-6 hint state output
5160 SET client_min_messages TO DEBUG1;
5161 \o results/ut-R.tmpout
5162 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5164 \! sql/maskout.sh results/ut-R.tmpout
5166 ---------------------------------------------------------------------------
5167 Merge Join (cost=xxx rows=100 width=xxx)
5168 Merge Cond: (t1.c1 = t2.c1)
5169 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5170 -> Sort (cost=xxx rows=100 width=xxx)
5172 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5175 \o results/ut-R.tmpout
5177 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5178 DEBUG: adjusted rows 100 to 101
5187 \! sql/maskout.sh results/ut-R.tmpout
5189 ---------------------------------------------------------------------------
5190 Merge Join (cost=xxx rows=101 width=xxx)
5191 Merge Cond: (t1.c1 = t2.c1)
5192 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5193 -> Sort (cost=xxx rows=100 width=xxx)
5195 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5198 \! rm results/ut-R.tmpout