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 Join Filter: (t1.c1 = t4.c1)
494 -> Merge Join (cost=xxx rows=100 width=xxx)
495 Merge Cond: (t1.c1 = t2.c1)
496 -> Merge Join (cost=xxx rows=1000 width=xxx)
497 Merge Cond: (t1.c1 = t3.c1)
498 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
499 -> Index Scan using t3_i1 on t3 (cost=xxx rows=1130 width=xxx)
500 -> Sort (cost=xxx rows=100 width=xxx)
502 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
503 -> Index Scan using t4_i1 on t4 (cost=xxx rows=1 width=xxx)
504 Index Cond: (c1 = t3.c1)
508 ---- No. R-1-6 object type for the hint
511 \o results/ut-R.tmpout
513 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
522 \! sql/maskout.sh results/ut-R.tmpout
524 ---------------------------------------------------------------------------
525 Merge Join (cost=xxx rows=1 width=xxx)
526 Merge Cond: (t1.c1 = t2.c1)
527 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
528 -> Sort (cost=xxx rows=100 width=xxx)
530 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
534 \o results/ut-R.tmpout
535 EXPLAIN SELECT * FROM s1.p1 t1, s1.p1 t2 WHERE t1.c1 = t2.c1;
537 \! sql/maskout.sh results/ut-R.tmpout
539 ------------------------------------------------------------------------------
540 Hash Join (cost=xxx rows=301 width=xxx)
541 Hash Cond: (t1.c1 = t2.c1)
542 -> Append (cost=xxx rows=301 width=xxx)
543 -> Seq Scan on p1 t1 (cost=xxx rows=1 width=xxx)
544 -> Seq Scan on p1c1 t1_1 (cost=xxx rows=100 width=xxx)
545 -> Seq Scan on p1c2 t1_2 (cost=xxx rows=100 width=xxx)
546 -> Seq Scan on p1c3 t1_3 (cost=xxx rows=100 width=xxx)
547 -> Hash (cost=xxx rows=301 width=xxx)
548 -> Append (cost=xxx rows=301 width=xxx)
549 -> Seq Scan on p1 t2 (cost=xxx rows=1 width=xxx)
550 -> Seq Scan on p1c1 t2_1 (cost=xxx rows=100 width=xxx)
551 -> Seq Scan on p1c2 t2_2 (cost=xxx rows=100 width=xxx)
552 -> Seq Scan on p1c3 t2_3 (cost=xxx rows=100 width=xxx)
555 \o results/ut-R.tmpout
557 EXPLAIN SELECT * FROM s1.p1 t1, s1.p1 t2 WHERE t1.c1 = t2.c1;
566 \! sql/maskout.sh results/ut-R.tmpout
568 ------------------------------------------------------------------------------
569 Hash Join (cost=xxx rows=1 width=xxx)
570 Hash Cond: (t1.c1 = t2.c1)
571 -> Append (cost=xxx rows=301 width=xxx)
572 -> Seq Scan on p1 t1 (cost=xxx rows=1 width=xxx)
573 -> Seq Scan on p1c1 t1_1 (cost=xxx rows=100 width=xxx)
574 -> Seq Scan on p1c2 t1_2 (cost=xxx rows=100 width=xxx)
575 -> Seq Scan on p1c3 t1_3 (cost=xxx rows=100 width=xxx)
576 -> Hash (cost=xxx rows=301 width=xxx)
577 -> Append (cost=xxx rows=301 width=xxx)
578 -> Seq Scan on p1 t2 (cost=xxx rows=1 width=xxx)
579 -> Seq Scan on p1c1 t2_1 (cost=xxx rows=100 width=xxx)
580 -> Seq Scan on p1c2 t2_2 (cost=xxx rows=100 width=xxx)
581 -> Seq Scan on p1c3 t2_3 (cost=xxx rows=100 width=xxx)
585 \o results/ut-R.tmpout
586 EXPLAIN SELECT * FROM s1.ul1 t1, s1.ul1 t2 WHERE t1.c1 = t2.c1;
588 \! sql/maskout.sh results/ut-R.tmpout
590 -----------------------------------------------------------------------
591 Hash Join (cost=xxx rows=1130 width=xxx)
592 Hash Cond: (t1.c1 = t2.c1)
593 -> Seq Scan on ul1 t1 (cost=xxx rows=1130 width=xxx)
594 -> Hash (cost=xxx rows=1130 width=xxx)
595 -> Seq Scan on ul1 t2 (cost=xxx rows=1130 width=xxx)
598 \o results/ut-R.tmpout
600 EXPLAIN SELECT * FROM s1.ul1 t1, s1.ul1 t2 WHERE t1.c1 = t2.c1;
609 \! sql/maskout.sh results/ut-R.tmpout
611 -----------------------------------------------------------------------
612 Hash Join (cost=xxx rows=1 width=xxx)
613 Hash Cond: (t1.c1 = t2.c1)
614 -> Seq Scan on ul1 t1 (cost=xxx rows=1130 width=xxx)
615 -> Hash (cost=xxx rows=1130 width=xxx)
616 -> Seq Scan on ul1 t2 (cost=xxx rows=1130 width=xxx)
620 CREATE TEMP TABLE tm1 (LIKE s1.t1 INCLUDING ALL);
621 \o results/ut-R.tmpout
622 EXPLAIN SELECT * FROM tm1 t1, tm1 t2 WHERE t1.c1 = t2.c1;
624 \! sql/maskout.sh results/ut-R.tmpout
626 -----------------------------------------------------------------------
627 Hash Join (cost=xxx rows=1130 width=xxx)
628 Hash Cond: (t1.c1 = t2.c1)
629 -> Seq Scan on tm1 t1 (cost=xxx rows=1130 width=xxx)
630 -> Hash (cost=xxx rows=1130 width=xxx)
631 -> Seq Scan on tm1 t2 (cost=xxx rows=1130 width=xxx)
634 \o results/ut-R.tmpout
636 EXPLAIN SELECT * FROM tm1 t1, tm1 t2 WHERE t1.c1 = t2.c1;
645 \! sql/maskout.sh results/ut-R.tmpout
647 -----------------------------------------------------------------------
648 Hash Join (cost=xxx rows=1 width=xxx)
649 Hash Cond: (t1.c1 = t2.c1)
650 -> Seq Scan on tm1 t1 (cost=xxx rows=1130 width=xxx)
651 -> Hash (cost=xxx rows=1130 width=xxx)
652 -> Seq Scan on tm1 t2 (cost=xxx rows=1130 width=xxx)
656 CREATE TEMP TABLE t_pg_class WITH OIDS AS SELECT * from pg_class LIMIT 100;
657 \o results/ut-R.tmpout
658 EXPLAIN SELECT * FROM t_pg_class t1, t_pg_class t2 WHERE t1.oid = t2.oid;
660 \! sql/maskout.sh results/ut-R.tmpout
662 ------------------------------------------------------------------------------
663 Hash Join (cost=xxx rows=360 width=xxx)
664 Hash Cond: (t1.oid = t2.oid)
665 -> Seq Scan on t_pg_class t1 (cost=xxx rows=360 width=xxx)
666 -> Hash (cost=xxx rows=360 width=xxx)
667 -> Seq Scan on t_pg_class t2 (cost=xxx rows=360 width=xxx)
670 \o results/ut-R.tmpout
672 EXPLAIN SELECT * FROM t_pg_class t1, t_pg_class t2 WHERE t1.oid = t2.oid;
681 \! sql/maskout.sh results/ut-R.tmpout
683 ------------------------------------------------------------------------------
684 Hash Join (cost=xxx rows=1 width=xxx)
685 Hash Cond: (t1.oid = t2.oid)
686 -> Seq Scan on t_pg_class t1 (cost=xxx rows=360 width=xxx)
687 -> Hash (cost=xxx rows=360 width=xxx)
688 -> Seq Scan on t_pg_class t2 (cost=xxx rows=360 width=xxx)
694 \o results/ut-R.tmpout
695 EXPLAIN SELECT * FROM s1.f1() t1, s1.f1() t2 WHERE t1.c1 = t2.c1;
697 \! sql/maskout.sh results/ut-R.tmpout
699 -----------------------------------------------------------------
700 Nested Loop (cost=xxx rows=1 width=xxx)
701 Join Filter: (t1.c1 = t2.c1)
702 -> Function Scan on f1 t1 (cost=xxx rows=1 width=xxx)
703 -> Function Scan on f1 t2 (cost=xxx rows=1 width=xxx)
706 \o results/ut-R.tmpout
708 EXPLAIN SELECT * FROM s1.f1() t1, s1.f1() t2 WHERE t1.c1 = t2.c1;
717 \! sql/maskout.sh results/ut-R.tmpout
719 -----------------------------------------------------------------
720 Nested Loop (cost=xxx rows=1 width=xxx)
721 Join Filter: (t1.c1 = t2.c1)
722 -> Function Scan on f1 t1 (cost=xxx rows=1 width=xxx)
723 -> Function Scan on f1 t2 (cost=xxx rows=1 width=xxx)
727 \o results/ut-R.tmpout
728 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;
730 \! sql/maskout.sh results/ut-R.tmpout
732 --------------------------------------------------------------------------
733 Hash Join (cost=xxx rows=3 width=xxx)
734 Hash Cond: (t2.c1 = "*VALUES*".column1)
735 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
736 -> Hash (cost=xxx rows=3 width=xxx)
737 -> Values Scan on "*VALUES*" (cost=xxx rows=3 width=xxx)
740 \o results/ut-R.tmpout
742 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;
751 \! sql/maskout.sh results/ut-R.tmpout
753 --------------------------------------------------------------------------
754 Hash Join (cost=xxx rows=3 width=xxx)
755 Hash Cond: (t2.c1 = "*VALUES*".column1)
756 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
757 -> Hash (cost=xxx rows=3 width=xxx)
758 -> Values Scan on "*VALUES*" (cost=xxx rows=3 width=xxx)
761 \o results/ut-R.tmpout
762 /*+Rows(*VALUES* t2 #1)*/
763 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;
772 \! sql/maskout.sh results/ut-R.tmpout
774 --------------------------------------------------------------------------
775 Hash Join (cost=xxx rows=1 width=xxx)
776 Hash Cond: (t2.c1 = "*VALUES*".column1)
777 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
778 -> Hash (cost=xxx rows=3 width=xxx)
779 -> Values Scan on "*VALUES*" (cost=xxx rows=3 width=xxx)
783 \o results/ut-R.tmpout
784 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;
786 \! sql/maskout.sh results/ut-R.tmpout
788 --------------------------------------------------------------------------------------------------
789 Nested Loop (cost=xxx rows=1 width=xxx)
791 -> Aggregate (cost=xxx rows=1 width=xxx)
792 -> Merge Join (cost=xxx rows=100 width=xxx)
793 Merge Cond: (t1_1.c1 = t2.c1)
794 -> Index Only Scan using t1_i1 on t1 t1_1 (cost=xxx rows=1000 width=xxx)
795 -> Sort (cost=xxx rows=100 width=xxx)
797 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
798 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
799 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
800 Index Cond: (c1 = c1.c1)
803 \o results/ut-R.tmpout
804 /*+Rows(t1 t2 #1)Rows(t1 c1 +1)*/
805 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;
815 \! sql/maskout.sh results/ut-R.tmpout
817 --------------------------------------------------------------------------------------------------
818 Nested Loop (cost=xxx rows=2 width=xxx)
820 -> Aggregate (cost=xxx rows=1 width=xxx)
821 -> Merge Join (cost=xxx rows=1 width=xxx)
822 Merge Cond: (t1_1.c1 = t2.c1)
823 -> Index Only Scan using t1_i1 on t1 t1_1 (cost=xxx rows=1000 width=xxx)
824 -> Sort (cost=xxx rows=100 width=xxx)
826 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
827 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
828 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
829 Index Cond: (c1 = c1.c1)
833 \o results/ut-R.tmpout
834 EXPLAIN SELECT * FROM s1.v1 t1, s1.v1 t2 WHERE t1.c1 = t2.c1;
836 \! sql/maskout.sh results/ut-R.tmpout
838 --------------------------------------------------------------------------
839 Hash Join (cost=xxx rows=1000 width=xxx)
840 Hash Cond: (v1t1.c1 = v1t1_1.c1)
841 -> Seq Scan on t1 v1t1 (cost=xxx rows=1000 width=xxx)
842 -> Hash (cost=xxx rows=1000 width=xxx)
843 -> Seq Scan on t1 v1t1_1 (cost=xxx rows=1000 width=xxx)
846 \o results/ut-R.tmpout
848 EXPLAIN SELECT * FROM s1.v1 t1, s1.v1 t2 WHERE t1.c1 = t2.c1;
857 \! sql/maskout.sh results/ut-R.tmpout
859 --------------------------------------------------------------------------
860 Hash Join (cost=xxx rows=1000 width=xxx)
861 Hash Cond: (v1t1.c1 = v1t1_1.c1)
862 -> Seq Scan on t1 v1t1 (cost=xxx rows=1000 width=xxx)
863 -> Hash (cost=xxx rows=1000 width=xxx)
864 -> Seq Scan on t1 v1t1_1 (cost=xxx rows=1000 width=xxx)
867 \o results/ut-R.tmpout
868 /*+Rows(v1t1 v1t1_ #1)*/
869 EXPLAIN SELECT * FROM s1.v1 t1, s1.v1_ t2 WHERE t1.c1 = t2.c1;
878 \! sql/maskout.sh results/ut-R.tmpout
880 -------------------------------------------------------------------------
881 Hash Join (cost=xxx rows=1 width=xxx)
882 Hash Cond: (v1t1.c1 = v1t1_.c1)
883 -> Seq Scan on t1 v1t1 (cost=xxx rows=1000 width=xxx)
884 -> Hash (cost=xxx rows=1000 width=xxx)
885 -> Seq Scan on t1 v1t1_ (cost=xxx rows=1000 width=xxx)
889 \o results/ut-R.tmpout
890 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);
892 \! sql/maskout.sh results/ut-R.tmpout
894 -------------------------------------------------------------------------------------------------
895 Nested Loop (cost=xxx rows=1 width=xxx)
896 InitPlan 1 (returns $0)
897 -> Aggregate (cost=xxx rows=1 width=xxx)
898 -> Merge Join (cost=xxx rows=100 width=xxx)
899 Merge Cond: (st1.c1 = st2.c1)
900 -> Index Only Scan using t1_i1 on t1 st1 (cost=xxx rows=1000 width=xxx)
901 -> Sort (cost=xxx rows=100 width=xxx)
903 -> Seq Scan on t2 st2 (cost=xxx rows=100 width=xxx)
904 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
905 Index Cond: (c1 = $0)
906 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
910 \o results/ut-R.tmpout
911 /*+Rows(t1 t2 #1)Rows(st1 st2 #1)*/
912 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);
922 \! sql/maskout.sh results/ut-R.tmpout
924 -------------------------------------------------------------------------------------------------
925 Nested Loop (cost=xxx rows=1 width=xxx)
926 InitPlan 1 (returns $0)
927 -> Aggregate (cost=xxx rows=1 width=xxx)
928 -> Merge Join (cost=xxx rows=1 width=xxx)
929 Merge Cond: (st1.c1 = st2.c1)
930 -> Index Only Scan using t1_i1 on t1 st1 (cost=xxx rows=1000 width=xxx)
931 -> Sort (cost=xxx rows=100 width=xxx)
933 -> Seq Scan on t2 st2 (cost=xxx rows=100 width=xxx)
934 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
935 Index Cond: (c1 = $0)
936 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
941 -- There are cases where difference in the measured value and predicted value
942 -- depending upon the version of PostgreSQL
944 \o results/ut-R.tmpout
945 EXPLAIN SELECT * FROM s1.t1, (SELECT t2.c1 FROM s1.t2) st2 WHERE t1.c1 = st2.c1;
947 \! sql/maskout.sh results/ut-R.tmpout
949 ---------------------------------------------------------------------------
950 Merge Join (cost=xxx rows=100 width=xxx)
951 Merge Cond: (t1.c1 = t2.c1)
952 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
953 -> Sort (cost=xxx rows=100 width=xxx)
955 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
958 \o results/ut-R.tmpout
960 EXPLAIN SELECT * FROM s1.t1, (SELECT t2.c1 FROM s1.t2) st2 WHERE t1.c1 = st2.c1;
969 \! sql/maskout.sh results/ut-R.tmpout
971 ---------------------------------------------------------------------------
972 Merge Join (cost=xxx rows=100 width=xxx)
973 Merge Cond: (t1.c1 = t2.c1)
974 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
975 -> Sort (cost=xxx rows=100 width=xxx)
977 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
980 \o results/ut-R.tmpout
982 EXPLAIN SELECT * FROM s1.t1, (SELECT t2.c1 FROM s1.t2) st2 WHERE t1.c1 = st2.c1;
991 \! sql/maskout.sh results/ut-R.tmpout
993 ---------------------------------------------------------------------------
994 Merge Join (cost=xxx rows=1 width=xxx)
995 Merge Cond: (t1.c1 = t2.c1)
996 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
997 -> Sort (cost=xxx rows=100 width=xxx)
999 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
1003 ---- No. R-1-7 specified number of conditions
1006 \o results/ut-R.tmpout
1008 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
1009 INFO: pg_hint_plan: hint syntax error at or near ""
1010 DETAIL: Rows hint requires at least two relations.
1019 \! sql/maskout.sh results/ut-R.tmpout
1021 ---------------------------------------------------------------------------
1022 Merge Join (cost=xxx rows=100 width=xxx)
1023 Merge Cond: (t1.c1 = t2.c1)
1024 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
1025 -> Sort (cost=xxx rows=100 width=xxx)
1027 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
1031 \o results/ut-R.tmpout
1033 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
1034 INFO: pg_hint_plan: hint syntax error at or near "1"
1035 DETAIL: Unrecognized rows value type notation.
1044 \! sql/maskout.sh results/ut-R.tmpout
1046 ---------------------------------------------------------------------------
1047 Merge Join (cost=xxx rows=100 width=xxx)
1048 Merge Cond: (t1.c1 = t2.c1)
1049 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
1050 -> Sort (cost=xxx rows=100 width=xxx)
1052 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
1056 \o results/ut-R.tmpout
1057 /*+Rows(t1 t2 #notrows)*/
1058 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
1059 INFO: pg_hint_plan: hint syntax error at or near "notrows"
1060 DETAIL: Rows hint requires valid number as rows estimation.
1066 Rows(t1 t2 #notrows)
1069 \! sql/maskout.sh results/ut-R.tmpout
1071 ---------------------------------------------------------------------------
1072 Merge Join (cost=xxx rows=100 width=xxx)
1073 Merge Cond: (t1.c1 = t2.c1)
1074 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
1075 -> Sort (cost=xxx rows=100 width=xxx)
1077 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
1081 ---- No. R-2-1 some complexity query blocks
1084 \o results/ut-R.tmpout
1086 Leading(bmt1 bmt2 bmt3 bmt4)
1087 Leading(b1t2 b1t3 b1t4 b1t1)
1088 Leading(b2t3 b2t4 b2t1 b2t2)
1089 MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4)
1090 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
1091 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
1094 SELECT max(bmt1.c1), (
1095 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
1097 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
1099 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
1103 MergeJoin(b1t2 b1t3)
1104 MergeJoin(b2t3 b2t4)
1105 MergeJoin(bmt1 bmt2)
1106 HashJoin(b1t2 b1t3 b1t4)
1107 HashJoin(b2t1 b2t3 b2t4)
1108 HashJoin(bmt1 bmt2 bmt3)
1109 NestLoop(b1t1 b1t2 b1t3 b1t4)
1110 NestLoop(b2t1 b2t2 b2t3 b2t4)
1111 NestLoop(bmt1 bmt2 bmt3 bmt4)
1112 Leading(bmt1 bmt2 bmt3 bmt4)
1113 Leading(b1t2 b1t3 b1t4 b1t1)
1114 Leading(b2t3 b2t4 b2t1 b2t2)
1120 \! sql/maskout.sh results/ut-R.tmpout
1122 --------------------------------------------------------------------------------------------------------------------
1123 Aggregate (cost=xxx rows=1 width=xxx)
1124 InitPlan 1 (returns $1)
1125 -> Aggregate (cost=xxx rows=1 width=xxx)
1126 -> Nested Loop (cost=xxx rows=100 width=xxx)
1127 Join Filter: (b1t2.c1 = b1t1.c1)
1128 -> Hash Join (cost=xxx rows=100 width=xxx)
1129 Hash Cond: (b1t4.c1 = b1t2.c1)
1130 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
1131 -> Hash (cost=xxx rows=100 width=xxx)
1132 -> Merge Join (cost=xxx rows=100 width=xxx)
1133 Merge Cond: (b1t3.c1 = b1t2.c1)
1134 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
1135 -> Sort (cost=xxx rows=100 width=xxx)
1137 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
1138 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
1139 Index Cond: (c1 = b1t3.c1)
1140 InitPlan 2 (returns $3)
1141 -> Aggregate (cost=xxx rows=1 width=xxx)
1142 -> Nested Loop (cost=xxx rows=100 width=xxx)
1143 -> Hash Join (cost=xxx rows=1000 width=xxx)
1144 Hash Cond: (b2t3.c1 = b2t1.c1)
1145 -> Merge Join (cost=xxx rows=1130 width=xxx)
1146 Merge Cond: (b2t3.c1 = b2t4.c1)
1147 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
1148 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
1149 -> Hash (cost=xxx rows=1000 width=xxx)
1150 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
1151 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
1152 Index Cond: (c1 = b2t1.c1)
1153 -> Nested Loop (cost=xxx rows=100 width=xxx)
1154 Join Filter: (bmt1.c1 = bmt4.c1)
1155 -> Hash Join (cost=xxx rows=100 width=xxx)
1156 Hash Cond: (bmt3.c1 = bmt1.c1)
1157 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
1158 -> Hash (cost=xxx rows=100 width=xxx)
1159 -> Merge Join (cost=xxx rows=100 width=xxx)
1160 Merge Cond: (bmt1.c1 = bmt2.c1)
1161 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
1162 -> Sort (cost=xxx rows=100 width=xxx)
1164 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
1165 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
1166 Index Cond: (c1 = bmt3.c1)
1169 \o results/ut-R.tmpout
1171 Leading(bmt1 bmt2 bmt3 bmt4)
1172 Leading(b1t2 b1t3 b1t4 b1t1)
1173 Leading(b2t3 b2t4 b2t1 b2t2)
1174 MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4)
1175 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
1176 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
1177 Rows(bmt1 bmt2 #1)Rows(bmt1 bmt2 bmt3 #1)Rows(bmt1 bmt2 bmt3 bmt4 #1)
1178 Rows(b1t2 b1t3 #1)Rows(b1t2 b1t3 b1t4 #1)Rows(b1t2 b1t3 b1t4 b1t1 #1)
1179 Rows(b2t3 b2t4 #1)Rows(b2t3 b2t4 b2t1 #1)Rows(b2t3 b2t4 b2t1 b2t2 #1)
1182 SELECT max(bmt1.c1), (
1183 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
1185 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)
1186 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
1190 MergeJoin(b1t2 b1t3)
1191 MergeJoin(b2t3 b2t4)
1192 MergeJoin(bmt1 bmt2)
1193 HashJoin(b1t2 b1t3 b1t4)
1194 HashJoin(b2t1 b2t3 b2t4)
1195 HashJoin(bmt1 bmt2 bmt3)
1196 NestLoop(b1t1 b1t2 b1t3 b1t4)
1197 NestLoop(b2t1 b2t2 b2t3 b2t4)
1198 NestLoop(bmt1 bmt2 bmt3 bmt4)
1199 Leading(bmt1 bmt2 bmt3 bmt4)
1200 Leading(b1t2 b1t3 b1t4 b1t1)
1201 Leading(b2t3 b2t4 b2t1 b2t2)
1205 Rows(b1t2 b1t3 b1t4 #1)
1206 Rows(b2t1 b2t3 b2t4 #1)
1207 Rows(bmt1 bmt2 bmt3 #1)
1208 Rows(b1t1 b1t2 b1t3 b1t4 #1)
1209 Rows(b2t1 b2t2 b2t3 b2t4 #1)
1210 Rows(bmt1 bmt2 bmt3 bmt4 #1)
1216 \! sql/maskout.sh results/ut-R.tmpout
1218 --------------------------------------------------------------------------------------------------------------------
1219 Aggregate (cost=xxx rows=1 width=xxx)
1220 InitPlan 1 (returns $1)
1221 -> Aggregate (cost=xxx rows=1 width=xxx)
1222 -> Nested Loop (cost=xxx rows=1 width=xxx)
1223 Join Filter: (b1t2.c1 = b1t1.c1)
1224 -> Hash Join (cost=xxx rows=1 width=xxx)
1225 Hash Cond: (b1t4.c1 = b1t2.c1)
1226 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
1227 -> Hash (cost=xxx rows=1 width=xxx)
1228 -> Merge Join (cost=xxx rows=1 width=xxx)
1229 Merge Cond: (b1t3.c1 = b1t2.c1)
1230 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
1231 -> Sort (cost=xxx rows=100 width=xxx)
1233 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
1234 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
1235 Index Cond: (c1 = b1t3.c1)
1236 InitPlan 2 (returns $3)
1237 -> Aggregate (cost=xxx rows=1 width=xxx)
1238 -> Nested Loop (cost=xxx rows=1 width=xxx)
1239 -> Hash Join (cost=xxx rows=1 width=xxx)
1240 Hash Cond: (b2t1.c1 = b2t3.c1)
1241 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
1242 -> Hash (cost=xxx rows=1 width=xxx)
1243 -> Merge Join (cost=xxx rows=1 width=xxx)
1244 Merge Cond: (b2t3.c1 = b2t4.c1)
1245 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
1246 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
1247 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
1248 Index Cond: (c1 = b2t1.c1)
1249 -> Nested Loop (cost=xxx rows=1 width=xxx)
1250 Join Filter: (bmt1.c1 = bmt4.c1)
1251 -> Hash Join (cost=xxx rows=1 width=xxx)
1252 Hash Cond: (bmt3.c1 = bmt1.c1)
1253 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
1254 -> Hash (cost=xxx rows=1 width=xxx)
1255 -> Merge Join (cost=xxx rows=1 width=xxx)
1256 Merge Cond: (bmt1.c1 = bmt2.c1)
1257 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
1258 -> Sort (cost=xxx rows=100 width=xxx)
1260 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
1261 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
1262 Index Cond: (c1 = bmt3.c1)
1266 \o results/ut-R.tmpout
1268 Leading(bmt1 bmt2 bmt3 bmt4)
1269 Leading(b1t2 b1t3 b1t4 b1t1)
1270 Leading(b2t3 b2t4 b2t1 b2t2)
1271 Leading(b3t4 b3t1 b3t2 b3t3)
1272 MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4)
1273 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
1274 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
1275 MergeJoin(b3t4 b3t1)HashJoin(b3t4 b3t1 b3t2)NestLoop(b3t1 b3t2 b3t3 b3t4)
1278 SELECT max(bmt1.c1), (
1279 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
1281 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
1283 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
1285 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
1289 MergeJoin(b1t2 b1t3)
1290 MergeJoin(b2t3 b2t4)
1291 MergeJoin(b3t1 b3t4)
1292 MergeJoin(bmt1 bmt2)
1293 HashJoin(b1t2 b1t3 b1t4)
1294 HashJoin(b2t1 b2t3 b2t4)
1295 HashJoin(b3t1 b3t2 b3t4)
1296 HashJoin(bmt1 bmt2 bmt3)
1297 NestLoop(b1t1 b1t2 b1t3 b1t4)
1298 NestLoop(b2t1 b2t2 b2t3 b2t4)
1299 NestLoop(b3t1 b3t2 b3t3 b3t4)
1300 NestLoop(bmt1 bmt2 bmt3 bmt4)
1301 Leading(bmt1 bmt2 bmt3 bmt4)
1302 Leading(b1t2 b1t3 b1t4 b1t1)
1303 Leading(b2t3 b2t4 b2t1 b2t2)
1304 Leading(b3t4 b3t1 b3t2 b3t3)
1310 \! sql/maskout.sh results/ut-R.tmpout
1312 --------------------------------------------------------------------------------------------------------------------
1313 Aggregate (cost=xxx rows=1 width=xxx)
1314 InitPlan 1 (returns $1)
1315 -> Aggregate (cost=xxx rows=1 width=xxx)
1316 -> Nested Loop (cost=xxx rows=100 width=xxx)
1317 Join Filter: (b1t2.c1 = b1t1.c1)
1318 -> Hash Join (cost=xxx rows=100 width=xxx)
1319 Hash Cond: (b1t4.c1 = b1t2.c1)
1320 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
1321 -> Hash (cost=xxx rows=100 width=xxx)
1322 -> Merge Join (cost=xxx rows=100 width=xxx)
1323 Merge Cond: (b1t3.c1 = b1t2.c1)
1324 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
1325 -> Sort (cost=xxx rows=100 width=xxx)
1327 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
1328 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
1329 Index Cond: (c1 = b1t3.c1)
1330 InitPlan 2 (returns $3)
1331 -> Aggregate (cost=xxx rows=1 width=xxx)
1332 -> Nested Loop (cost=xxx rows=100 width=xxx)
1333 -> Hash Join (cost=xxx rows=1000 width=xxx)
1334 Hash Cond: (b2t3.c1 = b2t1.c1)
1335 -> Merge Join (cost=xxx rows=1130 width=xxx)
1336 Merge Cond: (b2t3.c1 = b2t4.c1)
1337 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
1338 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
1339 -> Hash (cost=xxx rows=1000 width=xxx)
1340 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
1341 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
1342 Index Cond: (c1 = b2t1.c1)
1343 InitPlan 3 (returns $5)
1344 -> Aggregate (cost=xxx rows=1 width=xxx)
1345 -> Nested Loop (cost=xxx rows=100 width=xxx)
1346 Join Filter: (b3t1.c1 = b3t3.c1)
1347 -> Hash Join (cost=xxx rows=100 width=xxx)
1348 Hash Cond: (b3t1.c1 = b3t2.c1)
1349 -> Merge Join (cost=xxx rows=1000 width=xxx)
1350 Merge Cond: (b3t1.c1 = b3t4.c1)
1351 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
1352 -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1130 width=xxx)
1353 -> Hash (cost=xxx rows=100 width=xxx)
1354 -> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
1355 -> Index Only Scan using t3_i1 on t3 b3t3 (cost=xxx rows=1 width=xxx)
1356 Index Cond: (c1 = b3t4.c1)
1357 -> Nested Loop (cost=xxx rows=100 width=xxx)
1358 Join Filter: (bmt1.c1 = bmt4.c1)
1359 -> Hash Join (cost=xxx rows=100 width=xxx)
1360 Hash Cond: (bmt3.c1 = bmt1.c1)
1361 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
1362 -> Hash (cost=xxx rows=100 width=xxx)
1363 -> Merge Join (cost=xxx rows=100 width=xxx)
1364 Merge Cond: (bmt1.c1 = bmt2.c1)
1365 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
1366 -> Sort (cost=xxx rows=100 width=xxx)
1368 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
1369 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
1370 Index Cond: (c1 = bmt3.c1)
1373 \o results/ut-R.tmpout
1375 Leading(bmt1 bmt2 bmt3 bmt4)
1376 Leading(b1t2 b1t3 b1t4 b1t1)
1377 Leading(b2t3 b2t4 b2t1 b2t2)
1378 Leading(b3t4 b3t1 b3t2 b3t3)
1379 MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4)
1380 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
1381 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
1382 MergeJoin(b3t4 b3t1)HashJoin(b3t4 b3t1 b3t2)NestLoop(b3t1 b3t2 b3t3 b3t4)
1383 Rows(bmt1 bmt2 #1)Rows(bmt1 bmt2 bmt3 #1)Rows(bmt1 bmt2 bmt3 bmt4 #1)
1384 Rows(b1t2 b1t3 #1)Rows(b1t2 b1t3 b1t4 #1)Rows(b1t2 b1t3 b1t4 b1t1 #1)
1385 Rows(b2t3 b2t4 #1)Rows(b2t3 b2t4 b2t1 #1)Rows(b2t3 b2t4 b2t1 b2t2 #1)
1386 Rows(b3t4 b3t1 #1)Rows(b3t4 b3t1 b3t2 #1)Rows(b3t1 b3t2 b3t3 b3t4 #1)
1389 SELECT max(bmt1.c1), (
1390 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
1392 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
1394 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
1396 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
1400 MergeJoin(b1t2 b1t3)
1401 MergeJoin(b2t3 b2t4)
1402 MergeJoin(b3t1 b3t4)
1403 MergeJoin(bmt1 bmt2)
1404 HashJoin(b1t2 b1t3 b1t4)
1405 HashJoin(b2t1 b2t3 b2t4)
1406 HashJoin(b3t1 b3t2 b3t4)
1407 HashJoin(bmt1 bmt2 bmt3)
1408 NestLoop(b1t1 b1t2 b1t3 b1t4)
1409 NestLoop(b2t1 b2t2 b2t3 b2t4)
1410 NestLoop(b3t1 b3t2 b3t3 b3t4)
1411 NestLoop(bmt1 bmt2 bmt3 bmt4)
1412 Leading(bmt1 bmt2 bmt3 bmt4)
1413 Leading(b1t2 b1t3 b1t4 b1t1)
1414 Leading(b2t3 b2t4 b2t1 b2t2)
1415 Leading(b3t4 b3t1 b3t2 b3t3)
1420 Rows(b1t2 b1t3 b1t4 #1)
1421 Rows(b2t1 b2t3 b2t4 #1)
1422 Rows(b3t1 b3t2 b3t4 #1)
1423 Rows(bmt1 bmt2 bmt3 #1)
1424 Rows(b1t1 b1t2 b1t3 b1t4 #1)
1425 Rows(b2t1 b2t2 b2t3 b2t4 #1)
1426 Rows(b3t1 b3t2 b3t3 b3t4 #1)
1427 Rows(bmt1 bmt2 bmt3 bmt4 #1)
1433 \! sql/maskout.sh results/ut-R.tmpout
1435 --------------------------------------------------------------------------------------------------------------------
1436 Aggregate (cost=xxx rows=1 width=xxx)
1437 InitPlan 1 (returns $1)
1438 -> Aggregate (cost=xxx rows=1 width=xxx)
1439 -> Nested Loop (cost=xxx rows=1 width=xxx)
1440 Join Filter: (b1t2.c1 = b1t1.c1)
1441 -> Hash Join (cost=xxx rows=1 width=xxx)
1442 Hash Cond: (b1t4.c1 = b1t2.c1)
1443 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
1444 -> Hash (cost=xxx rows=1 width=xxx)
1445 -> Merge Join (cost=xxx rows=1 width=xxx)
1446 Merge Cond: (b1t3.c1 = b1t2.c1)
1447 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
1448 -> Sort (cost=xxx rows=100 width=xxx)
1450 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
1451 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
1452 Index Cond: (c1 = b1t3.c1)
1453 InitPlan 2 (returns $3)
1454 -> Aggregate (cost=xxx rows=1 width=xxx)
1455 -> Nested Loop (cost=xxx rows=1 width=xxx)
1456 -> Hash Join (cost=xxx rows=1 width=xxx)
1457 Hash Cond: (b2t1.c1 = b2t3.c1)
1458 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
1459 -> Hash (cost=xxx rows=1 width=xxx)
1460 -> Merge Join (cost=xxx rows=1 width=xxx)
1461 Merge Cond: (b2t3.c1 = b2t4.c1)
1462 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
1463 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
1464 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
1465 Index Cond: (c1 = b2t1.c1)
1466 InitPlan 3 (returns $5)
1467 -> Aggregate (cost=xxx rows=1 width=xxx)
1468 -> Nested Loop (cost=xxx rows=1 width=xxx)
1469 Join Filter: (b3t1.c1 = b3t3.c1)
1470 -> Hash Join (cost=xxx rows=1 width=xxx)
1471 Hash Cond: (b3t1.c1 = b3t2.c1)
1472 -> Merge Join (cost=xxx rows=1 width=xxx)
1473 Merge Cond: (b3t1.c1 = b3t4.c1)
1474 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
1475 -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1130 width=xxx)
1476 -> Hash (cost=xxx rows=100 width=xxx)
1477 -> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
1478 -> Index Only Scan using t3_i1 on t3 b3t3 (cost=xxx rows=1 width=xxx)
1479 Index Cond: (c1 = b3t4.c1)
1480 -> Nested Loop (cost=xxx rows=1 width=xxx)
1481 Join Filter: (bmt1.c1 = bmt4.c1)
1482 -> Hash Join (cost=xxx rows=1 width=xxx)
1483 Hash Cond: (bmt3.c1 = bmt1.c1)
1484 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
1485 -> Hash (cost=xxx rows=1 width=xxx)
1486 -> Merge Join (cost=xxx rows=1 width=xxx)
1487 Merge Cond: (bmt1.c1 = bmt2.c1)
1488 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
1489 -> Sort (cost=xxx rows=100 width=xxx)
1491 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
1492 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
1493 Index Cond: (c1 = bmt3.c1)
1497 \o results/ut-R.tmpout
1499 Leading(bmt4 bmt3 bmt2 bmt1)
1501 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;
1504 Leading(bmt4 bmt3 bmt2 bmt1)
1510 \! sql/maskout.sh results/ut-R.tmpout
1512 -----------------------------------------------------------------------------------------------
1513 Aggregate (cost=xxx rows=1 width=xxx)
1514 -> Merge Join (cost=xxx rows=100 width=xxx)
1515 Merge Cond: (bmt1.c1 = bmt2.c1)
1516 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
1517 -> Sort (cost=xxx rows=100 width=xxx)
1519 -> Hash Join (cost=xxx rows=100 width=xxx)
1520 Hash Cond: (bmt3.c1 = bmt2.c1)
1521 -> Hash Join (cost=xxx rows=1130 width=xxx)
1522 Hash Cond: (bmt3.c1 = bmt4.c1)
1523 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
1524 -> Hash (cost=xxx rows=1130 width=xxx)
1525 -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
1526 -> Hash (cost=xxx rows=100 width=xxx)
1527 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
1530 \o results/ut-R.tmpout
1532 Leading(bmt4 bmt3 bmt2 bmt1)
1533 Rows(bmt4 bmt3 #1)Rows(bmt4 bmt3 bmt2 #1)Rows(bmt1 bmt2 bmt3 bmt4 #1)
1535 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;
1538 Leading(bmt4 bmt3 bmt2 bmt1)
1540 Rows(bmt2 bmt3 bmt4 #1)
1541 Rows(bmt1 bmt2 bmt3 bmt4 #1)
1547 \! sql/maskout.sh results/ut-R.tmpout
1549 --------------------------------------------------------------------------------------------
1550 Aggregate (cost=xxx rows=1 width=xxx)
1551 -> Nested Loop (cost=xxx rows=1 width=xxx)
1552 Join Filter: (bmt2.c1 = bmt1.c1)
1553 -> Nested Loop (cost=xxx rows=1 width=xxx)
1554 -> Hash Join (cost=xxx rows=1 width=xxx)
1555 Hash Cond: (bmt3.c1 = bmt4.c1)
1556 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
1557 -> Hash (cost=xxx rows=1130 width=xxx)
1558 -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
1559 -> Index Only Scan using t2_i1 on t2 bmt2 (cost=xxx rows=1 width=xxx)
1560 Index Cond: (c1 = bmt3.c1)
1561 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1 width=xxx)
1562 Index Cond: (c1 = bmt3.c1)
1566 \o results/ut-R.tmpout
1568 Leading(bmt4 bmt3 bmt2 bmt1)
1570 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;
1573 Leading(bmt4 bmt3 bmt2 bmt1)
1579 \! sql/maskout.sh results/ut-R.tmpout
1581 -----------------------------------------------------------------------------------------------
1582 Aggregate (cost=xxx rows=1 width=xxx)
1583 -> Merge Join (cost=xxx rows=100 width=xxx)
1584 Merge Cond: (bmt1.c1 = bmt2.c1)
1585 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
1586 -> Sort (cost=xxx rows=100 width=xxx)
1588 -> Hash Join (cost=xxx rows=100 width=xxx)
1589 Hash Cond: (bmt3.c1 = bmt2.c1)
1590 -> Hash Join (cost=xxx rows=1130 width=xxx)
1591 Hash Cond: (bmt3.c1 = bmt4.c1)
1592 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
1593 -> Hash (cost=xxx rows=1130 width=xxx)
1594 -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
1595 -> Hash (cost=xxx rows=100 width=xxx)
1596 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
1599 \o results/ut-R.tmpout
1601 Leading(bmt4 bmt3 bmt2 bmt1)
1602 Rows(bmt4 bmt3 #1)Rows(bmt4 bmt3 bmt2 #1)Rows(bmt1 bmt2 bmt3 bmt4 #1)
1604 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;
1607 Leading(bmt4 bmt3 bmt2 bmt1)
1609 Rows(bmt2 bmt3 bmt4 #1)
1610 Rows(bmt1 bmt2 bmt3 bmt4 #1)
1616 \! sql/maskout.sh results/ut-R.tmpout
1618 --------------------------------------------------------------------------------------------
1619 Aggregate (cost=xxx rows=1 width=xxx)
1620 -> Nested Loop (cost=xxx rows=1 width=xxx)
1621 Join Filter: (bmt2.c1 = bmt1.c1)
1622 -> Nested Loop (cost=xxx rows=1 width=xxx)
1623 -> Hash Join (cost=xxx rows=1 width=xxx)
1624 Hash Cond: (bmt3.c1 = bmt4.c1)
1625 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
1626 -> Hash (cost=xxx rows=1130 width=xxx)
1627 -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
1628 -> Index Only Scan using t2_i1 on t2 bmt2 (cost=xxx rows=1 width=xxx)
1629 Index Cond: (c1 = bmt3.c1)
1630 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1 width=xxx)
1631 Index Cond: (c1 = bmt3.c1)
1635 \o results/ut-R.tmpout
1637 Leading(bmt1 bmt2 bmt3 bmt4)
1638 Leading(b1t2 b1t3 b1t4 b1t1)
1639 Leading(b2t3 b2t4 b2t1 b2t2)
1640 MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4)
1641 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
1642 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
1645 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
1647 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
1649 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
1653 MergeJoin(b1t2 b1t3)
1654 MergeJoin(b2t3 b2t4)
1655 MergeJoin(bmt1 bmt2)
1656 HashJoin(b1t2 b1t3 b1t4)
1657 HashJoin(b2t1 b2t3 b2t4)
1658 HashJoin(bmt1 bmt2 bmt3)
1659 NestLoop(b1t1 b1t2 b1t3 b1t4)
1660 NestLoop(b2t1 b2t2 b2t3 b2t4)
1661 NestLoop(bmt1 bmt2 bmt3 bmt4)
1662 Leading(bmt1 bmt2 bmt3 bmt4)
1663 Leading(b1t2 b1t3 b1t4 b1t1)
1664 Leading(b2t3 b2t4 b2t1 b2t2)
1670 \! sql/maskout.sh results/ut-R.tmpout
1672 --------------------------------------------------------------------------------------------------------------------
1673 Aggregate (cost=xxx rows=1 width=xxx)
1674 InitPlan 1 (returns $1)
1675 -> Aggregate (cost=xxx rows=1 width=xxx)
1676 -> Nested Loop (cost=xxx rows=100 width=xxx)
1677 Join Filter: (b1t2.c1 = b1t1.c1)
1678 -> Hash Join (cost=xxx rows=100 width=xxx)
1679 Hash Cond: (b1t4.c1 = b1t2.c1)
1680 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
1681 -> Hash (cost=xxx rows=100 width=xxx)
1682 -> Merge Join (cost=xxx rows=100 width=xxx)
1683 Merge Cond: (b1t3.c1 = b1t2.c1)
1684 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
1685 -> Sort (cost=xxx rows=100 width=xxx)
1687 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
1688 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
1689 Index Cond: (c1 = b1t3.c1)
1690 InitPlan 2 (returns $3)
1691 -> Aggregate (cost=xxx rows=1 width=xxx)
1692 -> Nested Loop (cost=xxx rows=100 width=xxx)
1693 -> Hash Join (cost=xxx rows=1000 width=xxx)
1694 Hash Cond: (b2t3.c1 = b2t1.c1)
1695 -> Merge Join (cost=xxx rows=1130 width=xxx)
1696 Merge Cond: (b2t3.c1 = b2t4.c1)
1697 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
1698 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
1699 -> Hash (cost=xxx rows=1000 width=xxx)
1700 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
1701 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
1702 Index Cond: (c1 = b2t1.c1)
1703 -> Nested Loop (cost=xxx rows=100 width=xxx)
1704 Join Filter: (bmt1.c1 = bmt4.c1)
1705 -> Hash Join (cost=xxx rows=100 width=xxx)
1706 Hash Cond: (bmt3.c1 = bmt1.c1)
1707 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
1708 -> Hash (cost=xxx rows=100 width=xxx)
1709 -> Merge Join (cost=xxx rows=100 width=xxx)
1710 Merge Cond: (bmt1.c1 = bmt2.c1)
1711 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=998 width=xxx)
1712 Filter: ((c1 <> $1) AND (c1 <> $3))
1713 -> Sort (cost=xxx rows=100 width=xxx)
1715 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
1716 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
1717 Index Cond: (c1 = bmt3.c1)
1720 \o results/ut-R.tmpout
1722 Leading(bmt1 bmt2 bmt3 bmt4)
1723 Leading(b1t2 b1t3 b1t4 b1t1)
1724 Leading(b2t3 b2t4 b2t1 b2t2)
1725 MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4)
1726 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
1727 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
1728 Rows(bmt1 bmt2 #1)Rows(bmt1 bmt2 bmt3 #1)Rows(bmt1 bmt2 bmt3 bmt4 #1)
1729 Rows(b1t2 b1t3 #1)Rows(b1t2 b1t3 b1t4 #1)Rows(b1t2 b1t3 b1t4 b1t1 #1)
1730 Rows(b2t3 b2t4 #1)Rows(b2t3 b2t4 b2t1 #1)Rows(b2t3 b2t4 b2t1 b2t2 #1)
1733 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
1735 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
1737 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
1742 MergeJoin(b1t2 b1t3)
1743 MergeJoin(b2t3 b2t4)
1744 MergeJoin(bmt1 bmt2)
1745 HashJoin(b1t2 b1t3 b1t4)
1746 HashJoin(b2t1 b2t3 b2t4)
1747 HashJoin(bmt1 bmt2 bmt3)
1748 NestLoop(b1t1 b1t2 b1t3 b1t4)
1749 NestLoop(b2t1 b2t2 b2t3 b2t4)
1750 NestLoop(bmt1 bmt2 bmt3 bmt4)
1751 Leading(bmt1 bmt2 bmt3 bmt4)
1752 Leading(b1t2 b1t3 b1t4 b1t1)
1753 Leading(b2t3 b2t4 b2t1 b2t2)
1757 Rows(b1t2 b1t3 b1t4 #1)
1758 Rows(b2t1 b2t3 b2t4 #1)
1759 Rows(bmt1 bmt2 bmt3 #1)
1760 Rows(b1t1 b1t2 b1t3 b1t4 #1)
1761 Rows(b2t1 b2t2 b2t3 b2t4 #1)
1762 Rows(bmt1 bmt2 bmt3 bmt4 #1)
1768 \! sql/maskout.sh results/ut-R.tmpout
1770 --------------------------------------------------------------------------------------------------------------------
1771 Aggregate (cost=xxx rows=1 width=xxx)
1772 InitPlan 1 (returns $1)
1773 -> Aggregate (cost=xxx rows=1 width=xxx)
1774 -> Nested Loop (cost=xxx rows=1 width=xxx)
1775 Join Filter: (b1t2.c1 = b1t1.c1)
1776 -> Hash Join (cost=xxx rows=1 width=xxx)
1777 Hash Cond: (b1t4.c1 = b1t2.c1)
1778 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
1779 -> Hash (cost=xxx rows=1 width=xxx)
1780 -> Merge Join (cost=xxx rows=1 width=xxx)
1781 Merge Cond: (b1t3.c1 = b1t2.c1)
1782 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
1783 -> Sort (cost=xxx rows=100 width=xxx)
1785 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
1786 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
1787 Index Cond: (c1 = b1t3.c1)
1788 InitPlan 2 (returns $3)
1789 -> Aggregate (cost=xxx rows=1 width=xxx)
1790 -> Nested Loop (cost=xxx rows=1 width=xxx)
1791 -> Hash Join (cost=xxx rows=1 width=xxx)
1792 Hash Cond: (b2t1.c1 = b2t3.c1)
1793 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
1794 -> Hash (cost=xxx rows=1 width=xxx)
1795 -> Merge Join (cost=xxx rows=1 width=xxx)
1796 Merge Cond: (b2t3.c1 = b2t4.c1)
1797 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
1798 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
1799 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
1800 Index Cond: (c1 = b2t1.c1)
1801 -> Nested Loop (cost=xxx rows=1 width=xxx)
1802 Join Filter: (bmt1.c1 = bmt4.c1)
1803 -> Hash Join (cost=xxx rows=1 width=xxx)
1804 Hash Cond: (bmt3.c1 = bmt1.c1)
1805 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
1806 -> Hash (cost=xxx rows=1 width=xxx)
1807 -> Merge Join (cost=xxx rows=1 width=xxx)
1808 Merge Cond: (bmt1.c1 = bmt2.c1)
1809 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=998 width=xxx)
1810 Filter: ((c1 <> $1) AND (c1 <> $3))
1811 -> Sort (cost=xxx rows=100 width=xxx)
1813 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
1814 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
1815 Index Cond: (c1 = bmt3.c1)
1819 \o results/ut-R.tmpout
1821 Leading(bmt1 bmt2 bmt3 bmt4)
1822 Leading(b1t2 b1t3 b1t4 b1t1)
1823 Leading(b2t3 b2t4 b2t1 b2t2)
1824 Leading(b3t4 b3t1 b3t2 b3t3)
1825 MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4)
1826 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
1827 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
1828 MergeJoin(b3t4 b3t1)HashJoin(b3t4 b3t1 b3t2)NestLoop(b3t1 b3t2 b3t3 b3t4)
1831 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
1833 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
1835 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
1837 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
1842 MergeJoin(b1t2 b1t3)
1843 MergeJoin(b2t3 b2t4)
1844 MergeJoin(b3t1 b3t4)
1845 MergeJoin(bmt1 bmt2)
1846 HashJoin(b1t2 b1t3 b1t4)
1847 HashJoin(b2t1 b2t3 b2t4)
1848 HashJoin(b3t1 b3t2 b3t4)
1849 HashJoin(bmt1 bmt2 bmt3)
1850 NestLoop(b1t1 b1t2 b1t3 b1t4)
1851 NestLoop(b2t1 b2t2 b2t3 b2t4)
1852 NestLoop(b3t1 b3t2 b3t3 b3t4)
1853 NestLoop(bmt1 bmt2 bmt3 bmt4)
1854 Leading(bmt1 bmt2 bmt3 bmt4)
1855 Leading(b1t2 b1t3 b1t4 b1t1)
1856 Leading(b2t3 b2t4 b2t1 b2t2)
1857 Leading(b3t4 b3t1 b3t2 b3t3)
1863 \! sql/maskout.sh results/ut-R.tmpout
1865 --------------------------------------------------------------------------------------------------------------------
1866 Aggregate (cost=xxx rows=1 width=xxx)
1867 InitPlan 1 (returns $1)
1868 -> Aggregate (cost=xxx rows=1 width=xxx)
1869 -> Nested Loop (cost=xxx rows=100 width=xxx)
1870 Join Filter: (b1t2.c1 = b1t1.c1)
1871 -> Hash Join (cost=xxx rows=100 width=xxx)
1872 Hash Cond: (b1t4.c1 = b1t2.c1)
1873 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
1874 -> Hash (cost=xxx rows=100 width=xxx)
1875 -> Merge Join (cost=xxx rows=100 width=xxx)
1876 Merge Cond: (b1t3.c1 = b1t2.c1)
1877 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
1878 -> Sort (cost=xxx rows=100 width=xxx)
1880 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
1881 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
1882 Index Cond: (c1 = b1t3.c1)
1883 InitPlan 2 (returns $3)
1884 -> Aggregate (cost=xxx rows=1 width=xxx)
1885 -> Nested Loop (cost=xxx rows=100 width=xxx)
1886 -> Hash Join (cost=xxx rows=1000 width=xxx)
1887 Hash Cond: (b2t3.c1 = b2t1.c1)
1888 -> Merge Join (cost=xxx rows=1130 width=xxx)
1889 Merge Cond: (b2t3.c1 = b2t4.c1)
1890 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
1891 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
1892 -> Hash (cost=xxx rows=1000 width=xxx)
1893 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
1894 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
1895 Index Cond: (c1 = b2t1.c1)
1896 InitPlan 3 (returns $5)
1897 -> Aggregate (cost=xxx rows=1 width=xxx)
1898 -> Nested Loop (cost=xxx rows=100 width=xxx)
1899 Join Filter: (b3t1.c1 = b3t3.c1)
1900 -> Hash Join (cost=xxx rows=100 width=xxx)
1901 Hash Cond: (b3t1.c1 = b3t2.c1)
1902 -> Merge Join (cost=xxx rows=1000 width=xxx)
1903 Merge Cond: (b3t1.c1 = b3t4.c1)
1904 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
1905 -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1130 width=xxx)
1906 -> Hash (cost=xxx rows=100 width=xxx)
1907 -> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
1908 -> Index Only Scan using t3_i1 on t3 b3t3 (cost=xxx rows=1 width=xxx)
1909 Index Cond: (c1 = b3t4.c1)
1910 -> Nested Loop (cost=xxx rows=100 width=xxx)
1911 Join Filter: (bmt1.c1 = bmt4.c1)
1912 -> Hash Join (cost=xxx rows=100 width=xxx)
1913 Hash Cond: (bmt3.c1 = bmt1.c1)
1914 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
1915 -> Hash (cost=xxx rows=100 width=xxx)
1916 -> Merge Join (cost=xxx rows=100 width=xxx)
1917 Merge Cond: (bmt1.c1 = bmt2.c1)
1918 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=997 width=xxx)
1919 Filter: ((c1 <> $1) AND (c1 <> $3) AND (c1 <> $5))
1920 -> Sort (cost=xxx rows=100 width=xxx)
1922 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
1923 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
1924 Index Cond: (c1 = bmt3.c1)
1927 \o results/ut-R.tmpout
1929 Leading(bmt1 bmt2 bmt3 bmt4)
1930 Leading(b1t2 b1t3 b1t4 b1t1)
1931 Leading(b2t3 b2t4 b2t1 b2t2)
1932 Leading(b3t4 b3t1 b3t2 b3t3)
1933 MergeJoin(bmt1 bmt2)HashJoin(bmt1 bmt2 bmt3)NestLoop(bmt1 bmt2 bmt3 bmt4)
1934 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
1935 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
1936 MergeJoin(b3t4 b3t1)HashJoin(b3t4 b3t1 b3t2)NestLoop(b3t1 b3t2 b3t3 b3t4)
1937 Rows(bmt1 bmt2 #1)Rows(bmt1 bmt2 bmt3 #1)Rows(bmt1 bmt2 bmt3 bmt4 #1)
1938 Rows(b1t2 b1t3 #1)Rows(b1t2 b1t3 b1t4 #1)Rows(b1t2 b1t3 b1t4 b1t1 #1)
1939 Rows(b2t3 b2t4 #1)Rows(b2t3 b2t4 b2t1 #1)Rows(b2t3 b2t4 b2t1 b2t2 #1)
1940 Rows(b3t4 b3t1 #1)Rows(b3t4 b3t1 b3t2 #1)Rows(b3t1 b3t2 b3t3 b3t4 #1)
1943 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
1945 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
1947 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
1949 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
1954 MergeJoin(b1t2 b1t3)
1955 MergeJoin(b2t3 b2t4)
1956 MergeJoin(b3t1 b3t4)
1957 MergeJoin(bmt1 bmt2)
1958 HashJoin(b1t2 b1t3 b1t4)
1959 HashJoin(b2t1 b2t3 b2t4)
1960 HashJoin(b3t1 b3t2 b3t4)
1961 HashJoin(bmt1 bmt2 bmt3)
1962 NestLoop(b1t1 b1t2 b1t3 b1t4)
1963 NestLoop(b2t1 b2t2 b2t3 b2t4)
1964 NestLoop(b3t1 b3t2 b3t3 b3t4)
1965 NestLoop(bmt1 bmt2 bmt3 bmt4)
1966 Leading(bmt1 bmt2 bmt3 bmt4)
1967 Leading(b1t2 b1t3 b1t4 b1t1)
1968 Leading(b2t3 b2t4 b2t1 b2t2)
1969 Leading(b3t4 b3t1 b3t2 b3t3)
1974 Rows(b1t2 b1t3 b1t4 #1)
1975 Rows(b2t1 b2t3 b2t4 #1)
1976 Rows(b3t1 b3t2 b3t4 #1)
1977 Rows(bmt1 bmt2 bmt3 #1)
1978 Rows(b1t1 b1t2 b1t3 b1t4 #1)
1979 Rows(b2t1 b2t2 b2t3 b2t4 #1)
1980 Rows(b3t1 b3t2 b3t3 b3t4 #1)
1981 Rows(bmt1 bmt2 bmt3 bmt4 #1)
1987 \! sql/maskout.sh results/ut-R.tmpout
1989 --------------------------------------------------------------------------------------------------------------------
1990 Aggregate (cost=xxx rows=1 width=xxx)
1991 InitPlan 1 (returns $1)
1992 -> Aggregate (cost=xxx rows=1 width=xxx)
1993 -> Nested Loop (cost=xxx rows=1 width=xxx)
1994 Join Filter: (b1t2.c1 = b1t1.c1)
1995 -> Hash Join (cost=xxx rows=1 width=xxx)
1996 Hash Cond: (b1t4.c1 = b1t2.c1)
1997 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
1998 -> Hash (cost=xxx rows=1 width=xxx)
1999 -> Merge Join (cost=xxx rows=1 width=xxx)
2000 Merge Cond: (b1t3.c1 = b1t2.c1)
2001 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
2002 -> Sort (cost=xxx rows=100 width=xxx)
2004 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
2005 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
2006 Index Cond: (c1 = b1t3.c1)
2007 InitPlan 2 (returns $3)
2008 -> Aggregate (cost=xxx rows=1 width=xxx)
2009 -> Nested Loop (cost=xxx rows=1 width=xxx)
2010 -> Hash Join (cost=xxx rows=1 width=xxx)
2011 Hash Cond: (b2t1.c1 = b2t3.c1)
2012 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
2013 -> Hash (cost=xxx rows=1 width=xxx)
2014 -> Merge Join (cost=xxx rows=1 width=xxx)
2015 Merge Cond: (b2t3.c1 = b2t4.c1)
2016 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
2017 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
2018 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
2019 Index Cond: (c1 = b2t1.c1)
2020 InitPlan 3 (returns $5)
2021 -> Aggregate (cost=xxx rows=1 width=xxx)
2022 -> Nested Loop (cost=xxx rows=1 width=xxx)
2023 Join Filter: (b3t1.c1 = b3t3.c1)
2024 -> Hash Join (cost=xxx rows=1 width=xxx)
2025 Hash Cond: (b3t1.c1 = b3t2.c1)
2026 -> Merge Join (cost=xxx rows=1 width=xxx)
2027 Merge Cond: (b3t1.c1 = b3t4.c1)
2028 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
2029 -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1130 width=xxx)
2030 -> Hash (cost=xxx rows=100 width=xxx)
2031 -> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
2032 -> Index Only Scan using t3_i1 on t3 b3t3 (cost=xxx rows=1 width=xxx)
2033 Index Cond: (c1 = b3t4.c1)
2034 -> Nested Loop (cost=xxx rows=1 width=xxx)
2035 Join Filter: (bmt1.c1 = bmt4.c1)
2036 -> Hash Join (cost=xxx rows=1 width=xxx)
2037 Hash Cond: (bmt3.c1 = bmt1.c1)
2038 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
2039 -> Hash (cost=xxx rows=1 width=xxx)
2040 -> Merge Join (cost=xxx rows=1 width=xxx)
2041 Merge Cond: (bmt1.c1 = bmt2.c1)
2042 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=997 width=xxx)
2043 Filter: ((c1 <> $1) AND (c1 <> $3) AND (c1 <> $5))
2044 -> Sort (cost=xxx rows=100 width=xxx)
2046 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
2047 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
2048 Index Cond: (c1 = bmt3.c1)
2052 \o results/ut-R.tmpout
2054 Leading(c2 c1 bmt1 bmt2 bmt3 bmt4)
2055 Leading(b1t2 b1t3 b1t4 b1t1)
2056 Leading(b2t3 b2t4 b2t1 b2t2)
2057 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)
2058 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
2059 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
2063 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
2066 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
2068 SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4
2070 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1
2076 MergeJoin(b1t2 b1t3)
2077 MergeJoin(b2t3 b2t4)
2079 HashJoin(b1t2 b1t3 b1t4)
2080 HashJoin(b2t1 b2t3 b2t4)
2081 HashJoin(bmt1 c1 c2)
2082 NestLoop(b1t1 b1t2 b1t3 b1t4)
2083 NestLoop(b2t1 b2t2 b2t3 b2t4)
2084 NestLoop(bmt1 bmt2 c1 c2)
2085 MergeJoin(bmt1 bmt2 bmt3 c1 c2)
2086 HashJoin(bmt1 bmt2 bmt3 bmt4 c1 c2)
2087 Leading(c2 c1 bmt1 bmt2 bmt3 bmt4)
2088 Leading(b1t2 b1t3 b1t4 b1t1)
2089 Leading(b2t3 b2t4 b2t1 b2t2)
2095 \! sql/maskout.sh results/ut-R.tmpout
2097 --------------------------------------------------------------------------------------------------------------------
2098 Aggregate (cost=xxx rows=1 width=xxx)
2100 -> Aggregate (cost=xxx rows=1 width=xxx)
2101 -> Nested Loop (cost=xxx rows=100 width=xxx)
2102 Join Filter: (b1t2.c1 = b1t1.c1)
2103 -> Hash Join (cost=xxx rows=100 width=xxx)
2104 Hash Cond: (b1t4.c1 = b1t2.c1)
2105 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
2106 -> Hash (cost=xxx rows=100 width=xxx)
2107 -> Merge Join (cost=xxx rows=100 width=xxx)
2108 Merge Cond: (b1t3.c1 = b1t2.c1)
2109 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
2110 -> Sort (cost=xxx rows=100 width=xxx)
2112 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
2113 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
2114 Index Cond: (c1 = b1t3.c1)
2116 -> Aggregate (cost=xxx rows=1 width=xxx)
2117 -> Nested Loop (cost=xxx rows=100 width=xxx)
2118 -> Hash Join (cost=xxx rows=1000 width=xxx)
2119 Hash Cond: (b2t3.c1 = b2t1.c1)
2120 -> Merge Join (cost=xxx rows=1130 width=xxx)
2121 Merge Cond: (b2t3.c1 = b2t4.c1)
2122 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
2123 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
2124 -> Hash (cost=xxx rows=1000 width=xxx)
2125 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
2126 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
2127 Index Cond: (c1 = b2t1.c1)
2128 -> Hash Join (cost=xxx rows=1 width=xxx)
2129 Hash Cond: (bmt4.c1 = bmt1.c1)
2130 -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
2131 -> Hash (cost=xxx rows=1 width=xxx)
2132 -> Merge Join (cost=xxx rows=1 width=xxx)
2133 Merge Cond: (bmt3.c1 = bmt1.c1)
2134 -> Index Only Scan using t3_i1 on t3 bmt3 (cost=xxx rows=1130 width=xxx)
2135 -> Sort (cost=xxx rows=1 width=xxx)
2137 -> Nested Loop (cost=xxx rows=1 width=xxx)
2138 -> Hash Join (cost=xxx rows=1 width=xxx)
2139 Hash Cond: (bmt1.c1 = c1.c1)
2140 -> Seq Scan on t1 bmt1 (cost=xxx rows=1000 width=xxx)
2141 -> Hash (cost=xxx rows=1 width=xxx)
2142 -> Merge Join (cost=xxx rows=1 width=xxx)
2143 Merge Cond: (c1.c1 = c2.c1)
2144 -> Sort (cost=xxx rows=1 width=xxx)
2146 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
2147 -> Sort (cost=xxx rows=1 width=xxx)
2149 -> CTE Scan on c2 (cost=xxx rows=1 width=xxx)
2150 -> Index Only Scan using t2_i1 on t2 bmt2 (cost=xxx rows=1 width=xxx)
2151 Index Cond: (c1 = bmt1.c1)
2154 \o results/ut-R.tmpout
2156 Leading(c2 c1 bmt1 bmt2 bmt3 bmt4)
2157 Leading(b1t2 b1t3 b1t4 b1t1)
2158 Leading(b2t3 b2t4 b2t1 b2t2)
2159 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)
2160 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
2161 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
2162 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)
2163 Rows(b1t2 b1t3 #1)Rows(b1t2 b1t3 b1t4 #1)Rows(b1t2 b1t3 b1t4 b1t1 #1)
2164 Rows(b2t3 b2t4 #1)Rows(b2t3 b2t4 b2t1 #1)Rows(b2t3 b2t4 b2t1 b2t2 #1)
2168 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
2171 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
2173 SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4
2175 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1
2177 AND bmt1.c1 = c2.c1;
2180 MergeJoin(b1t2 b1t3)
2181 MergeJoin(b2t3 b2t4)
2183 HashJoin(b1t2 b1t3 b1t4)
2184 HashJoin(b2t1 b2t3 b2t4)
2185 HashJoin(bmt1 c1 c2)
2186 NestLoop(b1t1 b1t2 b1t3 b1t4)
2187 NestLoop(b2t1 b2t2 b2t3 b2t4)
2188 NestLoop(bmt1 bmt2 c1 c2)
2189 MergeJoin(bmt1 bmt2 bmt3 c1 c2)
2190 HashJoin(bmt1 bmt2 bmt3 bmt4 c1 c2)
2191 Leading(c2 c1 bmt1 bmt2 bmt3 bmt4)
2192 Leading(b1t2 b1t3 b1t4 b1t1)
2193 Leading(b2t3 b2t4 b2t1 b2t2)
2197 Rows(b1t2 b1t3 b1t4 #1)
2198 Rows(b2t1 b2t3 b2t4 #1)
2200 Rows(b1t1 b1t2 b1t3 b1t4 #1)
2201 Rows(b2t1 b2t2 b2t3 b2t4 #1)
2202 Rows(bmt1 bmt2 c1 c2 #1)
2203 Rows(bmt1 bmt2 bmt3 c1 c2 #1)
2204 Rows(bmt1 bmt2 bmt3 bmt4 c1 c2 #1)
2210 \! sql/maskout.sh results/ut-R.tmpout
2212 --------------------------------------------------------------------------------------------------------------------
2213 Aggregate (cost=xxx rows=1 width=xxx)
2215 -> Aggregate (cost=xxx rows=1 width=xxx)
2216 -> Nested Loop (cost=xxx rows=1 width=xxx)
2217 Join Filter: (b1t2.c1 = b1t1.c1)
2218 -> Hash Join (cost=xxx rows=1 width=xxx)
2219 Hash Cond: (b1t4.c1 = b1t2.c1)
2220 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
2221 -> Hash (cost=xxx rows=1 width=xxx)
2222 -> Merge Join (cost=xxx rows=1 width=xxx)
2223 Merge Cond: (b1t3.c1 = b1t2.c1)
2224 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
2225 -> Sort (cost=xxx rows=100 width=xxx)
2227 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
2228 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
2229 Index Cond: (c1 = b1t3.c1)
2231 -> Aggregate (cost=xxx rows=1 width=xxx)
2232 -> Nested Loop (cost=xxx rows=1 width=xxx)
2233 -> Hash Join (cost=xxx rows=1 width=xxx)
2234 Hash Cond: (b2t1.c1 = b2t3.c1)
2235 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
2236 -> Hash (cost=xxx rows=1 width=xxx)
2237 -> Merge Join (cost=xxx rows=1 width=xxx)
2238 Merge Cond: (b2t3.c1 = b2t4.c1)
2239 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
2240 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
2241 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
2242 Index Cond: (c1 = b2t1.c1)
2243 -> Hash Join (cost=xxx rows=1 width=xxx)
2244 Hash Cond: (bmt4.c1 = bmt1.c1)
2245 -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
2246 -> Hash (cost=xxx rows=1 width=xxx)
2247 -> Merge Join (cost=xxx rows=1 width=xxx)
2248 Merge Cond: (bmt3.c1 = bmt1.c1)
2249 -> Index Only Scan using t3_i1 on t3 bmt3 (cost=xxx rows=1130 width=xxx)
2250 -> Sort (cost=xxx rows=1 width=xxx)
2252 -> Nested Loop (cost=xxx rows=1 width=xxx)
2253 -> Hash Join (cost=xxx rows=1 width=xxx)
2254 Hash Cond: (bmt1.c1 = c1.c1)
2255 -> Seq Scan on t1 bmt1 (cost=xxx rows=1000 width=xxx)
2256 -> Hash (cost=xxx rows=1 width=xxx)
2257 -> Merge Join (cost=xxx rows=1 width=xxx)
2258 Merge Cond: (c1.c1 = c2.c1)
2259 -> Sort (cost=xxx rows=1 width=xxx)
2261 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
2262 -> Sort (cost=xxx rows=1 width=xxx)
2264 -> CTE Scan on c2 (cost=xxx rows=1 width=xxx)
2265 -> Index Only Scan using t2_i1 on t2 bmt2 (cost=xxx rows=1 width=xxx)
2266 Index Cond: (c1 = bmt1.c1)
2270 \o results/ut-R.tmpout
2272 Leading(c3 c2 c1 bmt1 bmt2 bmt3 bmt4)
2273 Leading(b1t2 b1t3 b1t4 b1t1)
2274 Leading(b2t3 b2t4 b2t1 b2t2)
2275 Leading(b3t4 b3t1 b3t2 b3t3)
2276 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)
2277 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
2278 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
2279 MergeJoin(b3t4 b3t1)HashJoin(b3t4 b3t1 b3t2)NestLoop(b3t1 b3t2 b3t3 b3t4)
2283 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
2286 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
2289 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
2291 SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4
2293 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1
2296 AND bmt1.c1 = c3.c1;
2299 MergeJoin(b1t2 b1t3)
2300 MergeJoin(b2t3 b2t4)
2301 MergeJoin(b3t1 b3t4)
2303 HashJoin(b1t2 b1t3 b1t4)
2304 HashJoin(b2t1 b2t3 b2t4)
2305 HashJoin(b3t1 b3t2 b3t4)
2307 NestLoop(b1t1 b1t2 b1t3 b1t4)
2308 NestLoop(b2t1 b2t2 b2t3 b2t4)
2309 NestLoop(b3t1 b3t2 b3t3 b3t4)
2310 NestLoop(bmt1 c1 c2 c3)
2311 MergeJoin(bmt1 bmt2 c1 c2 c3)
2312 HashJoin(bmt1 bmt2 bmt3 c1 c2 c3)
2313 NestLoop(bmt1 bmt2 bmt3 bmt4 c1 c2 c3)
2314 Leading(c3 c2 c1 bmt1 bmt2 bmt3 bmt4)
2315 Leading(b1t2 b1t3 b1t4 b1t1)
2316 Leading(b2t3 b2t4 b2t1 b2t2)
2317 Leading(b3t4 b3t1 b3t2 b3t3)
2323 \! sql/maskout.sh results/ut-R.tmpout
2325 --------------------------------------------------------------------------------------------------------------------
2326 Aggregate (cost=xxx rows=1 width=xxx)
2328 -> Aggregate (cost=xxx rows=1 width=xxx)
2329 -> Nested Loop (cost=xxx rows=100 width=xxx)
2330 Join Filter: (b1t2.c1 = b1t1.c1)
2331 -> Hash Join (cost=xxx rows=100 width=xxx)
2332 Hash Cond: (b1t4.c1 = b1t2.c1)
2333 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
2334 -> Hash (cost=xxx rows=100 width=xxx)
2335 -> Merge Join (cost=xxx rows=100 width=xxx)
2336 Merge Cond: (b1t3.c1 = b1t2.c1)
2337 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
2338 -> Sort (cost=xxx rows=100 width=xxx)
2340 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
2341 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
2342 Index Cond: (c1 = b1t3.c1)
2344 -> Aggregate (cost=xxx rows=1 width=xxx)
2345 -> Nested Loop (cost=xxx rows=100 width=xxx)
2346 -> Hash Join (cost=xxx rows=1000 width=xxx)
2347 Hash Cond: (b2t3.c1 = b2t1.c1)
2348 -> Merge Join (cost=xxx rows=1130 width=xxx)
2349 Merge Cond: (b2t3.c1 = b2t4.c1)
2350 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
2351 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
2352 -> Hash (cost=xxx rows=1000 width=xxx)
2353 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
2354 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
2355 Index Cond: (c1 = b2t1.c1)
2357 -> Aggregate (cost=xxx rows=1 width=xxx)
2358 -> Nested Loop (cost=xxx rows=100 width=xxx)
2359 Join Filter: (b3t1.c1 = b3t3.c1)
2360 -> Hash Join (cost=xxx rows=100 width=xxx)
2361 Hash Cond: (b3t1.c1 = b3t2.c1)
2362 -> Merge Join (cost=xxx rows=1000 width=xxx)
2363 Merge Cond: (b3t1.c1 = b3t4.c1)
2364 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
2365 -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1130 width=xxx)
2366 -> Hash (cost=xxx rows=100 width=xxx)
2367 -> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
2368 -> Index Only Scan using t3_i1 on t3 b3t3 (cost=xxx rows=1 width=xxx)
2369 Index Cond: (c1 = b3t4.c1)
2370 -> Nested Loop (cost=xxx rows=1 width=xxx)
2371 Join Filter: (bmt1.c1 = bmt4.c1)
2372 -> Hash Join (cost=xxx rows=1 width=xxx)
2373 Hash Cond: (bmt3.c1 = bmt1.c1)
2374 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
2375 -> Hash (cost=xxx rows=1 width=xxx)
2376 -> Merge Join (cost=xxx rows=1 width=xxx)
2377 Merge Cond: (bmt1.c1 = bmt2.c1)
2378 -> Sort (cost=xxx rows=1 width=xxx)
2380 -> Nested Loop (cost=xxx rows=1 width=xxx)
2381 -> Hash Join (cost=xxx rows=1 width=xxx)
2382 Hash Cond: (c2.c1 = c1.c1)
2383 -> Merge Join (cost=xxx rows=1 width=xxx)
2384 Merge Cond: (c2.c1 = c3.c1)
2385 -> Sort (cost=xxx rows=1 width=xxx)
2387 -> CTE Scan on c2 (cost=xxx rows=1 width=xxx)
2388 -> Sort (cost=xxx rows=1 width=xxx)
2390 -> CTE Scan on c3 (cost=xxx rows=1 width=xxx)
2391 -> Hash (cost=xxx rows=1 width=xxx)
2392 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
2393 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1 width=xxx)
2394 Index Cond: (c1 = c1.c1)
2395 -> Sort (cost=xxx rows=100 width=xxx)
2397 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
2398 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
2399 Index Cond: (c1 = bmt3.c1)
2402 \o results/ut-R.tmpout
2404 Leading(c3 c2 c1 bmt1 bmt2 bmt3 bmt4)
2405 Leading(b1t2 b1t3 b1t4 b1t1)
2406 Leading(b2t3 b2t4 b2t1 b2t2)
2407 Leading(b3t4 b3t1 b3t2 b3t3)
2408 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)
2409 MergeJoin(b1t2 b1t3)HashJoin(b1t2 b1t3 b1t4)NestLoop(b1t2 b1t3 b1t4 b1t1)
2410 MergeJoin(b2t3 b2t4)HashJoin(b2t3 b2t4 b2t1)NestLoop(b2t3 b2t4 b2t1 b2t2)
2411 MergeJoin(b3t4 b3t1)HashJoin(b3t4 b3t1 b3t2)NestLoop(b3t1 b3t2 b3t3 b3t4)
2412 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)
2413 Rows(b1t2 b1t3 #1)Rows(b1t2 b1t3 b1t4 #1)Rows(b1t2 b1t3 b1t4 b1t1 #1)
2414 Rows(b2t3 b2t4 #1)Rows(b2t3 b2t4 b2t1 #1)Rows(b2t3 b2t4 b2t1 b2t2 #1)
2415 Rows(b3t4 b3t1 #1)Rows(b3t4 b3t1 b3t2 #1)Rows(b3t1 b3t2 b3t3 b3t4 #1)
2419 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
2422 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
2425 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
2427 SELECT max(bmt1.c1) FROM s1.t1 bmt1, s1.t2 bmt2, s1.t3 bmt3, s1.t4 bmt4
2429 WHERE bmt1.c1 = bmt2.c1 AND bmt1.c1 = bmt3.c1 AND bmt1.c1 = bmt4.c1
2432 AND bmt1.c1 = c3.c1;
2435 MergeJoin(b1t2 b1t3)
2436 MergeJoin(b2t3 b2t4)
2437 MergeJoin(b3t1 b3t4)
2439 HashJoin(b1t2 b1t3 b1t4)
2440 HashJoin(b2t1 b2t3 b2t4)
2441 HashJoin(b3t1 b3t2 b3t4)
2443 NestLoop(b1t1 b1t2 b1t3 b1t4)
2444 NestLoop(b2t1 b2t2 b2t3 b2t4)
2445 NestLoop(b3t1 b3t2 b3t3 b3t4)
2446 NestLoop(bmt1 c1 c2 c3)
2447 MergeJoin(bmt1 bmt2 c1 c2 c3)
2448 HashJoin(bmt1 bmt2 bmt3 c1 c2 c3)
2449 NestLoop(bmt1 bmt2 bmt3 bmt4 c1 c2 c3)
2450 Leading(c3 c2 c1 bmt1 bmt2 bmt3 bmt4)
2451 Leading(b1t2 b1t3 b1t4 b1t1)
2452 Leading(b2t3 b2t4 b2t1 b2t2)
2453 Leading(b3t4 b3t1 b3t2 b3t3)
2458 Rows(b1t2 b1t3 b1t4 #1)
2459 Rows(b2t1 b2t3 b2t4 #1)
2460 Rows(b3t1 b3t2 b3t4 #1)
2462 Rows(b1t1 b1t2 b1t3 b1t4 #1)
2463 Rows(b2t1 b2t2 b2t3 b2t4 #1)
2464 Rows(b3t1 b3t2 b3t3 b3t4 #1)
2465 Rows(bmt1 c1 c2 c3 #1)
2466 Rows(bmt1 bmt2 c1 c2 c3 #1)
2467 Rows(bmt1 bmt2 bmt3 c1 c2 c3 #1)
2468 Rows(bmt1 bmt2 bmt3 bmt4 c1 c2 c3 #1)
2474 \! sql/maskout.sh results/ut-R.tmpout
2476 --------------------------------------------------------------------------------------------------------------------
2477 Aggregate (cost=xxx rows=1 width=xxx)
2479 -> Aggregate (cost=xxx rows=1 width=xxx)
2480 -> Nested Loop (cost=xxx rows=1 width=xxx)
2481 Join Filter: (b1t2.c1 = b1t1.c1)
2482 -> Hash Join (cost=xxx rows=1 width=xxx)
2483 Hash Cond: (b1t4.c1 = b1t2.c1)
2484 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
2485 -> Hash (cost=xxx rows=1 width=xxx)
2486 -> Merge Join (cost=xxx rows=1 width=xxx)
2487 Merge Cond: (b1t3.c1 = b1t2.c1)
2488 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
2489 -> Sort (cost=xxx rows=100 width=xxx)
2491 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
2492 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
2493 Index Cond: (c1 = b1t3.c1)
2495 -> Aggregate (cost=xxx rows=1 width=xxx)
2496 -> Nested Loop (cost=xxx rows=1 width=xxx)
2497 -> Hash Join (cost=xxx rows=1 width=xxx)
2498 Hash Cond: (b2t1.c1 = b2t3.c1)
2499 -> Seq Scan on t1 b2t1 (cost=xxx rows=1000 width=xxx)
2500 -> Hash (cost=xxx rows=1 width=xxx)
2501 -> Merge Join (cost=xxx rows=1 width=xxx)
2502 Merge Cond: (b2t3.c1 = b2t4.c1)
2503 -> Index Only Scan using t3_i1 on t3 b2t3 (cost=xxx rows=1130 width=xxx)
2504 -> Index Only Scan using t4_i1 on t4 b2t4 (cost=xxx rows=1130 width=xxx)
2505 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
2506 Index Cond: (c1 = b2t1.c1)
2508 -> Aggregate (cost=xxx rows=1 width=xxx)
2509 -> Nested Loop (cost=xxx rows=1 width=xxx)
2510 Join Filter: (b3t1.c1 = b3t3.c1)
2511 -> Hash Join (cost=xxx rows=1 width=xxx)
2512 Hash Cond: (b3t1.c1 = b3t2.c1)
2513 -> Merge Join (cost=xxx rows=1 width=xxx)
2514 Merge Cond: (b3t1.c1 = b3t4.c1)
2515 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
2516 -> Index Only Scan using t4_i1 on t4 b3t4 (cost=xxx rows=1130 width=xxx)
2517 -> Hash (cost=xxx rows=100 width=xxx)
2518 -> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
2519 -> Index Only Scan using t3_i1 on t3 b3t3 (cost=xxx rows=1 width=xxx)
2520 Index Cond: (c1 = b3t4.c1)
2521 -> Nested Loop (cost=xxx rows=1 width=xxx)
2522 Join Filter: (bmt1.c1 = bmt4.c1)
2523 -> Hash Join (cost=xxx rows=1 width=xxx)
2524 Hash Cond: (bmt3.c1 = bmt1.c1)
2525 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
2526 -> Hash (cost=xxx rows=1 width=xxx)
2527 -> Merge Join (cost=xxx rows=1 width=xxx)
2528 Merge Cond: (bmt1.c1 = bmt2.c1)
2529 -> Sort (cost=xxx rows=1 width=xxx)
2531 -> Nested Loop (cost=xxx rows=1 width=xxx)
2532 -> Hash Join (cost=xxx rows=1 width=xxx)
2533 Hash Cond: (c2.c1 = c1.c1)
2534 -> Merge Join (cost=xxx rows=1 width=xxx)
2535 Merge Cond: (c2.c1 = c3.c1)
2536 -> Sort (cost=xxx rows=1 width=xxx)
2538 -> CTE Scan on c2 (cost=xxx rows=1 width=xxx)
2539 -> Sort (cost=xxx rows=1 width=xxx)
2541 -> CTE Scan on c3 (cost=xxx rows=1 width=xxx)
2542 -> Hash (cost=xxx rows=1 width=xxx)
2543 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
2544 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1 width=xxx)
2545 Index Cond: (c1 = c1.c1)
2546 -> Sort (cost=xxx rows=100 width=xxx)
2548 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
2549 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
2550 Index Cond: (c1 = bmt3.c1)
2554 ---- No. R-2-2 the number of the tables per quiry block
2557 \o results/ut-R.tmpout
2563 SELECT b1t1.c1 FROM s1.t1 b1t1 WHERE b1t1.c1 = 1
2566 SELECT b2t1.c1 FROM s1.t1 b2t1 WHERE b2t1.c1 = 1
2568 FROM s1.t1 bmt1, c1 WHERE bmt1.c1 = 1
2571 SELECT b3t1.c1 FROM s1.t1 b3t1 WHERE b3t1.c1 = 1
2581 \! sql/maskout.sh results/ut-R.tmpout
2583 ----------------------------------------------------------------------------------
2584 Nested Loop (cost=xxx rows=1 width=xxx)
2586 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
2587 Index Cond: (c1 = 1)
2588 InitPlan 2 (returns $1)
2589 -> Index Only Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1 width=xxx)
2590 Index Cond: (c1 = 1)
2591 InitPlan 3 (returns $2)
2592 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1 width=xxx)
2593 Index Cond: (c1 = 1)
2594 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1 width=xxx)
2595 Index Cond: (c1 = 1)
2597 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
2601 \o results/ut-R.tmpout
2611 SELECT b1t1.c1 FROM s1.t1 b1t1 WHERE b1t1.c1 = 1
2614 SELECT b2t1.c1 FROM s1.t1 b2t1 WHERE b2t1.c1 = 1
2616 FROM s1.t1 bmt1, c1 WHERE bmt1.c1 = 1
2619 SELECT b3t1.c1 FROM s1.t1 b3t1 WHERE b3t1.c1 = 1
2633 \! sql/maskout.sh results/ut-R.tmpout
2635 ----------------------------------------------------------------------------------
2636 Nested Loop (cost=xxx rows=1 width=xxx)
2638 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
2639 Index Cond: (c1 = 1)
2640 InitPlan 2 (returns $1)
2641 -> Index Only Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1 width=xxx)
2642 Index Cond: (c1 = 1)
2643 InitPlan 3 (returns $2)
2644 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1 width=xxx)
2645 Index Cond: (c1 = 1)
2646 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1 width=xxx)
2647 Index Cond: (c1 = 1)
2649 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
2654 \o results/ut-R.tmpout
2656 Leading(c1 bmt2 bmt1)
2661 HashJoin(c1 bmt1 bmt2)
2662 MergeJoin(b1t1 b1t2)
2663 MergeJoin(b2t1 b2t2)
2664 MergeJoin(b3t1 b3t2)
2668 SELECT b1t1.c1 FROM s1.t1 b1t1, s1.t2 b1t2 WHERE b1t1.c1 = b1t2.c1
2671 SELECT b2t1.c1 FROM s1.t1 b2t1, s1.t2 b2t2 WHERE b2t1.c1 = b2t2.c1
2673 FROM s1.t1 bmt1, s1.t2 bmt2, c1 WHERE bmt1.c1 = bmt2.c1
2676 SELECT b3t1.c1 FROM s1.t1 b3t1, s1.t2 b3t2 WHERE b3t1.c1 = b3t2.c1
2680 MergeJoin(b1t1 b1t2)
2681 MergeJoin(b2t1 b2t2)
2682 MergeJoin(b3t1 b3t2)
2684 HashJoin(bmt1 bmt2 c1)
2685 Leading(c1 bmt2 bmt1)
2694 \! sql/maskout.sh results/ut-R.tmpout
2696 --------------------------------------------------------------------------------------------
2697 Hash Join (cost=xxx rows=10 width=xxx)
2698 Hash Cond: (bmt1.c1 = bmt2.c1)
2700 -> Merge Join (cost=xxx rows=100 width=xxx)
2701 Merge Cond: (b1t1.c1 = b1t2.c1)
2702 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1000 width=xxx)
2703 -> Sort (cost=xxx rows=100 width=xxx)
2705 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
2706 InitPlan 2 (returns $1)
2707 -> Merge Join (cost=xxx rows=100 width=xxx)
2708 Merge Cond: (b2t1.c1 = b2t2.c1)
2709 -> Index Only Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1000 width=xxx)
2710 -> Sort (cost=xxx rows=100 width=xxx)
2712 -> Seq Scan on t2 b2t2 (cost=xxx rows=100 width=xxx)
2713 InitPlan 3 (returns $2)
2714 -> Merge Join (cost=xxx rows=100 width=xxx)
2715 Merge Cond: (b3t1.c1 = b3t2.c1)
2716 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
2717 -> Sort (cost=xxx rows=100 width=xxx)
2719 -> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
2720 -> Seq Scan on t1 bmt1 (cost=xxx rows=999 width=xxx)
2722 -> Hash (cost=xxx rows=100 width=xxx)
2723 -> Merge Join (cost=xxx rows=100 width=xxx)
2724 Merge Cond: (bmt2.c1 = c1.c1)
2725 -> Sort (cost=xxx rows=100 width=xxx)
2727 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
2728 -> Sort (cost=xxx rows=100 width=xxx)
2730 -> CTE Scan on c1 (cost=xxx rows=100 width=xxx)
2733 \o results/ut-R.tmpout
2735 Leading(c1 bmt2 bmt1)
2740 HashJoin(c1 bmt1 bmt2)
2741 MergeJoin(b1t1 b1t2)
2742 MergeJoin(b2t1 b2t2)
2743 MergeJoin(b3t1 b3t2)
2745 Rows(c1 bmt1 bmt2 #1)
2752 SELECT b1t1.c1 FROM s1.t1 b1t1, s1.t2 b1t2 WHERE b1t1.c1 = b1t2.c1
2755 SELECT b2t1.c1 FROM s1.t1 b2t1, s1.t2 b2t2 WHERE b2t1.c1 = b2t2.c1
2757 FROM s1.t1 bmt1, s1.t2 bmt2, c1 WHERE bmt1.c1 = bmt2.c1
2760 SELECT b3t1.c1 FROM s1.t1 b3t1, s1.t2 b3t2 WHERE b3t1.c1 = b3t2.c1
2765 MergeJoin(b1t1 b1t2)
2766 MergeJoin(b2t1 b2t2)
2767 MergeJoin(b3t1 b3t2)
2769 HashJoin(bmt1 bmt2 c1)
2770 Leading(c1 bmt2 bmt1)
2778 Rows(bmt1 bmt2 c1 #1)
2784 \! sql/maskout.sh results/ut-R.tmpout
2786 --------------------------------------------------------------------------------------------
2787 Hash Join (cost=xxx rows=1 width=xxx)
2788 Hash Cond: (bmt1.c1 = bmt2.c1)
2790 -> Merge Join (cost=xxx rows=1 width=xxx)
2791 Merge Cond: (b1t1.c1 = b1t2.c1)
2792 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1000 width=xxx)
2793 -> Sort (cost=xxx rows=100 width=xxx)
2795 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
2796 InitPlan 2 (returns $1)
2797 -> Merge Join (cost=xxx rows=1 width=xxx)
2798 Merge Cond: (b2t1.c1 = b2t2.c1)
2799 -> Index Only Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1000 width=xxx)
2800 -> Sort (cost=xxx rows=100 width=xxx)
2802 -> Seq Scan on t2 b2t2 (cost=xxx rows=100 width=xxx)
2803 InitPlan 3 (returns $2)
2804 -> Merge Join (cost=xxx rows=1 width=xxx)
2805 Merge Cond: (b3t1.c1 = b3t2.c1)
2806 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
2807 -> Sort (cost=xxx rows=100 width=xxx)
2809 -> Seq Scan on t2 b3t2 (cost=xxx rows=100 width=xxx)
2810 -> Seq Scan on t1 bmt1 (cost=xxx rows=999 width=xxx)
2812 -> Hash (cost=xxx rows=1 width=xxx)
2813 -> Merge Join (cost=xxx rows=1 width=xxx)
2814 Merge Cond: (bmt2.c1 = c1.c1)
2815 -> Sort (cost=xxx rows=100 width=xxx)
2817 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
2818 -> Sort (cost=xxx rows=1 width=xxx)
2820 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
2824 \o results/ut-R.tmpout
2826 Leading(c1 bmt4 bmt3 bmt2 bmt1)
2827 Leading(b1t4 b1t3 b1t2 b1t1)
2828 Leading(b2t4 b2t3 b2t2 b2t1)
2829 Leading(b3t4 b3t3 b3t2 b3t1)
2831 HashJoin(c1 bmt4 bmt3)
2832 NestLoop(c1 bmt4 bmt3 bmt2)
2833 MergeJoin(c1 bmt4 bmt3 bmt2 bmt1)
2835 NestLoop(b1t4 b1t3 b1t2)
2836 MergeJoin(b1t4 b1t3 b1t2 b1t1)
2838 NestLoop(b2t4 b2t3 b2t2)
2839 MergeJoin(b2t4 b2t3 b2t2 b2t1)
2841 NestLoop(b3t4 b3t3 b3t2)
2842 MergeJoin(b3t4 b3t3 b3t2 b3t1)
2846 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
2849 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
2851 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
2853 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
2861 NestLoop(b1t2 b1t3 b1t4)
2862 NestLoop(b2t2 b2t3 b2t4)
2863 NestLoop(b3t2 b3t3 b3t4)
2864 HashJoin(bmt3 bmt4 c1)
2865 MergeJoin(b1t1 b1t2 b1t3 b1t4)
2866 MergeJoin(b2t1 b2t2 b2t3 b2t4)
2867 MergeJoin(b3t1 b3t2 b3t3 b3t4)
2868 NestLoop(bmt2 bmt3 bmt4 c1)
2869 MergeJoin(bmt1 bmt2 bmt3 bmt4 c1)
2870 Leading(c1 bmt4 bmt3 bmt2 bmt1)
2871 Leading(b1t4 b1t3 b1t2 b1t1)
2872 Leading(b2t4 b2t3 b2t2 b2t1)
2873 Leading(b3t4 b3t3 b3t2 b3t1)
2879 \! sql/maskout.sh results/ut-R.tmpout
2881 ------------------------------------------------------------------------------------------------------------------
2882 Merge Join (cost=xxx rows=10 width=xxx)
2883 Merge Cond: (bmt1.c1 = bmt2.c1)
2885 -> Merge Join (cost=xxx rows=100 width=xxx)
2886 Merge Cond: (b1t1.c1 = b1t2.c1)
2887 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1000 width=xxx)
2888 -> Sort (cost=xxx rows=100 width=xxx)
2890 -> Nested Loop (cost=xxx rows=100 width=xxx)
2891 -> Hash Join (cost=xxx rows=1130 width=xxx)
2892 Hash Cond: (b1t3.c1 = b1t4.c1)
2893 -> Seq Scan on t3 b1t3 (cost=xxx rows=1130 width=xxx)
2894 -> Hash (cost=xxx rows=1130 width=xxx)
2895 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
2896 -> Index Only Scan using t2_i1 on t2 b1t2 (cost=xxx rows=1 width=xxx)
2897 Index Cond: (c1 = b1t3.c1)
2898 InitPlan 2 (returns $3)
2899 -> Merge Join (cost=xxx rows=100 width=xxx)
2900 Merge Cond: (b2t1.c1 = b2t2.c1)
2901 -> Index Only Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1000 width=xxx)
2902 -> Sort (cost=xxx rows=100 width=xxx)
2904 -> Nested Loop (cost=xxx rows=100 width=xxx)
2905 -> Hash Join (cost=xxx rows=1130 width=xxx)
2906 Hash Cond: (b2t3.c1 = b2t4.c1)
2907 -> Seq Scan on t3 b2t3 (cost=xxx rows=1130 width=xxx)
2908 -> Hash (cost=xxx rows=1130 width=xxx)
2909 -> Seq Scan on t4 b2t4 (cost=xxx rows=1130 width=xxx)
2910 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
2911 Index Cond: (c1 = b2t3.c1)
2912 InitPlan 3 (returns $5)
2913 -> Merge Join (cost=xxx rows=100 width=xxx)
2914 Merge Cond: (b3t1.c1 = b3t2.c1)
2915 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
2916 -> Sort (cost=xxx rows=100 width=xxx)
2918 -> Nested Loop (cost=xxx rows=100 width=xxx)
2919 -> Hash Join (cost=xxx rows=1130 width=xxx)
2920 Hash Cond: (b3t3.c1 = b3t4.c1)
2921 -> Seq Scan on t3 b3t3 (cost=xxx rows=1130 width=xxx)
2922 -> Hash (cost=xxx rows=1130 width=xxx)
2923 -> Seq Scan on t4 b3t4 (cost=xxx rows=1130 width=xxx)
2924 -> Index Only Scan using t2_i1 on t2 b3t2 (cost=xxx rows=1 width=xxx)
2925 Index Cond: (c1 = b3t3.c1)
2926 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=999 width=xxx)
2928 -> Sort (cost=xxx rows=100 width=xxx)
2930 -> Nested Loop (cost=xxx rows=100 width=xxx)
2931 -> Hash Join (cost=xxx rows=100 width=xxx)
2932 Hash Cond: (bmt3.c1 = bmt4.c1)
2933 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
2934 -> Hash (cost=xxx rows=100 width=xxx)
2935 -> Merge Join (cost=xxx rows=100 width=xxx)
2936 Merge Cond: (bmt4.c1 = c1.c1)
2937 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1130 width=xxx)
2938 -> Sort (cost=xxx rows=100 width=xxx)
2940 -> CTE Scan on c1 (cost=xxx rows=100 width=xxx)
2941 -> Index Only Scan using t2_i1 on t2 bmt2 (cost=xxx rows=1 width=xxx)
2942 Index Cond: (c1 = bmt3.c1)
2945 \o results/ut-R.tmpout
2947 Leading(c1 bmt4 bmt3 bmt2 bmt1)
2948 Leading(b1t4 b1t3 b1t2 b1t1)
2949 Leading(b2t4 b2t3 b2t2 b2t1)
2950 Leading(b3t4 b3t3 b3t2 b3t1)
2952 HashJoin(c1 bmt4 bmt3)
2953 NestLoop(c1 bmt4 bmt3 bmt2)
2954 MergeJoin(c1 bmt4 bmt3 bmt2 bmt1)
2956 NestLoop(b1t4 b1t3 b1t2)
2957 MergeJoin(b1t4 b1t3 b1t2 b1t1)
2959 NestLoop(b2t4 b2t3 b2t2)
2960 MergeJoin(b2t4 b2t3 b2t2 b2t1)
2962 NestLoop(b3t4 b3t3 b3t2)
2963 MergeJoin(b3t4 b3t3 b3t2 b3t1)
2965 Rows(c1 bmt4 bmt3 #1)
2966 Rows(c1 bmt4 bmt3 bmt2 #1)
2967 Rows(c1 bmt4 bmt3 bmt2 bmt1 #1)
2969 Rows(b1t4 b1t3 b1t2 #1)
2970 Rows(b1t4 b1t3 b1t2 b1t1 #1)
2972 Rows(b2t4 b2t3 b2t2 #1)
2973 Rows(b2t4 b2t3 b2t2 b2t1 #1)
2975 Rows(b3t4 b3t3 b3t2 #1)
2976 Rows(b3t4 b3t3 b3t2 b3t1 #1)
2980 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
2983 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
2985 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
2987 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
2995 NestLoop(b1t2 b1t3 b1t4)
2996 NestLoop(b2t2 b2t3 b2t4)
2997 NestLoop(b3t2 b3t3 b3t4)
2998 HashJoin(bmt3 bmt4 c1)
2999 MergeJoin(b1t1 b1t2 b1t3 b1t4)
3000 MergeJoin(b2t1 b2t2 b2t3 b2t4)
3001 MergeJoin(b3t1 b3t2 b3t3 b3t4)
3002 NestLoop(bmt2 bmt3 bmt4 c1)
3003 MergeJoin(bmt1 bmt2 bmt3 bmt4 c1)
3004 Leading(c1 bmt4 bmt3 bmt2 bmt1)
3005 Leading(b1t4 b1t3 b1t2 b1t1)
3006 Leading(b2t4 b2t3 b2t2 b2t1)
3007 Leading(b3t4 b3t3 b3t2 b3t1)
3012 Rows(b1t2 b1t3 b1t4 #1)
3013 Rows(b2t2 b2t3 b2t4 #1)
3014 Rows(b3t2 b3t3 b3t4 #1)
3015 Rows(bmt3 bmt4 c1 #1)
3016 Rows(b1t1 b1t2 b1t3 b1t4 #1)
3017 Rows(b2t1 b2t2 b2t3 b2t4 #1)
3018 Rows(b3t1 b3t2 b3t3 b3t4 #1)
3019 Rows(bmt2 bmt3 bmt4 c1 #1)
3020 Rows(bmt1 bmt2 bmt3 bmt4 c1 #1)
3026 \! sql/maskout.sh results/ut-R.tmpout
3028 ------------------------------------------------------------------------------------------------------------------
3029 Merge Join (cost=xxx rows=1 width=xxx)
3030 Merge Cond: (bmt1.c1 = bmt2.c1)
3032 -> Merge Join (cost=xxx rows=1 width=xxx)
3033 Merge Cond: (b1t1.c1 = b1t2.c1)
3034 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1000 width=xxx)
3035 -> Sort (cost=xxx rows=1 width=xxx)
3037 -> Nested Loop (cost=xxx rows=1 width=xxx)
3038 -> Hash Join (cost=xxx rows=1 width=xxx)
3039 Hash Cond: (b1t3.c1 = b1t4.c1)
3040 -> Seq Scan on t3 b1t3 (cost=xxx rows=1130 width=xxx)
3041 -> Hash (cost=xxx rows=1130 width=xxx)
3042 -> Seq Scan on t4 b1t4 (cost=xxx rows=1130 width=xxx)
3043 -> Index Only Scan using t2_i1 on t2 b1t2 (cost=xxx rows=1 width=xxx)
3044 Index Cond: (c1 = b1t3.c1)
3045 InitPlan 2 (returns $3)
3046 -> Merge Join (cost=xxx rows=1 width=xxx)
3047 Merge Cond: (b2t1.c1 = b2t2.c1)
3048 -> Index Only Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1000 width=xxx)
3049 -> Sort (cost=xxx rows=1 width=xxx)
3051 -> Nested Loop (cost=xxx rows=1 width=xxx)
3052 -> Hash Join (cost=xxx rows=1 width=xxx)
3053 Hash Cond: (b2t3.c1 = b2t4.c1)
3054 -> Seq Scan on t3 b2t3 (cost=xxx rows=1130 width=xxx)
3055 -> Hash (cost=xxx rows=1130 width=xxx)
3056 -> Seq Scan on t4 b2t4 (cost=xxx rows=1130 width=xxx)
3057 -> Index Only Scan using t2_i1 on t2 b2t2 (cost=xxx rows=1 width=xxx)
3058 Index Cond: (c1 = b2t3.c1)
3059 InitPlan 3 (returns $5)
3060 -> Merge Join (cost=xxx rows=1 width=xxx)
3061 Merge Cond: (b3t1.c1 = b3t2.c1)
3062 -> Index Only Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1000 width=xxx)
3063 -> Sort (cost=xxx rows=1 width=xxx)
3065 -> Nested Loop (cost=xxx rows=1 width=xxx)
3066 -> Hash Join (cost=xxx rows=1 width=xxx)
3067 Hash Cond: (b3t3.c1 = b3t4.c1)
3068 -> Seq Scan on t3 b3t3 (cost=xxx rows=1130 width=xxx)
3069 -> Hash (cost=xxx rows=1130 width=xxx)
3070 -> Seq Scan on t4 b3t4 (cost=xxx rows=1130 width=xxx)
3071 -> Index Only Scan using t2_i1 on t2 b3t2 (cost=xxx rows=1 width=xxx)
3072 Index Cond: (c1 = b3t3.c1)
3073 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=999 width=xxx)
3075 -> Sort (cost=xxx rows=1 width=xxx)
3077 -> Nested Loop (cost=xxx rows=1 width=xxx)
3078 -> Hash Join (cost=xxx rows=1 width=xxx)
3079 Hash Cond: (bmt3.c1 = bmt4.c1)
3080 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
3081 -> Hash (cost=xxx rows=1 width=xxx)
3082 -> Merge Join (cost=xxx rows=1 width=xxx)
3083 Merge Cond: (bmt4.c1 = c1.c1)
3084 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1130 width=xxx)
3085 -> Sort (cost=xxx rows=1 width=xxx)
3087 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
3088 -> Index Only Scan using t2_i1 on t2 bmt2 (cost=xxx rows=1 width=xxx)
3089 Index Cond: (c1 = bmt3.c1)
3093 \o results/ut-R.tmpout
3095 Leading(c1 bmt4 bmt3 bmt2 bmt1)
3096 Leading(b1t4 b1t3 b1t2 b1t1)
3098 HashJoin(c1 bmt4 bmt3)
3099 NestLoop(c1 bmt4 bmt3 bmt2)
3100 MergeJoin(c1 bmt4 bmt3 bmt2 bmt1)
3101 MergeJoin(b1t4 b1t3)
3102 HashJoin(b1t4 b1t3 b1t2)
3103 NestLoop(b1t4 b1t3 b1t2 b1t1)
3107 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
3110 SELECT b2t1.c1 FROM s1.t1 b2t1 WHERE b2t1.c1 = 1
3112 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
3114 SELECT b3t1.c1 FROM s1.t1 b3t1
3118 MergeJoin(b1t3 b1t4)
3120 HashJoin(b1t2 b1t3 b1t4)
3121 HashJoin(bmt3 bmt4 c1)
3122 NestLoop(b1t1 b1t2 b1t3 b1t4)
3123 NestLoop(bmt2 bmt3 bmt4 c1)
3124 MergeJoin(bmt1 bmt2 bmt3 bmt4 c1)
3125 Leading(c1 bmt4 bmt3 bmt2 bmt1)
3126 Leading(b1t4 b1t3 b1t2 b1t1)
3132 \! sql/maskout.sh results/ut-R.tmpout
3134 ------------------------------------------------------------------------------------------------------------------
3135 Merge Join (cost=xxx rows=10 width=xxx)
3136 Merge Cond: (bmt1.c1 = bmt2.c1)
3138 -> Nested Loop (cost=xxx rows=100 width=xxx)
3139 Join Filter: (b1t2.c1 = b1t1.c1)
3140 -> Hash Join (cost=xxx rows=100 width=xxx)
3141 Hash Cond: (b1t3.c1 = b1t2.c1)
3142 -> Merge Join (cost=xxx rows=1130 width=xxx)
3143 Merge Cond: (b1t3.c1 = b1t4.c1)
3144 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
3145 -> Index Only Scan using t4_i1 on t4 b1t4 (cost=xxx rows=1130 width=xxx)
3146 -> Hash (cost=xxx rows=100 width=xxx)
3147 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
3148 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
3149 Index Cond: (c1 = b1t3.c1)
3150 InitPlan 2 (returns $2)
3151 -> Index Only Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1 width=xxx)
3152 Index Cond: (c1 = 1)
3153 InitPlan 3 (returns $3)
3154 -> Seq Scan on t1 b3t1 (cost=xxx rows=1000 width=xxx)
3155 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=999 width=xxx)
3157 -> Sort (cost=xxx rows=100 width=xxx)
3159 -> Nested Loop (cost=xxx rows=100 width=xxx)
3160 -> Hash Join (cost=xxx rows=100 width=xxx)
3161 Hash Cond: (bmt3.c1 = bmt4.c1)
3162 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
3163 -> Hash (cost=xxx rows=100 width=xxx)
3164 -> Merge Join (cost=xxx rows=100 width=xxx)
3165 Merge Cond: (bmt4.c1 = c1.c1)
3166 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1130 width=xxx)
3167 -> Sort (cost=xxx rows=100 width=xxx)
3169 -> CTE Scan on c1 (cost=xxx rows=100 width=xxx)
3170 -> Index Only Scan using t2_i1 on t2 bmt2 (cost=xxx rows=1 width=xxx)
3171 Index Cond: (c1 = bmt3.c1)
3174 \o results/ut-R.tmpout
3176 Leading(c1 bmt4 bmt3 bmt2 bmt1)
3177 Leading(b1t4 b1t3 b1t2 b1t1)
3179 HashJoin(c1 bmt4 bmt3)
3180 NestLoop(c1 bmt4 bmt3 bmt2)
3181 MergeJoin(c1 bmt4 bmt3 bmt2 bmt1)
3182 MergeJoin(b1t4 b1t3)
3183 HashJoin(b1t4 b1t3 b1t2)
3184 NestLoop(b1t4 b1t3 b1t2 b1t1)
3186 Rows(c1 bmt4 bmt3 #1)
3187 Rows(c1 bmt4 bmt3 bmt2 #1)
3188 Rows(c1 bmt4 bmt3 bmt2 bmt1 #1)
3190 Rows(b1t4 b1t3 b1t2 #1)
3191 Rows(b1t4 b1t3 b1t2 b1t1 #1)
3195 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
3198 SELECT b2t1.c1 FROM s1.t1 b2t1 WHERE b2t1.c1 = 1
3200 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
3202 SELECT b3t1.c1 FROM s1.t1 b3t1
3206 MergeJoin(b1t3 b1t4)
3208 HashJoin(b1t2 b1t3 b1t4)
3209 HashJoin(bmt3 bmt4 c1)
3210 NestLoop(b1t1 b1t2 b1t3 b1t4)
3211 NestLoop(bmt2 bmt3 bmt4 c1)
3212 MergeJoin(bmt1 bmt2 bmt3 bmt4 c1)
3213 Leading(c1 bmt4 bmt3 bmt2 bmt1)
3214 Leading(b1t4 b1t3 b1t2 b1t1)
3217 Rows(b1t2 b1t3 b1t4 #1)
3218 Rows(bmt3 bmt4 c1 #1)
3219 Rows(b1t1 b1t2 b1t3 b1t4 #1)
3220 Rows(bmt2 bmt3 bmt4 c1 #1)
3221 Rows(bmt1 bmt2 bmt3 bmt4 c1 #1)
3227 \! sql/maskout.sh results/ut-R.tmpout
3229 ------------------------------------------------------------------------------------------------------------------
3230 Merge Join (cost=xxx rows=1 width=xxx)
3231 Merge Cond: (bmt1.c1 = bmt2.c1)
3233 -> Nested Loop (cost=xxx rows=1 width=xxx)
3234 Join Filter: (b1t2.c1 = b1t1.c1)
3235 -> Hash Join (cost=xxx rows=1 width=xxx)
3236 Hash Cond: (b1t3.c1 = b1t2.c1)
3237 -> Merge Join (cost=xxx rows=1 width=xxx)
3238 Merge Cond: (b1t3.c1 = b1t4.c1)
3239 -> Index Only Scan using t3_i1 on t3 b1t3 (cost=xxx rows=1130 width=xxx)
3240 -> Index Only Scan using t4_i1 on t4 b1t4 (cost=xxx rows=1130 width=xxx)
3241 -> Hash (cost=xxx rows=100 width=xxx)
3242 -> Seq Scan on t2 b1t2 (cost=xxx rows=100 width=xxx)
3243 -> Index Only Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
3244 Index Cond: (c1 = b1t3.c1)
3245 InitPlan 2 (returns $2)
3246 -> Index Only Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1 width=xxx)
3247 Index Cond: (c1 = 1)
3248 InitPlan 3 (returns $3)
3249 -> Seq Scan on t1 b3t1 (cost=xxx rows=1000 width=xxx)
3250 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=999 width=xxx)
3252 -> Sort (cost=xxx rows=1 width=xxx)
3254 -> Nested Loop (cost=xxx rows=1 width=xxx)
3255 -> Hash Join (cost=xxx rows=1 width=xxx)
3256 Hash Cond: (bmt3.c1 = bmt4.c1)
3257 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
3258 -> Hash (cost=xxx rows=1 width=xxx)
3259 -> Merge Join (cost=xxx rows=1 width=xxx)
3260 Merge Cond: (bmt4.c1 = c1.c1)
3261 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1130 width=xxx)
3262 -> Sort (cost=xxx rows=1 width=xxx)
3264 -> CTE Scan on c1 (cost=xxx rows=1 width=xxx)
3265 -> Index Only Scan using t2_i1 on t2 bmt2 (cost=xxx rows=1 width=xxx)
3266 Index Cond: (c1 = bmt3.c1)
3270 ---- No. R-2-3 RULE or VIEW
3273 \o results/ut-R.tmpout
3275 Leading(r1 t1 t2 t3 t4)
3277 EXPLAIN UPDATE s1.r1 SET c1 = c1 WHERE c1 = 1;
3280 Leading(r1 t1 t2 t3 t4)
3286 \! sql/maskout.sh results/ut-R.tmpout
3288 -----------------------------------------------------------------------------------------------
3289 Aggregate (cost=xxx rows=1 width=xxx)
3290 -> Nested Loop (cost=xxx rows=1 width=xxx)
3291 Join Filter: (t1.c1 = t4.c1)
3292 -> Nested Loop (cost=xxx rows=1 width=xxx)
3293 Join Filter: (t1.c1 = t3.c1)
3294 -> Merge Join (cost=xxx rows=1 width=xxx)
3295 Merge Cond: (t1.c1 = t2.c1)
3296 -> Nested Loop (cost=xxx rows=6 width=xxx)
3297 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
3298 Filter: (ctid = '(1,1)'::tid)
3299 -> Seq Scan on r1 (cost=xxx rows=6 width=xxx)
3301 -> Sort (cost=xxx rows=1 width=xxx)
3303 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3304 Filter: (ctid = '(1,1)'::tid)
3305 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3306 TID Cond: (ctid = '(1,1)'::tid)
3307 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3308 TID Cond: (ctid = '(1,1)'::tid)
3311 \o results/ut-R.tmpout
3313 Leading(r1 t1 t2 t3 t4)
3314 Rows(r1 t1 t2 t3 t4 #2)
3315 Rows(r1 t1 t2 t3 #2)
3319 EXPLAIN UPDATE s1.r1 SET c1 = c1 WHERE c1 = 1;
3322 Leading(r1 t1 t2 t3 t4)
3325 Rows(r1 t1 t2 t3 #2)
3326 Rows(r1 t1 t2 t3 t4 #2)
3332 \! sql/maskout.sh results/ut-R.tmpout
3334 ---------------------------------------------------------------------------------
3335 Aggregate (cost=xxx rows=1 width=xxx)
3336 -> Nested Loop (cost=xxx rows=2 width=xxx)
3337 Join Filter: (t1.c1 = t4.c1)
3338 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3339 TID Cond: (ctid = '(1,1)'::tid)
3340 -> Nested Loop (cost=xxx rows=2 width=xxx)
3341 Join Filter: (t1.c1 = t3.c1)
3342 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3343 TID Cond: (ctid = '(1,1)'::tid)
3344 -> Nested Loop (cost=xxx rows=2 width=xxx)
3345 Join Filter: (t1.c1 = t2.c1)
3346 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3347 Filter: (ctid = '(1,1)'::tid)
3348 -> Nested Loop (cost=xxx rows=2 width=xxx)
3349 -> Tid Scan on t1 (cost=xxx rows=1 width=xxx)
3350 TID Cond: (ctid = '(1,1)'::tid)
3351 -> Seq Scan on r1 (cost=xxx rows=6 width=xxx)
3355 \o results/ut-R.tmpout
3357 Leading(r1_ b1t1 b1t2 b1t3 b1t4)
3359 EXPLAIN UPDATE s1.r1_ SET c1 = c1 WHERE c1 = 1;
3362 Leading(r1_ b1t1 b1t2 b1t3 b1t4)
3368 \! sql/maskout.sh results/ut-R.tmpout
3370 ----------------------------------------------------------------------------------------------------
3371 Aggregate (cost=xxx rows=1 width=xxx)
3372 -> Nested Loop (cost=xxx rows=1 width=xxx)
3373 Join Filter: (b1t1.c1 = b1t4.c1)
3374 -> Nested Loop (cost=xxx rows=1 width=xxx)
3375 Join Filter: (b1t1.c1 = b1t3.c1)
3376 -> Merge Join (cost=xxx rows=1 width=xxx)
3377 Merge Cond: (b1t1.c1 = b1t2.c1)
3378 -> Nested Loop (cost=xxx rows=6 width=xxx)
3379 -> Index Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
3380 Filter: (ctid = '(1,1)'::tid)
3381 -> Seq Scan on r1_ (cost=xxx rows=6 width=xxx)
3383 -> Sort (cost=xxx rows=1 width=xxx)
3385 -> Seq Scan on t2 b1t2 (cost=xxx rows=1 width=xxx)
3386 Filter: (ctid = '(1,1)'::tid)
3387 -> Tid Scan on t3 b1t3 (cost=xxx rows=1 width=xxx)
3388 TID Cond: (ctid = '(1,1)'::tid)
3389 -> Tid Scan on t4 b1t4 (cost=xxx rows=1 width=xxx)
3390 TID Cond: (ctid = '(1,1)'::tid)
3393 \o results/ut-R.tmpout
3395 Leading(r1_ b1t1 b1t2 b1t3 b1t4)
3396 Rows(r1_ b1t1 b1t2 b1t3 b1t4 #2)
3397 Rows(r1_ b1t1 b1t2 b1t3 #2)
3398 Rows(r1_ b1t1 b1t2 #2)
3401 EXPLAIN UPDATE s1.r1_ SET c1 = c1 WHERE c1 = 1;
3404 Leading(r1_ b1t1 b1t2 b1t3 b1t4)
3406 Rows(b1t1 b1t2 r1_ #2)
3407 Rows(b1t1 b1t2 b1t3 r1_ #2)
3408 Rows(b1t1 b1t2 b1t3 b1t4 r1_ #2)
3414 \! sql/maskout.sh results/ut-R.tmpout
3416 -------------------------------------------------------------------------------------
3417 Aggregate (cost=xxx rows=1 width=xxx)
3418 -> Nested Loop (cost=xxx rows=2 width=xxx)
3419 Join Filter: (b1t1.c1 = b1t4.c1)
3420 -> Tid Scan on t4 b1t4 (cost=xxx rows=1 width=xxx)
3421 TID Cond: (ctid = '(1,1)'::tid)
3422 -> Nested Loop (cost=xxx rows=2 width=xxx)
3423 Join Filter: (b1t1.c1 = b1t3.c1)
3424 -> Tid Scan on t3 b1t3 (cost=xxx rows=1 width=xxx)
3425 TID Cond: (ctid = '(1,1)'::tid)
3426 -> Nested Loop (cost=xxx rows=2 width=xxx)
3427 Join Filter: (b1t1.c1 = b1t2.c1)
3428 -> Seq Scan on t2 b1t2 (cost=xxx rows=1 width=xxx)
3429 Filter: (ctid = '(1,1)'::tid)
3430 -> Nested Loop (cost=xxx rows=2 width=xxx)
3431 -> Tid Scan on t1 b1t1 (cost=xxx rows=1 width=xxx)
3432 TID Cond: (ctid = '(1,1)'::tid)
3433 -> Seq Scan on r1_ (cost=xxx rows=6 width=xxx)
3438 \o results/ut-R.tmpout
3440 Leading(r2 t1 t2 t3 t4)
3442 EXPLAIN UPDATE s1.r2 SET c1 = c1 WHERE c1 = 1;
3445 Leading(r2 t1 t2 t3 t4)
3452 Leading(r2 t1 t2 t3 t4)
3458 \! sql/maskout.sh results/ut-R.tmpout
3460 -----------------------------------------------------------------------------------------------
3461 Aggregate (cost=xxx rows=1 width=xxx)
3462 -> Nested Loop (cost=xxx rows=1 width=xxx)
3463 Join Filter: (t1.c1 = t4.c1)
3464 -> Nested Loop (cost=xxx rows=1 width=xxx)
3465 Join Filter: (t1.c1 = t3.c1)
3466 -> Merge Join (cost=xxx rows=1 width=xxx)
3467 Merge Cond: (t1.c1 = t2.c1)
3468 -> Nested Loop (cost=xxx rows=6 width=xxx)
3469 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
3470 Filter: (ctid = '(1,1)'::tid)
3471 -> Seq Scan on r2 (cost=xxx rows=6 width=xxx)
3473 -> Sort (cost=xxx rows=1 width=xxx)
3475 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3476 Filter: (ctid = '(1,1)'::tid)
3477 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3478 TID Cond: (ctid = '(1,1)'::tid)
3479 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3480 TID Cond: (ctid = '(1,1)'::tid)
3482 Aggregate (cost=xxx rows=1 width=xxx)
3483 -> Nested Loop (cost=xxx rows=1 width=xxx)
3484 Join Filter: (t1.c1 = t4.c1)
3485 -> Nested Loop (cost=xxx rows=1 width=xxx)
3486 Join Filter: (t1.c1 = t3.c1)
3487 -> Merge Join (cost=xxx rows=1 width=xxx)
3488 Merge Cond: (t1.c1 = t2.c1)
3489 -> Nested Loop (cost=xxx rows=6 width=xxx)
3490 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
3491 Filter: (ctid = '(1,1)'::tid)
3492 -> Seq Scan on r2 (cost=xxx rows=6 width=xxx)
3494 -> Sort (cost=xxx rows=1 width=xxx)
3496 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3497 Filter: (ctid = '(1,1)'::tid)
3498 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3499 TID Cond: (ctid = '(1,1)'::tid)
3500 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3501 TID Cond: (ctid = '(1,1)'::tid)
3504 \o results/ut-R.tmpout
3506 Leading(r2 t1 t2 t3 t4)
3507 Rows(r2 t1 t2 t3 t4 #2)
3508 Rows(r2 t1 t2 t3 #2)
3512 EXPLAIN UPDATE s1.r2 SET c1 = c1 WHERE c1 = 1;
3515 Leading(r2 t1 t2 t3 t4)
3518 Rows(r2 t1 t2 t3 #2)
3519 Rows(r2 t1 t2 t3 t4 #2)
3526 Leading(r2 t1 t2 t3 t4)
3529 Rows(r2 t1 t2 t3 #2)
3530 Rows(r2 t1 t2 t3 t4 #2)
3536 \! sql/maskout.sh results/ut-R.tmpout
3538 ---------------------------------------------------------------------------------
3539 Aggregate (cost=xxx rows=1 width=xxx)
3540 -> Nested Loop (cost=xxx rows=2 width=xxx)
3541 Join Filter: (t1.c1 = t4.c1)
3542 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3543 TID Cond: (ctid = '(1,1)'::tid)
3544 -> Nested Loop (cost=xxx rows=2 width=xxx)
3545 Join Filter: (t1.c1 = t3.c1)
3546 -> Tid Scan on t3 (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 = t2.c1)
3550 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3551 Filter: (ctid = '(1,1)'::tid)
3552 -> Nested Loop (cost=xxx rows=2 width=xxx)
3553 -> Tid Scan on t1 (cost=xxx rows=1 width=xxx)
3554 TID Cond: (ctid = '(1,1)'::tid)
3555 -> Seq Scan on r2 (cost=xxx rows=6 width=xxx)
3558 Aggregate (cost=xxx rows=1 width=xxx)
3559 -> Nested Loop (cost=xxx rows=2 width=xxx)
3560 Join Filter: (t1.c1 = t4.c1)
3561 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3562 TID Cond: (ctid = '(1,1)'::tid)
3563 -> Nested Loop (cost=xxx rows=2 width=xxx)
3564 Join Filter: (t1.c1 = t3.c1)
3565 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3566 TID Cond: (ctid = '(1,1)'::tid)
3567 -> Nested Loop (cost=xxx rows=2 width=xxx)
3568 Join Filter: (t1.c1 = t2.c1)
3569 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3570 Filter: (ctid = '(1,1)'::tid)
3571 -> Nested Loop (cost=xxx rows=2 width=xxx)
3572 -> Tid Scan on t1 (cost=xxx rows=1 width=xxx)
3573 TID Cond: (ctid = '(1,1)'::tid)
3574 -> Seq Scan on r2 (cost=xxx rows=6 width=xxx)
3578 \o results/ut-R.tmpout
3580 Leading(r2_ b1t1 b1t2 b1t3 b1t4)
3581 Leading(r2_ b2t1 b2t2 b2t3 b2t4)
3583 EXPLAIN UPDATE s1.r2_ SET c1 = c1 WHERE c1 = 1;
3586 Leading(r2_ b1t1 b1t2 b1t3 b1t4)
3588 Leading(r2_ b2t1 b2t2 b2t3 b2t4)
3594 Leading(r2_ b2t1 b2t2 b2t3 b2t4)
3596 Leading(r2_ b1t1 b1t2 b1t3 b1t4)
3601 \! sql/maskout.sh results/ut-R.tmpout
3603 ----------------------------------------------------------------------------------------------------
3604 Aggregate (cost=xxx rows=1 width=xxx)
3605 -> Nested Loop (cost=xxx rows=1 width=xxx)
3606 Join Filter: (b1t1.c1 = b1t4.c1)
3607 -> Nested Loop (cost=xxx rows=1 width=xxx)
3608 Join Filter: (b1t1.c1 = b1t3.c1)
3609 -> Merge Join (cost=xxx rows=1 width=xxx)
3610 Merge Cond: (b1t1.c1 = b1t2.c1)
3611 -> Nested Loop (cost=xxx rows=6 width=xxx)
3612 -> Index Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
3613 Filter: (ctid = '(1,1)'::tid)
3614 -> Seq Scan on r2_ (cost=xxx rows=6 width=xxx)
3616 -> Sort (cost=xxx rows=1 width=xxx)
3618 -> Seq Scan on t2 b1t2 (cost=xxx rows=1 width=xxx)
3619 Filter: (ctid = '(1,1)'::tid)
3620 -> Tid Scan on t3 b1t3 (cost=xxx rows=1 width=xxx)
3621 TID Cond: (ctid = '(1,1)'::tid)
3622 -> Tid Scan on t4 b1t4 (cost=xxx rows=1 width=xxx)
3623 TID Cond: (ctid = '(1,1)'::tid)
3625 Aggregate (cost=xxx rows=1 width=xxx)
3626 -> Nested Loop (cost=xxx rows=1 width=xxx)
3627 Join Filter: (b2t1.c1 = b2t4.c1)
3628 -> Nested Loop (cost=xxx rows=1 width=xxx)
3629 Join Filter: (b2t1.c1 = b2t3.c1)
3630 -> Merge Join (cost=xxx rows=1 width=xxx)
3631 Merge Cond: (b2t1.c1 = b2t2.c1)
3632 -> Nested Loop (cost=xxx rows=6 width=xxx)
3633 -> Index Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1 width=xxx)
3634 Filter: (ctid = '(1,1)'::tid)
3635 -> Seq Scan on r2_ (cost=xxx rows=6 width=xxx)
3637 -> Sort (cost=xxx rows=1 width=xxx)
3639 -> Seq Scan on t2 b2t2 (cost=xxx rows=1 width=xxx)
3640 Filter: (ctid = '(1,1)'::tid)
3641 -> Tid Scan on t3 b2t3 (cost=xxx rows=1 width=xxx)
3642 TID Cond: (ctid = '(1,1)'::tid)
3643 -> Tid Scan on t4 b2t4 (cost=xxx rows=1 width=xxx)
3644 TID Cond: (ctid = '(1,1)'::tid)
3647 \o results/ut-R.tmpout
3649 Leading(r2_ b1t1 b1t2 b1t3 b1t4)
3650 Leading(r2_ b2t1 b2t2 b2t3 b2t4)
3652 Rows(r2_ b1t1 b1t2 #2)
3653 Rows(r2_ b1t1 b1t2 b1t3 #2)
3654 Rows(r2_ b1t1 b1t2 b1t3 b1t4 #2)
3656 Rows(r2_ b2t1 b2t2 #2)
3657 Rows(r2_ b2t1 b2t2 b2t3 #2)
3658 Rows(r2_ b2t1 b2t2 b2t3 b2t4 #2)
3660 EXPLAIN UPDATE s1.r2_ SET c1 = c1 WHERE c1 = 1;
3663 Leading(r2_ b1t1 b1t2 b1t3 b1t4)
3665 Rows(b1t1 b1t2 r2_ #2)
3666 Rows(b1t1 b1t2 b1t3 r2_ #2)
3667 Rows(b1t1 b1t2 b1t3 b1t4 r2_ #2)
3669 Leading(r2_ b2t1 b2t2 b2t3 b2t4)
3671 Rows(b2t1 b2t2 r2_ #2)
3672 Rows(b2t1 b2t2 b2t3 r2_ #2)
3673 Rows(b2t1 b2t2 b2t3 b2t4 r2_ #2)
3679 Leading(r2_ b2t1 b2t2 b2t3 b2t4)
3681 Rows(b2t1 b2t2 r2_ #2)
3682 Rows(b2t1 b2t2 b2t3 r2_ #2)
3683 Rows(b2t1 b2t2 b2t3 b2t4 r2_ #2)
3685 Leading(r2_ b1t1 b1t2 b1t3 b1t4)
3687 Rows(b1t1 b1t2 r2_ #2)
3688 Rows(b1t1 b1t2 b1t3 r2_ #2)
3689 Rows(b1t1 b1t2 b1t3 b1t4 r2_ #2)
3694 \! sql/maskout.sh results/ut-R.tmpout
3696 -------------------------------------------------------------------------------------
3697 Aggregate (cost=xxx rows=1 width=xxx)
3698 -> Nested Loop (cost=xxx rows=2 width=xxx)
3699 Join Filter: (b1t1.c1 = b1t4.c1)
3700 -> Tid Scan on t4 b1t4 (cost=xxx rows=1 width=xxx)
3701 TID Cond: (ctid = '(1,1)'::tid)
3702 -> Nested Loop (cost=xxx rows=2 width=xxx)
3703 Join Filter: (b1t1.c1 = b1t3.c1)
3704 -> Tid Scan on t3 b1t3 (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: (b1t1.c1 = b1t2.c1)
3708 -> Seq Scan on t2 b1t2 (cost=xxx rows=1 width=xxx)
3709 Filter: (ctid = '(1,1)'::tid)
3710 -> Nested Loop (cost=xxx rows=2 width=xxx)
3711 -> Tid Scan on t1 b1t1 (cost=xxx rows=1 width=xxx)
3712 TID Cond: (ctid = '(1,1)'::tid)
3713 -> Seq Scan on r2_ (cost=xxx rows=6 width=xxx)
3716 Aggregate (cost=xxx rows=1 width=xxx)
3717 -> Nested Loop (cost=xxx rows=2 width=xxx)
3718 Join Filter: (b2t1.c1 = b2t4.c1)
3719 -> Tid Scan on t4 b2t4 (cost=xxx rows=1 width=xxx)
3720 TID Cond: (ctid = '(1,1)'::tid)
3721 -> Nested Loop (cost=xxx rows=2 width=xxx)
3722 Join Filter: (b2t1.c1 = b2t3.c1)
3723 -> Tid Scan on t3 b2t3 (cost=xxx rows=1 width=xxx)
3724 TID Cond: (ctid = '(1,1)'::tid)
3725 -> Nested Loop (cost=xxx rows=2 width=xxx)
3726 Join Filter: (b2t1.c1 = b2t2.c1)
3727 -> Seq Scan on t2 b2t2 (cost=xxx rows=1 width=xxx)
3728 Filter: (ctid = '(1,1)'::tid)
3729 -> Nested Loop (cost=xxx rows=2 width=xxx)
3730 -> Tid Scan on t1 b2t1 (cost=xxx rows=1 width=xxx)
3731 TID Cond: (ctid = '(1,1)'::tid)
3732 -> Seq Scan on r2_ (cost=xxx rows=6 width=xxx)
3737 \o results/ut-R.tmpout
3739 Leading(r3 t1 t2 t3 t4)
3741 EXPLAIN UPDATE s1.r3 SET c1 = c1 WHERE c1 = 1;
3744 Leading(r3 t1 t2 t3 t4)
3751 Leading(r3 t1 t2 t3 t4)
3758 Leading(r3 t1 t2 t3 t4)
3764 \! sql/maskout.sh results/ut-R.tmpout
3766 -----------------------------------------------------------------------------------------------
3767 Aggregate (cost=xxx rows=1 width=xxx)
3768 -> Nested Loop (cost=xxx rows=1 width=xxx)
3769 Join Filter: (t1.c1 = t4.c1)
3770 -> Nested Loop (cost=xxx rows=1 width=xxx)
3771 Join Filter: (t1.c1 = t3.c1)
3772 -> Merge Join (cost=xxx rows=1 width=xxx)
3773 Merge Cond: (t1.c1 = t2.c1)
3774 -> Nested Loop (cost=xxx rows=6 width=xxx)
3775 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
3776 Filter: (ctid = '(1,1)'::tid)
3777 -> Seq Scan on r3 (cost=xxx rows=6 width=xxx)
3779 -> Sort (cost=xxx rows=1 width=xxx)
3781 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3782 Filter: (ctid = '(1,1)'::tid)
3783 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3784 TID Cond: (ctid = '(1,1)'::tid)
3785 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3786 TID Cond: (ctid = '(1,1)'::tid)
3788 Aggregate (cost=xxx rows=1 width=xxx)
3789 -> Nested Loop (cost=xxx rows=1 width=xxx)
3790 Join Filter: (t1.c1 = t4.c1)
3791 -> Nested Loop (cost=xxx rows=1 width=xxx)
3792 Join Filter: (t1.c1 = t3.c1)
3793 -> Merge Join (cost=xxx rows=1 width=xxx)
3794 Merge Cond: (t1.c1 = t2.c1)
3795 -> Nested Loop (cost=xxx rows=6 width=xxx)
3796 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
3797 Filter: (ctid = '(1,1)'::tid)
3798 -> Seq Scan on r3 (cost=xxx rows=6 width=xxx)
3800 -> Sort (cost=xxx rows=1 width=xxx)
3802 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3803 Filter: (ctid = '(1,1)'::tid)
3804 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3805 TID Cond: (ctid = '(1,1)'::tid)
3806 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3807 TID Cond: (ctid = '(1,1)'::tid)
3809 Aggregate (cost=xxx rows=1 width=xxx)
3810 -> Nested Loop (cost=xxx rows=1 width=xxx)
3811 Join Filter: (t1.c1 = t4.c1)
3812 -> Nested Loop (cost=xxx rows=1 width=xxx)
3813 Join Filter: (t1.c1 = t3.c1)
3814 -> Merge Join (cost=xxx rows=1 width=xxx)
3815 Merge Cond: (t1.c1 = t2.c1)
3816 -> Nested Loop (cost=xxx rows=6 width=xxx)
3817 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
3818 Filter: (ctid = '(1,1)'::tid)
3819 -> Seq Scan on r3 (cost=xxx rows=6 width=xxx)
3821 -> Sort (cost=xxx rows=1 width=xxx)
3823 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3824 Filter: (ctid = '(1,1)'::tid)
3825 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3826 TID Cond: (ctid = '(1,1)'::tid)
3827 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3828 TID Cond: (ctid = '(1,1)'::tid)
3831 \o results/ut-R.tmpout
3833 Leading(r3 t1 t2 t3 t4)
3834 Rows(r3 t1 t2 t3 t4 #2)
3835 Rows(r3 t1 t2 t3 #2)
3839 EXPLAIN UPDATE s1.r3 SET c1 = c1 WHERE c1 = 1;
3842 Leading(r3 t1 t2 t3 t4)
3845 Rows(r3 t1 t2 t3 #2)
3846 Rows(r3 t1 t2 t3 t4 #2)
3853 Leading(r3 t1 t2 t3 t4)
3856 Rows(r3 t1 t2 t3 #2)
3857 Rows(r3 t1 t2 t3 t4 #2)
3864 Leading(r3 t1 t2 t3 t4)
3867 Rows(r3 t1 t2 t3 #2)
3868 Rows(r3 t1 t2 t3 t4 #2)
3874 \! sql/maskout.sh results/ut-R.tmpout
3876 ---------------------------------------------------------------------------------
3877 Aggregate (cost=xxx rows=1 width=xxx)
3878 -> Nested Loop (cost=xxx rows=2 width=xxx)
3879 Join Filter: (t1.c1 = t4.c1)
3880 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3881 TID Cond: (ctid = '(1,1)'::tid)
3882 -> Nested Loop (cost=xxx rows=2 width=xxx)
3883 Join Filter: (t1.c1 = t3.c1)
3884 -> Tid Scan on t3 (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 = t2.c1)
3888 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3889 Filter: (ctid = '(1,1)'::tid)
3890 -> Nested Loop (cost=xxx rows=2 width=xxx)
3891 -> Tid Scan on t1 (cost=xxx rows=1 width=xxx)
3892 TID Cond: (ctid = '(1,1)'::tid)
3893 -> Seq Scan on r3 (cost=xxx rows=6 width=xxx)
3896 Aggregate (cost=xxx rows=1 width=xxx)
3897 -> Nested Loop (cost=xxx rows=2 width=xxx)
3898 Join Filter: (t1.c1 = t4.c1)
3899 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3900 TID Cond: (ctid = '(1,1)'::tid)
3901 -> Nested Loop (cost=xxx rows=2 width=xxx)
3902 Join Filter: (t1.c1 = t3.c1)
3903 -> Tid Scan on t3 (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 = t2.c1)
3907 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3908 Filter: (ctid = '(1,1)'::tid)
3909 -> Nested Loop (cost=xxx rows=2 width=xxx)
3910 -> Tid Scan on t1 (cost=xxx rows=1 width=xxx)
3911 TID Cond: (ctid = '(1,1)'::tid)
3912 -> Seq Scan on r3 (cost=xxx rows=6 width=xxx)
3915 Aggregate (cost=xxx rows=1 width=xxx)
3916 -> Nested Loop (cost=xxx rows=2 width=xxx)
3917 Join Filter: (t1.c1 = t4.c1)
3918 -> Tid Scan on t4 (cost=xxx rows=1 width=xxx)
3919 TID Cond: (ctid = '(1,1)'::tid)
3920 -> Nested Loop (cost=xxx rows=2 width=xxx)
3921 Join Filter: (t1.c1 = t3.c1)
3922 -> Tid Scan on t3 (cost=xxx rows=1 width=xxx)
3923 TID Cond: (ctid = '(1,1)'::tid)
3924 -> Nested Loop (cost=xxx rows=2 width=xxx)
3925 Join Filter: (t1.c1 = t2.c1)
3926 -> Seq Scan on t2 (cost=xxx rows=1 width=xxx)
3927 Filter: (ctid = '(1,1)'::tid)
3928 -> Nested Loop (cost=xxx rows=2 width=xxx)
3929 -> Tid Scan on t1 (cost=xxx rows=1 width=xxx)
3930 TID Cond: (ctid = '(1,1)'::tid)
3931 -> Seq Scan on r3 (cost=xxx rows=6 width=xxx)
3935 \o results/ut-R.tmpout
3937 Leading(r3_ b1t1 b1t2 b1t3 b1t4)
3938 Leading(r3_ b2t1 b2t2 b2t3 b2t4)
3939 Leading(r3_ b3t1 b3t2 b3t3 b3t4)
3941 EXPLAIN UPDATE s1.r3_ SET c1 = c1 WHERE c1 = 1;
3944 Leading(r3_ b1t1 b1t2 b1t3 b1t4)
3946 Leading(r3_ b2t1 b2t2 b2t3 b2t4)
3947 Leading(r3_ b3t1 b3t2 b3t3 b3t4)
3953 Leading(r3_ b2t1 b2t2 b2t3 b2t4)
3955 Leading(r3_ b1t1 b1t2 b1t3 b1t4)
3956 Leading(r3_ b3t1 b3t2 b3t3 b3t4)
3962 Leading(r3_ b3t1 b3t2 b3t3 b3t4)
3964 Leading(r3_ b1t1 b1t2 b1t3 b1t4)
3965 Leading(r3_ b2t1 b2t2 b2t3 b2t4)
3970 \! sql/maskout.sh results/ut-R.tmpout
3972 ----------------------------------------------------------------------------------------------------
3973 Aggregate (cost=xxx rows=1 width=xxx)
3974 -> Nested Loop (cost=xxx rows=1 width=xxx)
3975 Join Filter: (b1t1.c1 = b1t4.c1)
3976 -> Nested Loop (cost=xxx rows=1 width=xxx)
3977 Join Filter: (b1t1.c1 = b1t3.c1)
3978 -> Merge Join (cost=xxx rows=1 width=xxx)
3979 Merge Cond: (b1t1.c1 = b1t2.c1)
3980 -> Nested Loop (cost=xxx rows=6 width=xxx)
3981 -> Index Scan using t1_i1 on t1 b1t1 (cost=xxx rows=1 width=xxx)
3982 Filter: (ctid = '(1,1)'::tid)
3983 -> Seq Scan on r3_ (cost=xxx rows=6 width=xxx)
3985 -> Sort (cost=xxx rows=1 width=xxx)
3987 -> Seq Scan on t2 b1t2 (cost=xxx rows=1 width=xxx)
3988 Filter: (ctid = '(1,1)'::tid)
3989 -> Tid Scan on t3 b1t3 (cost=xxx rows=1 width=xxx)
3990 TID Cond: (ctid = '(1,1)'::tid)
3991 -> Tid Scan on t4 b1t4 (cost=xxx rows=1 width=xxx)
3992 TID Cond: (ctid = '(1,1)'::tid)
3994 Aggregate (cost=xxx rows=1 width=xxx)
3995 -> Nested Loop (cost=xxx rows=1 width=xxx)
3996 Join Filter: (b2t1.c1 = b2t4.c1)
3997 -> Nested Loop (cost=xxx rows=1 width=xxx)
3998 Join Filter: (b2t1.c1 = b2t3.c1)
3999 -> Merge Join (cost=xxx rows=1 width=xxx)
4000 Merge Cond: (b2t1.c1 = b2t2.c1)
4001 -> Nested Loop (cost=xxx rows=6 width=xxx)
4002 -> Index Scan using t1_i1 on t1 b2t1 (cost=xxx rows=1 width=xxx)
4003 Filter: (ctid = '(1,1)'::tid)
4004 -> Seq Scan on r3_ (cost=xxx rows=6 width=xxx)
4006 -> Sort (cost=xxx rows=1 width=xxx)
4008 -> Seq Scan on t2 b2t2 (cost=xxx rows=1 width=xxx)
4009 Filter: (ctid = '(1,1)'::tid)
4010 -> Tid Scan on t3 b2t3 (cost=xxx rows=1 width=xxx)
4011 TID Cond: (ctid = '(1,1)'::tid)
4012 -> Tid Scan on t4 b2t4 (cost=xxx rows=1 width=xxx)
4013 TID Cond: (ctid = '(1,1)'::tid)
4015 Aggregate (cost=xxx rows=1 width=xxx)
4016 -> Nested Loop (cost=xxx rows=1 width=xxx)
4017 Join Filter: (b3t1.c1 = b3t4.c1)
4018 -> Nested Loop (cost=xxx rows=1 width=xxx)
4019 Join Filter: (b3t1.c1 = b3t3.c1)
4020 -> Merge Join (cost=xxx rows=1 width=xxx)
4021 Merge Cond: (b3t1.c1 = b3t2.c1)
4022 -> Nested Loop (cost=xxx rows=6 width=xxx)
4023 -> Index Scan using t1_i1 on t1 b3t1 (cost=xxx rows=1 width=xxx)
4024 Filter: (ctid = '(1,1)'::tid)
4025 -> Seq Scan on r3_ (cost=xxx rows=6 width=xxx)
4027 -> Sort (cost=xxx rows=1 width=xxx)
4029 -> Seq Scan on t2 b3t2 (cost=xxx rows=1 width=xxx)
4030 Filter: (ctid = '(1,1)'::tid)
4031 -> Tid Scan on t3 b3t3 (cost=xxx rows=1 width=xxx)
4032 TID Cond: (ctid = '(1,1)'::tid)
4033 -> Tid Scan on t4 b3t4 (cost=xxx rows=1 width=xxx)
4034 TID Cond: (ctid = '(1,1)'::tid)
4037 \o results/ut-R.tmpout
4039 Leading(r3_ b1t1 b1t2 b1t3 b1t4)
4040 Leading(r3_ b2t1 b2t2 b2t3 b2t4)
4041 Leading(r3_ b3t1 b3t2 b3t3 b3t4)
4043 Rows(r3_ b1t1 b1t2 #2)
4044 Rows(r3_ b1t1 b1t2 b1t3 #2)
4045 Rows(r3_ b1t1 b1t2 b1t3 b1t4 #2)
4047 Rows(r3_ b2t1 b2t2 #2)
4048 Rows(r3_ b2t1 b2t2 b2t3 #2)
4049 Rows(r3_ b2t1 b2t2 b2t3 b2t4 #2)
4051 Rows(r3_ b3t1 b3t2 #2)
4052 Rows(r3_ b3t1 b3t2 b3t3 #2)
4053 Rows(r3_ b3t1 b3t2 b3t3 b3t4 #2)
4055 EXPLAIN UPDATE s1.r3_ SET c1 = c1 WHERE c1 = 1;
4058 Leading(r3_ b1t1 b1t2 b1t3 b1t4)
4060 Rows(b1t1 b1t2 r3_ #2)
4061 Rows(b1t1 b1t2 b1t3 r3_ #2)
4062 Rows(b1t1 b1t2 b1t3 b1t4 r3_ #2)
4064 Leading(r3_ b2t1 b2t2 b2t3 b2t4)
4065 Leading(r3_ b3t1 b3t2 b3t3 b3t4)
4068 Rows(b2t1 b2t2 r3_ #2)
4069 Rows(b3t1 b3t2 r3_ #2)
4070 Rows(b2t1 b2t2 b2t3 r3_ #2)
4071 Rows(b3t1 b3t2 b3t3 r3_ #2)
4072 Rows(b2t1 b2t2 b2t3 b2t4 r3_ #2)
4073 Rows(b3t1 b3t2 b3t3 b3t4 r3_ #2)
4079 Leading(r3_ b2t1 b2t2 b2t3 b2t4)
4081 Rows(b2t1 b2t2 r3_ #2)
4082 Rows(b2t1 b2t2 b2t3 r3_ #2)
4083 Rows(b2t1 b2t2 b2t3 b2t4 r3_ #2)
4085 Leading(r3_ b1t1 b1t2 b1t3 b1t4)
4086 Leading(r3_ b3t1 b3t2 b3t3 b3t4)
4089 Rows(b1t1 b1t2 r3_ #2)
4090 Rows(b3t1 b3t2 r3_ #2)
4091 Rows(b1t1 b1t2 b1t3 r3_ #2)
4092 Rows(b3t1 b3t2 b3t3 r3_ #2)
4093 Rows(b1t1 b1t2 b1t3 b1t4 r3_ #2)
4094 Rows(b3t1 b3t2 b3t3 b3t4 r3_ #2)
4100 Leading(r3_ b3t1 b3t2 b3t3 b3t4)
4102 Rows(b3t1 b3t2 r3_ #2)
4103 Rows(b3t1 b3t2 b3t3 r3_ #2)
4104 Rows(b3t1 b3t2 b3t3 b3t4 r3_ #2)
4106 Leading(r3_ b1t1 b1t2 b1t3 b1t4)
4107 Leading(r3_ b2t1 b2t2 b2t3 b2t4)
4110 Rows(b1t1 b1t2 r3_ #2)
4111 Rows(b2t1 b2t2 r3_ #2)
4112 Rows(b1t1 b1t2 b1t3 r3_ #2)
4113 Rows(b2t1 b2t2 b2t3 r3_ #2)
4114 Rows(b1t1 b1t2 b1t3 b1t4 r3_ #2)
4115 Rows(b2t1 b2t2 b2t3 b2t4 r3_ #2)
4120 \! sql/maskout.sh results/ut-R.tmpout
4122 -------------------------------------------------------------------------------------
4123 Aggregate (cost=xxx rows=1 width=xxx)
4124 -> Nested Loop (cost=xxx rows=2 width=xxx)
4125 Join Filter: (b1t1.c1 = b1t4.c1)
4126 -> Tid Scan on t4 b1t4 (cost=xxx rows=1 width=xxx)
4127 TID Cond: (ctid = '(1,1)'::tid)
4128 -> Nested Loop (cost=xxx rows=2 width=xxx)
4129 Join Filter: (b1t1.c1 = b1t3.c1)
4130 -> Tid Scan on t3 b1t3 (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: (b1t1.c1 = b1t2.c1)
4134 -> Seq Scan on t2 b1t2 (cost=xxx rows=1 width=xxx)
4135 Filter: (ctid = '(1,1)'::tid)
4136 -> Nested Loop (cost=xxx rows=2 width=xxx)
4137 -> Tid Scan on t1 b1t1 (cost=xxx rows=1 width=xxx)
4138 TID Cond: (ctid = '(1,1)'::tid)
4139 -> Seq Scan on r3_ (cost=xxx rows=6 width=xxx)
4142 Aggregate (cost=xxx rows=1 width=xxx)
4143 -> Nested Loop (cost=xxx rows=2 width=xxx)
4144 Join Filter: (b2t1.c1 = b2t4.c1)
4145 -> Tid Scan on t4 b2t4 (cost=xxx rows=1 width=xxx)
4146 TID Cond: (ctid = '(1,1)'::tid)
4147 -> Nested Loop (cost=xxx rows=2 width=xxx)
4148 Join Filter: (b2t1.c1 = b2t3.c1)
4149 -> Tid Scan on t3 b2t3 (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: (b2t1.c1 = b2t2.c1)
4153 -> Seq Scan on t2 b2t2 (cost=xxx rows=1 width=xxx)
4154 Filter: (ctid = '(1,1)'::tid)
4155 -> Nested Loop (cost=xxx rows=2 width=xxx)
4156 -> Tid Scan on t1 b2t1 (cost=xxx rows=1 width=xxx)
4157 TID Cond: (ctid = '(1,1)'::tid)
4158 -> Seq Scan on r3_ (cost=xxx rows=6 width=xxx)
4161 Aggregate (cost=xxx rows=1 width=xxx)
4162 -> Nested Loop (cost=xxx rows=2 width=xxx)
4163 Join Filter: (b3t1.c1 = b3t4.c1)
4164 -> Tid Scan on t4 b3t4 (cost=xxx rows=1 width=xxx)
4165 TID Cond: (ctid = '(1,1)'::tid)
4166 -> Nested Loop (cost=xxx rows=2 width=xxx)
4167 Join Filter: (b3t1.c1 = b3t3.c1)
4168 -> Tid Scan on t3 b3t3 (cost=xxx rows=1 width=xxx)
4169 TID Cond: (ctid = '(1,1)'::tid)
4170 -> Nested Loop (cost=xxx rows=2 width=xxx)
4171 Join Filter: (b3t1.c1 = b3t2.c1)
4172 -> Seq Scan on t2 b3t2 (cost=xxx rows=1 width=xxx)
4173 Filter: (ctid = '(1,1)'::tid)
4174 -> Nested Loop (cost=xxx rows=2 width=xxx)
4175 -> Tid Scan on t1 b3t1 (cost=xxx rows=1 width=xxx)
4176 TID Cond: (ctid = '(1,1)'::tid)
4177 -> Seq Scan on r3_ (cost=xxx rows=6 width=xxx)
4182 \o results/ut-R.tmpout
4183 /*+HashJoin(v1t1 v1t1)*/
4184 EXPLAIN SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1;
4185 INFO: pg_hint_plan: hint syntax error at or near "HashJoin(v1t1 v1t1)"
4186 DETAIL: Relation name "v1t1" is ambiguous.
4195 \! sql/maskout.sh results/ut-R.tmpout
4197 --------------------------------------------------------------------------
4198 Hash Join (cost=xxx rows=1000 width=xxx)
4199 Hash Cond: (v1t1.c1 = v1t1_1.c1)
4200 -> Seq Scan on t1 v1t1 (cost=xxx rows=1000 width=xxx)
4201 -> Hash (cost=xxx rows=1000 width=xxx)
4202 -> Seq Scan on t1 v1t1_1 (cost=xxx rows=1000 width=xxx)
4205 \o results/ut-R.tmpout
4206 /*+HashJoin(v1t1 v1t1)Rows(v1t1 v1t1 #1)*/
4207 EXPLAIN SELECT * FROM s1.v1 v1, s1.v1 v2 WHERE v1.c1 = v2.c1;
4208 INFO: pg_hint_plan: hint syntax error at or near "HashJoin(v1t1 v1t1)Rows(v1t1 v1t1 #1)"
4209 DETAIL: Relation name "v1t1" is ambiguous.
4210 INFO: pg_hint_plan: hint syntax error at or near "Rows(v1t1 v1t1 #1)"
4211 DETAIL: Relation name "v1t1" is ambiguous.
4221 \! sql/maskout.sh results/ut-R.tmpout
4223 --------------------------------------------------------------------------
4224 Hash Join (cost=xxx rows=1000 width=xxx)
4225 Hash Cond: (v1t1.c1 = v1t1_1.c1)
4226 -> Seq Scan on t1 v1t1 (cost=xxx rows=1000 width=xxx)
4227 -> Hash (cost=xxx rows=1000 width=xxx)
4228 -> Seq Scan on t1 v1t1_1 (cost=xxx rows=1000 width=xxx)
4232 \o results/ut-R.tmpout
4233 /*+NestLoop(v1t1 v1t1_)*/
4234 EXPLAIN SELECT * FROM s1.v1 v1, s1.v1_ v2 WHERE v1.c1 = v2.c1;
4237 NestLoop(v1t1 v1t1_)
4243 \! sql/maskout.sh results/ut-R.tmpout
4245 -----------------------------------------------------------------------------
4246 Nested Loop (cost=xxx rows=1000 width=xxx)
4247 -> Seq Scan on t1 v1t1 (cost=xxx rows=1000 width=xxx)
4248 -> Index Scan using t1_i1 on t1 v1t1_ (cost=xxx rows=1 width=xxx)
4249 Index Cond: (c1 = v1t1.c1)
4252 \o results/ut-R.tmpout
4253 /*+NestLoop(v1t1 v1t1_)Rows(v1t1 v1t1_ #1)*/
4254 EXPLAIN SELECT * FROM s1.v1 v1, s1.v1_ v2 WHERE v1.c1 = v2.c1;
4257 NestLoop(v1t1 v1t1_)
4264 \! sql/maskout.sh results/ut-R.tmpout
4266 -----------------------------------------------------------------------------
4267 Nested Loop (cost=xxx rows=1 width=xxx)
4268 -> Seq Scan on t1 v1t1 (cost=xxx rows=1000 width=xxx)
4269 -> Index Scan using t1_i1 on t1 v1t1_ (cost=xxx rows=1 width=xxx)
4270 Index Cond: (c1 = v1t1.c1)
4274 \o results/ut-R.tmpout
4275 /*+RowsHashJoin(r4t1 r4t1)*/
4276 EXPLAIN SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1;
4277 INFO: pg_hint_plan: hint syntax error at or near "RowsHashJoin(r4t1 r4t1)"
4278 DETAIL: Unrecognized hint keyword "RowsHashJoin".
4280 \! sql/maskout.sh results/ut-R.tmpout
4282 --------------------------------------------------------------------------
4283 Hash Join (cost=xxx rows=1000 width=xxx)
4284 Hash Cond: (r4t1.c1 = r4t1_1.c1)
4285 -> Seq Scan on t1 r4t1 (cost=xxx rows=1000 width=xxx)
4286 -> Hash (cost=xxx rows=1000 width=xxx)
4287 -> Seq Scan on t1 r4t1_1 (cost=xxx rows=1000 width=xxx)
4290 \o results/ut-R.tmpout
4291 /*+RowsHashJoin(r4t1 r4t1)Rows(r4t1 r4t1 #1)*/
4292 EXPLAIN SELECT * FROM s1.r4 t1, s1.r4 t2 WHERE t1.c1 = t2.c1;
4293 INFO: pg_hint_plan: hint syntax error at or near "RowsHashJoin(r4t1 r4t1)Rows(r4t1 r4t1 #1)"
4294 DETAIL: Unrecognized hint keyword "RowsHashJoin".
4296 \! sql/maskout.sh results/ut-R.tmpout
4298 --------------------------------------------------------------------------
4299 Hash Join (cost=xxx rows=1000 width=xxx)
4300 Hash Cond: (r4t1.c1 = r4t1_1.c1)
4301 -> Seq Scan on t1 r4t1 (cost=xxx rows=1000 width=xxx)
4302 -> Hash (cost=xxx rows=1000 width=xxx)
4303 -> Seq Scan on t1 r4t1_1 (cost=xxx rows=1000 width=xxx)
4307 \o results/ut-R.tmpout
4308 /*+NestLoop(r4t1 r5t1)*/
4309 EXPLAIN SELECT * FROM s1.r4 t1, s1.r5 t2 WHERE t1.c1 = t2.c1;
4318 \! sql/maskout.sh results/ut-R.tmpout
4320 ----------------------------------------------------------------------------
4321 Nested Loop (cost=xxx rows=1000 width=xxx)
4322 -> Seq Scan on t1 r4t1 (cost=xxx rows=1000 width=xxx)
4323 -> Index Scan using t1_i1 on t1 r5t1 (cost=xxx rows=1 width=xxx)
4324 Index Cond: (c1 = r4t1.c1)
4327 \o results/ut-R.tmpout
4328 /*+NestLoop(r4t1 r5t1)Rows(r4t1 r5t1 #1)*/
4329 EXPLAIN SELECT * FROM s1.r4 t1, s1.r5 t2 WHERE t1.c1 = t2.c1;
4339 \! sql/maskout.sh results/ut-R.tmpout
4341 ----------------------------------------------------------------------------
4342 Nested Loop (cost=xxx rows=1 width=xxx)
4343 -> Seq Scan on t1 r4t1 (cost=xxx rows=1000 width=xxx)
4344 -> Index Scan using t1_i1 on t1 r5t1 (cost=xxx rows=1 width=xxx)
4345 Index Cond: (c1 = r4t1.c1)
4349 ---- No. R-2-4 VALUES clause
4352 \o results/ut-R.tmpout
4353 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;
4355 \! sql/maskout.sh results/ut-R.tmpout
4357 --------------------------------------------------------------------------------
4358 Nested Loop (cost=xxx rows=1 width=xxx)
4359 -> Hash Join (cost=xxx rows=2 width=xxx)
4360 Hash Cond: (t2.c1 = "*VALUES*".column1)
4361 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4362 -> Hash (cost=xxx rows=2 width=xxx)
4363 -> Values Scan on "*VALUES*" (cost=xxx rows=2 width=xxx)
4364 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
4365 Index Cond: (c1 = t2.c1)
4368 \o results/ut-R.tmpout
4369 /*+ Leading(t3 t1 t2) Rows(t3 t1 #2)Rows(t3 t1 t2 #2)*/
4370 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;
4381 \! sql/maskout.sh results/ut-R.tmpout
4383 --------------------------------------------------------------------------------
4384 Nested Loop (cost=xxx rows=1 width=xxx)
4385 -> Hash Join (cost=xxx rows=2 width=xxx)
4386 Hash Cond: (t2.c1 = "*VALUES*".column1)
4387 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4388 -> Hash (cost=xxx rows=2 width=xxx)
4389 -> Values Scan on "*VALUES*" (cost=xxx rows=2 width=xxx)
4390 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
4391 Index Cond: (c1 = t2.c1)
4394 \o results/ut-R.tmpout
4395 /*+ Leading(*VALUES* t1 t2) Rows(*VALUES* t1 #2)Rows(*VALUES* t1 t2 #20)*/
4396 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;
4399 Leading(*VALUES* t1 t2)
4400 Rows(*VALUES* t1 #2)
4401 Rows(*VALUES* t1 t2 #20)
4407 \! sql/maskout.sh results/ut-R.tmpout
4409 -----------------------------------------------------------------------------
4410 Nested Loop (cost=xxx rows=20 width=xxx)
4411 -> Nested Loop (cost=xxx rows=2 width=xxx)
4412 -> Values Scan on "*VALUES*" (cost=xxx rows=2 width=xxx)
4413 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
4414 Index Cond: (c1 = "*VALUES*".column1)
4415 -> Index Scan using t2_i1 on t2 (cost=xxx rows=1 width=xxx)
4416 Index Cond: (c1 = t1.c1)
4420 \o results/ut-R.tmpout
4421 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;
4423 \! sql/maskout.sh results/ut-R.tmpout
4425 --------------------------------------------------------------------------------------
4426 Nested Loop (cost=xxx rows=1 width=xxx)
4427 -> Nested Loop (cost=xxx rows=1 width=xxx)
4428 Join Filter: (t2.c1 = "*VALUES*_1".column1)
4429 -> Hash Join (cost=xxx rows=2 width=xxx)
4430 Hash Cond: (t2.c1 = "*VALUES*".column1)
4431 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4432 -> Hash (cost=xxx rows=2 width=xxx)
4433 -> Values Scan on "*VALUES*" (cost=xxx rows=2 width=xxx)
4434 -> Materialize (cost=xxx rows=2 width=xxx)
4435 -> Values Scan on "*VALUES*_1" (cost=xxx rows=2 width=xxx)
4436 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
4437 Index Cond: (c1 = t2.c1)
4440 \o results/ut-R.tmpout
4441 /*+ Leading(t4 t3 t2 t1) Rows(t4 t3 #2) Rows(t4 t3 t2 #2)Rows(t4 t3 t2 t1 #2)*/
4442 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;
4446 Leading(t4 t3 t2 t1)
4449 Rows(t1 t2 t3 t4 #2)
4454 \! sql/maskout.sh results/ut-R.tmpout
4456 --------------------------------------------------------------------------------------
4457 Nested Loop (cost=xxx rows=1 width=xxx)
4458 -> Nested Loop (cost=xxx rows=1 width=xxx)
4459 Join Filter: (t2.c1 = "*VALUES*_1".column1)
4460 -> Hash Join (cost=xxx rows=2 width=xxx)
4461 Hash Cond: (t2.c1 = "*VALUES*".column1)
4462 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4463 -> Hash (cost=xxx rows=2 width=xxx)
4464 -> Values Scan on "*VALUES*" (cost=xxx rows=2 width=xxx)
4465 -> Materialize (cost=xxx rows=2 width=xxx)
4466 -> Values Scan on "*VALUES*_1" (cost=xxx rows=2 width=xxx)
4467 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
4468 Index Cond: (c1 = t2.c1)
4471 \o results/ut-R.tmpout
4472 /*+ Leading(*VALUES* t3 t2 t1) Rows(t4 t3 #2)Rows(*VALUES* t3 t2 #2)Rows(*VALUES* t3 t2 t1 #2)*/
4473 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;
4474 INFO: pg_hint_plan: hint syntax error at or near "Rows(*VALUES* t3 t2 #2)Rows(*VALUES* t3 t2 t1 #2)"
4475 DETAIL: Relation name "*VALUES*" is ambiguous.
4476 INFO: pg_hint_plan: hint syntax error at or near "Rows(*VALUES* t3 t2 t1 #2)"
4477 DETAIL: Relation name "*VALUES*" is ambiguous.
4478 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)"
4479 DETAIL: Relation name "*VALUES*" is ambiguous.
4486 Leading(*VALUES* t3 t2 t1)
4487 Rows(*VALUES* t2 t3 #2)
4488 Rows(*VALUES* t1 t2 t3 #2)
4491 \! sql/maskout.sh results/ut-R.tmpout
4493 --------------------------------------------------------------------------------------
4494 Nested Loop (cost=xxx rows=1 width=xxx)
4495 -> Nested Loop (cost=xxx rows=1 width=xxx)
4496 Join Filter: (t2.c1 = "*VALUES*_1".column1)
4497 -> Hash Join (cost=xxx rows=2 width=xxx)
4498 Hash Cond: (t2.c1 = "*VALUES*".column1)
4499 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4500 -> Hash (cost=xxx rows=2 width=xxx)
4501 -> Values Scan on "*VALUES*" (cost=xxx rows=2 width=xxx)
4502 -> Materialize (cost=xxx rows=2 width=xxx)
4503 -> Values Scan on "*VALUES*_1" (cost=xxx rows=2 width=xxx)
4504 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1 width=xxx)
4505 Index Cond: (c1 = t2.c1)
4512 \o results/ut-R.tmpout
4513 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;
4515 \! sql/maskout.sh results/ut-R.tmpout
4517 ------------------------------------------------------------------------------------------------------
4518 Aggregate (cost=xxx rows=1 width=xxx)
4519 -> Nested Loop (cost=xxx rows=100 width=xxx)
4520 Join Filter: (bmt1.c1 = bmt4.c1)
4521 -> Merge Join (cost=xxx rows=100 width=xxx)
4522 Merge Cond: (bmt1.c1 = bmt2.c1)
4523 -> Merge Join (cost=xxx rows=1000 width=xxx)
4524 Merge Cond: (bmt1.c1 = bmt3.c1)
4525 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
4526 -> Index Only Scan using t3_i1 on t3 bmt3 (cost=xxx rows=1130 width=xxx)
4527 -> Sort (cost=xxx rows=100 width=xxx)
4529 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
4530 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
4531 Index Cond: (c1 = bmt3.c1)
4534 \o results/ut-R.tmpout
4536 Leading(bmt4 bmt3 bmt2 bmt1)
4537 Rows(bmt1 bmt2 bmt3 bmt4 *0.7)
4539 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;
4542 Leading(bmt4 bmt3 bmt2 bmt1)
4543 Rows(bmt1 bmt2 bmt3 bmt4 *0.7)
4549 \! sql/maskout.sh results/ut-R.tmpout
4551 -----------------------------------------------------------------------------------------
4552 Merge Join (cost=xxx rows=70 width=xxx)
4553 Merge Cond: (bmt1.c1 = bmt2.c1)
4554 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
4555 -> Sort (cost=xxx rows=100 width=xxx)
4557 -> Hash Join (cost=xxx rows=100 width=xxx)
4558 Hash Cond: (bmt3.c1 = bmt2.c1)
4559 -> Hash Join (cost=xxx rows=1130 width=xxx)
4560 Hash Cond: (bmt3.c1 = bmt4.c1)
4561 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
4562 -> Hash (cost=xxx rows=1130 width=xxx)
4563 -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
4564 -> Hash (cost=xxx rows=100 width=xxx)
4565 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
4569 \o results/ut-R.tmpout
4570 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;
4572 \! sql/maskout.sh results/ut-R.tmpout
4574 ------------------------------------------------------------------------------------------------
4575 Nested Loop (cost=xxx rows=100 width=xxx)
4576 Join Filter: (bmt1.c1 = bmt4.c1)
4577 -> Merge Join (cost=xxx rows=100 width=xxx)
4578 Merge Cond: (bmt1.c1 = bmt2.c1)
4579 -> Merge Join (cost=xxx rows=1000 width=xxx)
4580 Merge Cond: (bmt1.c1 = bmt3.c1)
4581 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
4582 -> Index Only Scan using t3_i1 on t3 bmt3 (cost=xxx rows=1130 width=xxx)
4583 -> Sort (cost=xxx rows=100 width=xxx)
4585 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
4586 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
4587 Index Cond: (c1 = bmt3.c1)
4590 \o results/ut-R.tmpout
4592 Leading(bmt4 bmt3 bmt2 bmt1)
4593 Rows(bmt4 bmt3 *0.6)
4595 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;
4598 Leading(bmt4 bmt3 bmt2 bmt1)
4599 Rows(bmt3 bmt4 *0.6)
4605 \! sql/maskout.sh results/ut-R.tmpout
4607 -----------------------------------------------------------------------------------------
4608 Merge Join (cost=xxx rows=60 width=xxx)
4609 Merge Cond: (bmt1.c1 = bmt2.c1)
4610 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
4611 -> Sort (cost=xxx rows=60 width=xxx)
4613 -> Hash Join (cost=xxx rows=60 width=xxx)
4614 Hash Cond: (bmt3.c1 = bmt2.c1)
4615 -> Hash Join (cost=xxx rows=678 width=xxx)
4616 Hash Cond: (bmt3.c1 = bmt4.c1)
4617 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
4618 -> Hash (cost=xxx rows=1130 width=xxx)
4619 -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
4620 -> Hash (cost=xxx rows=100 width=xxx)
4621 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
4625 \o results/ut-R.tmpout
4626 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;
4628 \! sql/maskout.sh results/ut-R.tmpout
4630 ------------------------------------------------------------------------------------------------
4631 Nested Loop (cost=xxx rows=100 width=xxx)
4632 Join Filter: (bmt1.c1 = bmt4.c1)
4633 -> Merge Join (cost=xxx rows=100 width=xxx)
4634 Merge Cond: (bmt1.c1 = bmt2.c1)
4635 -> Merge Join (cost=xxx rows=1000 width=xxx)
4636 Merge Cond: (bmt1.c1 = bmt3.c1)
4637 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
4638 -> Index Only Scan using t3_i1 on t3 bmt3 (cost=xxx rows=1130 width=xxx)
4639 -> Sort (cost=xxx rows=100 width=xxx)
4641 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
4642 -> Index Only Scan using t4_i1 on t4 bmt4 (cost=xxx rows=1 width=xxx)
4643 Index Cond: (c1 = bmt3.c1)
4646 \o results/ut-R.tmpout
4648 Leading(bmt4 bmt3 bmt2 bmt1)
4649 Rows(bmt4 bmt1 *0.5)
4651 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;
4654 Leading(bmt4 bmt3 bmt2 bmt1)
4655 Rows(bmt1 bmt4 *0.5)
4661 \! sql/maskout.sh results/ut-R.tmpout
4663 -----------------------------------------------------------------------------------------
4664 Merge Join (cost=xxx rows=50 width=xxx)
4665 Merge Cond: (bmt1.c1 = bmt2.c1)
4666 -> Index Only Scan using t1_i1 on t1 bmt1 (cost=xxx rows=1000 width=xxx)
4667 -> Sort (cost=xxx rows=100 width=xxx)
4669 -> Hash Join (cost=xxx rows=100 width=xxx)
4670 Hash Cond: (bmt3.c1 = bmt2.c1)
4671 -> Hash Join (cost=xxx rows=1130 width=xxx)
4672 Hash Cond: (bmt3.c1 = bmt4.c1)
4673 -> Seq Scan on t3 bmt3 (cost=xxx rows=1130 width=xxx)
4674 -> Hash (cost=xxx rows=1130 width=xxx)
4675 -> Seq Scan on t4 bmt4 (cost=xxx rows=1130 width=xxx)
4676 -> Hash (cost=xxx rows=100 width=xxx)
4677 -> Seq Scan on t2 bmt2 (cost=xxx rows=100 width=xxx)
4681 ---- No. R-3-1 abusolute value
4684 \o results/ut-R.tmpout
4686 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4687 WARNING: Force estimate to be at least one row, to avoid possible divide-by-zero when interpolating costs : Rows(t1 t2 #0)
4696 \! sql/maskout.sh results/ut-R.tmpout
4698 ---------------------------------------------------------------------------
4699 Merge Join (cost=xxx rows=1 width=xxx)
4700 Merge Cond: (t1.c1 = t2.c1)
4701 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
4702 -> Sort (cost=xxx rows=100 width=xxx)
4704 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4708 \o results/ut-R.tmpout
4710 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4719 \! sql/maskout.sh results/ut-R.tmpout
4721 ---------------------------------------------------------------------------
4722 Merge Join (cost=xxx rows=5 width=xxx)
4723 Merge Cond: (t1.c1 = t2.c1)
4724 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
4725 -> Sort (cost=xxx rows=100 width=xxx)
4727 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4731 ---- No. R-3-2 increase or decrease value
4734 \o results/ut-R.tmpout
4736 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4745 \! sql/maskout.sh results/ut-R.tmpout
4747 ---------------------------------------------------------------------------
4748 Merge Join (cost=xxx rows=101 width=xxx)
4749 Merge Cond: (t1.c1 = t2.c1)
4750 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
4751 -> Sort (cost=xxx rows=100 width=xxx)
4753 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4757 \o results/ut-R.tmpout
4759 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4768 \! sql/maskout.sh results/ut-R.tmpout
4770 ---------------------------------------------------------------------------
4771 Merge Join (cost=xxx rows=99 width=xxx)
4772 Merge Cond: (t1.c1 = t2.c1)
4773 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
4774 -> Sort (cost=xxx rows=100 width=xxx)
4776 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4780 \o results/ut-R.tmpout
4781 /*+Rows(t1 t2 -1000)*/
4782 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4783 WARNING: Force estimate to be at least one row, to avoid possible divide-by-zero when interpolating costs : Rows(t1 t2 -1000)
4792 \! sql/maskout.sh results/ut-R.tmpout
4794 ---------------------------------------------------------------------------
4795 Merge Join (cost=xxx rows=1 width=xxx)
4796 Merge Cond: (t1.c1 = t2.c1)
4797 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
4798 -> Sort (cost=xxx rows=100 width=xxx)
4800 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4804 ---- No. R-3-3 multiple
4807 \o results/ut-R.tmpout
4809 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4810 WARNING: Force estimate to be at least one row, to avoid possible divide-by-zero when interpolating costs : Rows(t1 t2 *0)
4819 \! sql/maskout.sh results/ut-R.tmpout
4821 ---------------------------------------------------------------------------
4822 Merge Join (cost=xxx rows=1 width=xxx)
4823 Merge Cond: (t1.c1 = t2.c1)
4824 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
4825 -> Sort (cost=xxx rows=100 width=xxx)
4827 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4831 \o results/ut-R.tmpout
4833 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4842 \! sql/maskout.sh results/ut-R.tmpout
4844 ---------------------------------------------------------------------------
4845 Merge Join (cost=xxx rows=200 width=xxx)
4846 Merge Cond: (t1.c1 = t2.c1)
4847 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
4848 -> Sort (cost=xxx rows=100 width=xxx)
4850 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4854 \o results/ut-R.tmpout
4855 /*+Rows(t1 t2 *0.1)*/
4856 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
4865 \! sql/maskout.sh results/ut-R.tmpout
4867 ---------------------------------------------------------------------------
4868 Merge Join (cost=xxx rows=10 width=xxx)
4869 Merge Cond: (t1.c1 = t2.c1)
4870 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
4871 -> Sort (cost=xxx rows=100 width=xxx)
4873 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
4877 ---- No. R-3-4 join inherit tables
4880 \o results/ut-R.tmpout
4881 EXPLAIN SELECT * FROM s1.p1, s1.p2 WHERE p1.c1 = p2.c1;
4883 \! sql/maskout.sh results/ut-R.tmpout
4885 -------------------------------------------------------------------------
4886 Hash Join (cost=xxx rows=301 width=xxx)
4887 Hash Cond: (p2.c1 = p1.c1)
4888 -> Append (cost=xxx rows=304 width=xxx)
4889 -> Seq Scan on p2 (cost=xxx rows=1 width=xxx)
4890 -> Seq Scan on p2c1 (cost=xxx rows=1 width=xxx)
4891 -> Seq Scan on p2c2 (cost=xxx rows=1 width=xxx)
4892 -> Seq Scan on p2c3 (cost=xxx rows=1 width=xxx)
4893 -> Seq Scan on p2c1c1 (cost=xxx rows=50 width=xxx)
4894 -> Seq Scan on p2c1c2 (cost=xxx rows=50 width=xxx)
4895 -> Seq Scan on p2c2c1 (cost=xxx rows=50 width=xxx)
4896 -> Seq Scan on p2c2c2 (cost=xxx rows=50 width=xxx)
4897 -> Seq Scan on p2c3c1 (cost=xxx rows=50 width=xxx)
4898 -> Seq Scan on p2c3c2 (cost=xxx rows=50 width=xxx)
4899 -> Hash (cost=xxx rows=301 width=xxx)
4900 -> Append (cost=xxx rows=301 width=xxx)
4901 -> Seq Scan on p1 (cost=xxx rows=1 width=xxx)
4902 -> Seq Scan on p1c1 (cost=xxx rows=100 width=xxx)
4903 -> Seq Scan on p1c2 (cost=xxx rows=100 width=xxx)
4904 -> Seq Scan on p1c3 (cost=xxx rows=100 width=xxx)
4907 \o results/ut-R.tmpout
4909 EXPLAIN SELECT * FROM s1.p1, s1.p2 WHERE p1.c1 = p2.c1;
4918 \! sql/maskout.sh results/ut-R.tmpout
4920 -------------------------------------------------------------------------
4921 Hash Join (cost=xxx rows=1 width=xxx)
4922 Hash Cond: (p2.c1 = p1.c1)
4923 -> Append (cost=xxx rows=304 width=xxx)
4924 -> Seq Scan on p2 (cost=xxx rows=1 width=xxx)
4925 -> Seq Scan on p2c1 (cost=xxx rows=1 width=xxx)
4926 -> Seq Scan on p2c2 (cost=xxx rows=1 width=xxx)
4927 -> Seq Scan on p2c3 (cost=xxx rows=1 width=xxx)
4928 -> Seq Scan on p2c1c1 (cost=xxx rows=50 width=xxx)
4929 -> Seq Scan on p2c1c2 (cost=xxx rows=50 width=xxx)
4930 -> Seq Scan on p2c2c1 (cost=xxx rows=50 width=xxx)
4931 -> Seq Scan on p2c2c2 (cost=xxx rows=50 width=xxx)
4932 -> Seq Scan on p2c3c1 (cost=xxx rows=50 width=xxx)
4933 -> Seq Scan on p2c3c2 (cost=xxx rows=50 width=xxx)
4934 -> Hash (cost=xxx rows=301 width=xxx)
4935 -> Append (cost=xxx rows=301 width=xxx)
4936 -> Seq Scan on p1 (cost=xxx rows=1 width=xxx)
4937 -> Seq Scan on p1c1 (cost=xxx rows=100 width=xxx)
4938 -> Seq Scan on p1c2 (cost=xxx rows=100 width=xxx)
4939 -> Seq Scan on p1c3 (cost=xxx rows=100 width=xxx)
4943 \o results/ut-R.tmpout
4944 EXPLAIN SELECT * FROM s1.p1, s1.p2 WHERE p1.c1 = p2.c1;
4946 \! sql/maskout.sh results/ut-R.tmpout
4948 -------------------------------------------------------------------------
4949 Hash Join (cost=xxx rows=301 width=xxx)
4950 Hash Cond: (p2.c1 = p1.c1)
4951 -> Append (cost=xxx rows=304 width=xxx)
4952 -> Seq Scan on p2 (cost=xxx rows=1 width=xxx)
4953 -> Seq Scan on p2c1 (cost=xxx rows=1 width=xxx)
4954 -> Seq Scan on p2c2 (cost=xxx rows=1 width=xxx)
4955 -> Seq Scan on p2c3 (cost=xxx rows=1 width=xxx)
4956 -> Seq Scan on p2c1c1 (cost=xxx rows=50 width=xxx)
4957 -> Seq Scan on p2c1c2 (cost=xxx rows=50 width=xxx)
4958 -> Seq Scan on p2c2c1 (cost=xxx rows=50 width=xxx)
4959 -> Seq Scan on p2c2c2 (cost=xxx rows=50 width=xxx)
4960 -> Seq Scan on p2c3c1 (cost=xxx rows=50 width=xxx)
4961 -> Seq Scan on p2c3c2 (cost=xxx rows=50 width=xxx)
4962 -> Hash (cost=xxx rows=301 width=xxx)
4963 -> Append (cost=xxx rows=301 width=xxx)
4964 -> Seq Scan on p1 (cost=xxx rows=1 width=xxx)
4965 -> Seq Scan on p1c1 (cost=xxx rows=100 width=xxx)
4966 -> Seq Scan on p1c2 (cost=xxx rows=100 width=xxx)
4967 -> Seq Scan on p1c3 (cost=xxx rows=100 width=xxx)
4970 \o results/ut-R.tmpout
4971 /*+Rows(p1c1 p2c1 #1)*/
4972 EXPLAIN SELECT * FROM s1.p1, s1.p2 WHERE p1.c1 = p2.c1;
4981 \! sql/maskout.sh results/ut-R.tmpout
4983 -------------------------------------------------------------------------
4984 Hash Join (cost=xxx rows=301 width=xxx)
4985 Hash Cond: (p2.c1 = p1.c1)
4986 -> Append (cost=xxx rows=304 width=xxx)
4987 -> Seq Scan on p2 (cost=xxx rows=1 width=xxx)
4988 -> Seq Scan on p2c1 (cost=xxx rows=1 width=xxx)
4989 -> Seq Scan on p2c2 (cost=xxx rows=1 width=xxx)
4990 -> Seq Scan on p2c3 (cost=xxx rows=1 width=xxx)
4991 -> Seq Scan on p2c1c1 (cost=xxx rows=50 width=xxx)
4992 -> Seq Scan on p2c1c2 (cost=xxx rows=50 width=xxx)
4993 -> Seq Scan on p2c2c1 (cost=xxx rows=50 width=xxx)
4994 -> Seq Scan on p2c2c2 (cost=xxx rows=50 width=xxx)
4995 -> Seq Scan on p2c3c1 (cost=xxx rows=50 width=xxx)
4996 -> Seq Scan on p2c3c2 (cost=xxx rows=50 width=xxx)
4997 -> Hash (cost=xxx rows=301 width=xxx)
4998 -> Append (cost=xxx rows=301 width=xxx)
4999 -> Seq Scan on p1 (cost=xxx rows=1 width=xxx)
5000 -> Seq Scan on p1c1 (cost=xxx rows=100 width=xxx)
5001 -> Seq Scan on p1c2 (cost=xxx rows=100 width=xxx)
5002 -> Seq Scan on p1c3 (cost=xxx rows=100 width=xxx)
5006 ---- No. R-3-5 conflict join method hint
5009 \o results/ut-R.tmpout
5010 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5012 \! sql/maskout.sh results/ut-R.tmpout
5014 ---------------------------------------------------------------------------
5015 Merge Join (cost=xxx rows=100 width=xxx)
5016 Merge Cond: (t1.c1 = t2.c1)
5017 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5018 -> Sort (cost=xxx rows=100 width=xxx)
5020 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5023 \o results/ut-R.tmpout
5024 /*+Rows(t1 t2 #1)Rows(t1 t2 #1)*/
5025 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5026 INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t1 t2 #1)"
5027 DETAIL: Conflict rows hint.
5037 \! sql/maskout.sh results/ut-R.tmpout
5039 ---------------------------------------------------------------------------
5040 Merge Join (cost=xxx rows=1 width=xxx)
5041 Merge Cond: (t1.c1 = t2.c1)
5042 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5043 -> Sort (cost=xxx rows=100 width=xxx)
5045 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5049 \o results/ut-R.tmpout
5050 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5052 \! sql/maskout.sh results/ut-R.tmpout
5054 ---------------------------------------------------------------------------
5055 Merge Join (cost=xxx rows=100 width=xxx)
5056 Merge Cond: (t1.c1 = t2.c1)
5057 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5058 -> Sort (cost=xxx rows=100 width=xxx)
5060 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5063 \o results/ut-R.tmpout
5064 /*+Rows(t1 t2 #1)Rows(t1 t2 #1)Rows(t1 t2 #1)*/
5065 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5066 INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t1 t2 #1)Rows(t1 t2 #1)"
5067 DETAIL: Conflict rows hint.
5068 INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t1 t2 #1)"
5069 DETAIL: Conflict rows hint.
5080 \! sql/maskout.sh results/ut-R.tmpout
5082 ---------------------------------------------------------------------------
5083 Merge Join (cost=xxx rows=1 width=xxx)
5084 Merge Cond: (t1.c1 = t2.c1)
5085 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5086 -> Sort (cost=xxx rows=100 width=xxx)
5088 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5092 \o results/ut-R.tmpout
5093 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5095 \! sql/maskout.sh results/ut-R.tmpout
5097 ---------------------------------------------------------------------------
5098 Merge Join (cost=xxx rows=100 width=xxx)
5099 Merge Cond: (t1.c1 = t2.c1)
5100 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5101 -> Sort (cost=xxx rows=100 width=xxx)
5103 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5106 \o results/ut-R.tmpout
5107 /*+Rows(t1 t2 #1)Rows(t2 t1 #1)*/
5108 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5109 INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t2 t1 #1)"
5110 DETAIL: Conflict rows hint.
5120 \! sql/maskout.sh results/ut-R.tmpout
5122 ---------------------------------------------------------------------------
5123 Merge Join (cost=xxx rows=1 width=xxx)
5124 Merge Cond: (t1.c1 = t2.c1)
5125 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5126 -> Sort (cost=xxx rows=100 width=xxx)
5128 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5132 \o results/ut-R.tmpout
5133 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5135 \! sql/maskout.sh results/ut-R.tmpout
5137 ---------------------------------------------------------------------------
5138 Merge Join (cost=xxx rows=100 width=xxx)
5139 Merge Cond: (t1.c1 = t2.c1)
5140 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5141 -> Sort (cost=xxx rows=100 width=xxx)
5143 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5146 \o results/ut-R.tmpout
5147 /*+Rows(t2 t1 #1)Rows(t1 t2 #1)Rows(t2 t1 #1)*/
5148 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5149 INFO: pg_hint_plan: hint syntax error at or near "Rows(t2 t1 #1)Rows(t1 t2 #1)Rows(t2 t1 #1)"
5150 DETAIL: Conflict rows hint.
5151 INFO: pg_hint_plan: hint syntax error at or near "Rows(t1 t2 #1)Rows(t2 t1 #1)"
5152 DETAIL: Conflict rows hint.
5163 \! sql/maskout.sh results/ut-R.tmpout
5165 ---------------------------------------------------------------------------
5166 Merge Join (cost=xxx rows=1 width=xxx)
5167 Merge Cond: (t1.c1 = t2.c1)
5168 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5169 -> Sort (cost=xxx rows=100 width=xxx)
5171 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5175 ---- No. R-3-6 hint state output
5178 SET client_min_messages TO DEBUG1;
5179 \o results/ut-R.tmpout
5180 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5182 \! sql/maskout.sh results/ut-R.tmpout
5184 ---------------------------------------------------------------------------
5185 Merge Join (cost=xxx rows=100 width=xxx)
5186 Merge Cond: (t1.c1 = t2.c1)
5187 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5188 -> Sort (cost=xxx rows=100 width=xxx)
5190 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5193 \o results/ut-R.tmpout
5195 EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
5196 DEBUG: adjusted rows 100 to 101
5205 \! sql/maskout.sh results/ut-R.tmpout
5207 ---------------------------------------------------------------------------
5208 Merge Join (cost=xxx rows=101 width=xxx)
5209 Merge Cond: (t1.c1 = t2.c1)
5210 -> Index Scan using t1_i1 on t1 (cost=xxx rows=1000 width=xxx)
5211 -> Sort (cost=xxx rows=100 width=xxx)
5213 -> Seq Scan on t2 (cost=xxx rows=100 width=xxx)
5216 \! rm results/ut-R.tmpout