github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/sql/opt/memo/testdata/stats_quality/tpch/q09 (about) 1 import file=tpch_schema 2 ---- 3 4 import file=tpch_stats 5 ---- 6 7 # -------------------------------------------------- 8 # Q9 9 # Product Type Profit Measure 10 # Determines how much profit is made on a given line of parts, broken out by 11 # supplier nation and year. 12 # 13 # Finds, for each nation and each year, the profit for all parts ordered in that 14 # year that contain a specified substring in their names and that were filled by 15 # a supplier in that nation. The profit is defined as the sum of: 16 # 17 # [(l_extendedprice*(1-l_discount)) - (ps_supplycost * l_quantity)] 18 # 19 # for all lineitems describing parts in the specified line. The query lists the 20 # nations in ascending alphabetical order and, for each nation, the year and 21 # profit in descending order by year (most recent first). 22 # 23 # TODO: 24 # 1. Join ordering 25 # 2. Push down equivalent column comparisons 26 # -------------------------------------------------- 27 save-tables database=tpch save-tables-prefix=q9 28 SELECT 29 nation, 30 o_year, 31 sum(amount) AS sum_profit 32 FROM ( 33 SELECT 34 n_name AS nation, 35 extract(year FROM o_orderdate) AS o_year, 36 l_extendedprice * (1 - l_discount) - ps_supplycost * l_quantity AS amount 37 FROM 38 part, 39 supplier, 40 lineitem, 41 partsupp, 42 orders, 43 nation 44 WHERE 45 s_suppkey = l_suppkey 46 AND ps_suppkey = l_suppkey 47 AND ps_partkey = l_partkey 48 AND p_partkey = l_partkey 49 AND o_orderkey = l_orderkey 50 AND s_nationkey = n_nationkey 51 AND p_name LIKE '%green%' 52 ) AS profit 53 GROUP BY 54 nation, 55 o_year 56 ORDER BY 57 nation, 58 o_year DESC; 59 ---- 60 sort 61 ├── save-table-name: q9_sort_1 62 ├── columns: nation:48(char!null) o_year:51(float) sum_profit:53(float!null) 63 ├── immutable 64 ├── stats: [rows=1500.68104, distinct(48)=25, null(48)=0, distinct(51)=1208.19298, null(51)=0, distinct(53)=1500.68104, null(53)=0, distinct(48,51)=1500.68104, null(48,51)=0] 65 ├── key: (48,51) 66 ├── fd: (48,51)-->(53) 67 ├── ordering: +48,-51 68 └── group-by 69 ├── save-table-name: q9_group_by_2 70 ├── columns: n_name:48(char!null) o_year:51(float) sum:53(float!null) 71 ├── grouping columns: n_name:48(char!null) o_year:51(float) 72 ├── immutable 73 ├── stats: [rows=1500.68104, distinct(48)=25, null(48)=0, distinct(51)=1208.19298, null(51)=0, distinct(53)=1500.68104, null(53)=0, distinct(48,51)=1500.68104, null(48,51)=0] 74 ├── key: (48,51) 75 ├── fd: (48,51)-->(53) 76 ├── project 77 │ ├── save-table-name: q9_project_3 78 │ ├── columns: o_year:51(float) amount:52(float!null) n_name:48(char!null) 79 │ ├── immutable 80 │ ├── stats: [rows=2406.66318, distinct(48)=25, null(48)=0, distinct(51)=1208.19298, null(51)=0, distinct(52)=1508.01915, null(52)=0, distinct(48,51)=1500.68104, null(48,51)=0] 81 │ ├── inner-join (lookup part) 82 │ │ ├── save-table-name: q9_lookup_join_4 83 │ │ ├── columns: p_partkey:1(int!null) p_name:2(varchar!null) s_suppkey:10(int!null) s_nationkey:13(int!null) l_orderkey:17(int!null) l_partkey:18(int!null) l_suppkey:19(int!null) l_quantity:21(float!null) l_extendedprice:22(float!null) l_discount:23(float!null) ps_partkey:33(int!null) ps_suppkey:34(int!null) ps_supplycost:36(float!null) o_orderkey:38(int!null) o_orderdate:42(date!null) n_nationkey:47(int!null) n_name:48(char!null) 84 │ │ ├── key columns: [18] = [1] 85 │ │ ├── lookup columns are key 86 │ │ ├── stats: [rows=2406.66318, distinct(1)=2357.09397, null(1)=0, distinct(2)=2363.75844, null(2)=0, distinct(10)=1520.84987, null(10)=0, distinct(13)=25, null(13)=0, distinct(17)=1508.01915, null(17)=0, distinct(18)=2357.09397, null(18)=0, distinct(19)=1520.84987, null(19)=0, distinct(21)=50, null(21)=0, distinct(22)=1507.67014, null(22)=0, distinct(23)=11, null(23)=0, distinct(33)=1508.01915, null(33)=0, distinct(34)=1443.61652, null(34)=0, distinct(36)=1503.89598, null(36)=0, distinct(38)=1508.01915, null(38)=0, distinct(42)=1208.19298, null(42)=0, distinct(47)=25, null(47)=0, distinct(48)=25, null(48)=0, distinct(42,48)=1500.68104, null(42,48)=0, distinct(21-23,36)=1508.01915, null(21-23,36)=0] 87 │ │ ├── fd: (1)-->(2), (10)-->(13), (33,34)-->(36), (38)-->(42), (47)-->(48), (19)==(10,34), (34)==(10,19), (18)==(1,33), (33)==(1,18), (17)==(38), (38)==(17), (10)==(19,34), (13)==(47), (47)==(13), (1)==(18,33) 88 │ │ ├── inner-join (hash) 89 │ │ │ ├── save-table-name: q9_inner_join_5 90 │ │ │ ├── columns: s_suppkey:10(int!null) s_nationkey:13(int!null) l_orderkey:17(int!null) l_partkey:18(int!null) l_suppkey:19(int!null) l_quantity:21(float!null) l_extendedprice:22(float!null) l_discount:23(float!null) ps_partkey:33(int!null) ps_suppkey:34(int!null) ps_supplycost:36(float!null) o_orderkey:38(int!null) o_orderdate:42(date!null) n_nationkey:47(int!null) n_name:48(char!null) 91 │ │ │ ├── stats: [rows=2404.93063, distinct(10)=2404.93063, null(10)=0, distinct(13)=25, null(13)=0, distinct(17)=2357.09397, null(17)=0, distinct(18)=2357.09397, null(18)=0, distinct(19)=2404.93063, null(19)=0, distinct(21)=50, null(21)=0, distinct(22)=2355.81122, null(22)=0, distinct(23)=11, null(23)=0, distinct(33)=2357.09397, null(33)=0, distinct(34)=2135.61418, null(34)=0, distinct(36)=2342.00113, null(36)=0, distinct(38)=2357.09397, null(38)=0, distinct(42)=1520.49036, null(42)=0, distinct(47)=25, null(47)=0, distinct(48)=25, null(48)=0, distinct(42,48)=2330.3251, null(42,48)=0, distinct(21-23,36)=2357.09397, null(21-23,36)=0] 92 │ │ │ ├── fd: (10)-->(13), (33,34)-->(36), (38)-->(42), (47)-->(48), (19)==(10,34), (34)==(10,19), (18)==(33), (33)==(18), (17)==(38), (38)==(17), (10)==(19,34), (13)==(47), (47)==(13) 93 │ │ │ ├── inner-join (cross) 94 │ │ │ │ ├── save-table-name: q9_inner_join_6 95 │ │ │ │ ├── columns: l_orderkey:17(int!null) l_partkey:18(int!null) l_suppkey:19(int!null) l_quantity:21(float!null) l_extendedprice:22(float!null) l_discount:23(float!null) ps_partkey:33(int!null) ps_suppkey:34(int!null) ps_supplycost:36(float!null) o_orderkey:38(int!null) o_orderdate:42(date!null) n_nationkey:47(int!null) n_name:48(char!null) 96 │ │ │ │ ├── stats: [rows=59642.2797, distinct(17)=59642.2797, null(17)=0, distinct(18)=59642.2797, null(18)=0, distinct(19)=9920, null(19)=0, distinct(21)=50, null(21)=0, distinct(22)=58063.808, null(22)=0, distinct(23)=11, null(23)=0, distinct(33)=59642.2797, null(33)=0, distinct(34)=9920, null(34)=0, distinct(36)=45145.1912, null(36)=0, distinct(38)=59642.2797, null(38)=0, distinct(42)=2406, null(42)=0, distinct(47)=25, null(47)=0, distinct(48)=25, null(48)=0, distinct(42,48)=37953.5881, null(42,48)=0, distinct(21-23,36)=59642.2797, null(21-23,36)=0] 97 │ │ │ │ ├── fd: (33,34)-->(36), (38)-->(42), (47)-->(48), (19)==(34), (34)==(19), (18)==(33), (33)==(18), (17)==(38), (38)==(17) 98 │ │ │ │ ├── inner-join (lookup orders) 99 │ │ │ │ │ ├── save-table-name: q9_lookup_join_7 100 │ │ │ │ │ ├── columns: l_orderkey:17(int!null) l_partkey:18(int!null) l_suppkey:19(int!null) l_quantity:21(float!null) l_extendedprice:22(float!null) l_discount:23(float!null) ps_partkey:33(int!null) ps_suppkey:34(int!null) ps_supplycost:36(float!null) o_orderkey:38(int!null) o_orderdate:42(date!null) 101 │ │ │ │ │ ├── key columns: [17] = [38] 102 │ │ │ │ │ ├── lookup columns are key 103 │ │ │ │ │ ├── stats: [rows=2385.69119, distinct(17)=2385.69119, null(17)=0, distinct(18)=2385.69119, null(18)=0, distinct(19)=2385.69119, null(19)=0, distinct(21)=50, null(21)=0, distinct(22)=2385.69119, null(22)=0, distinct(23)=11, null(23)=0, distinct(33)=2385.69119, null(33)=0, distinct(34)=2385.69119, null(34)=0, distinct(36)=2370.13724, null(36)=0, distinct(38)=2385.69119, null(38)=0, distinct(42)=1518.14352, null(42)=0] 104 │ │ │ │ │ ├── fd: (38)-->(42), (33,34)-->(36), (19)==(34), (34)==(19), (18)==(33), (33)==(18), (17)==(38), (38)==(17) 105 │ │ │ │ │ ├── inner-join (hash) 106 │ │ │ │ │ │ ├── save-table-name: q9_inner_join_8 107 │ │ │ │ │ │ ├── columns: l_orderkey:17(int!null) l_partkey:18(int!null) l_suppkey:19(int!null) l_quantity:21(float!null) l_extendedprice:22(float!null) l_discount:23(float!null) ps_partkey:33(int!null) ps_suppkey:34(int!null) ps_supplycost:36(float!null) 108 │ │ │ │ │ │ ├── stats: [rows=2429.06305, distinct(17)=2427.13263, null(17)=0, distinct(18)=2429.06305, null(18)=0, distinct(19)=2429.06305, null(19)=0, distinct(21)=50, null(21)=0, distinct(22)=2425.87997, null(22)=0, distinct(23)=11, null(23)=0, distinct(33)=2429.06305, null(33)=0, distinct(34)=2429.06305, null(34)=0, distinct(36)=2399.90856, null(36)=0] 109 │ │ │ │ │ │ ├── fd: (33,34)-->(36), (19)==(34), (34)==(19), (18)==(33), (33)==(18) 110 │ │ │ │ │ │ ├── scan lineitem 111 │ │ │ │ │ │ │ ├── save-table-name: q9_scan_9 112 │ │ │ │ │ │ │ ├── columns: l_orderkey:17(int!null) l_partkey:18(int!null) l_suppkey:19(int!null) l_quantity:21(float!null) l_extendedprice:22(float!null) l_discount:23(float!null) 113 │ │ │ │ │ │ │ └── stats: [rows=6001215, distinct(17)=1527270, null(17)=0, distinct(18)=199241, null(18)=0, distinct(19)=9920, null(19)=0, distinct(21)=50, null(21)=0, distinct(22)=925955, null(22)=0, distinct(23)=11, null(23)=0, distinct(21-23)=6001215, null(21-23)=0] 114 │ │ │ │ │ │ │ histogram(17)= 0 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 115 │ │ │ │ │ │ │ <--- 326 ------- 28929 ------- 50503 ------- 89793 ------- 115938 ------- 146944 ------- 176768 ------- 211201 ------- 237860 ------- 266885 ------- 297604 ------- 330021 ------- 365889 ------- 398951 ------- 426117 ------- 451328 ------- 472134 ------- 499590 ------- 529284 ------- 557254 ------- 589154 ------- 619394 ------- 642951 ------- 670113 ------- 692931 ------- 721157 ------- 751687 ------- 777766 ------- 804582 ------- 836740 ------- 868868 ------- 898912 ------- 922500 ------- 946403 ------- 984870 ------- 1007936 ------- 1030117 ------- 1062275 ------- 1093572 ------- 1120709 ------- 1150981 ------- 1182786 ------- 1206406 ------- 1234116 ------- 1260961 ------- 1290502 ------- 1329510 ------- 1355426 ------- 1381313 ------- 1409796 ------- 1445254 ------- 1479233 ------- 1504935 ------- 1531079 ------- 1559650 ------- 1583616 ------- 1617504 ------- 1655749 ------- 1685185 ------- 1718183 ------- 1747716 ------- 1772131 ------- 1802372 ------- 1833315 ------- 1862403 ------- 1897894 ------- 1922819 ------- 1954405 ------- 1979329 ------- 2009859 ------- 2041670 ------- 2070851 ------- 2093828 ------- 2127973 ------- 2167777 ------- 2194883 ------- 2227814 ------- 2262437 ------- 2296353 ------- 2321024 ------- 2346051 ------- 2376257 ------- 2404932 ------- 2446273 ------- 2474081 ------- 2504515 ------- 2535302 ------- 2561413 ------- 2592737 ------- 2616801 ------- 2646112 ------- 2676546 ------- 2702116 ------- 2732454 ------- 2765382 ------- 2799495 ------- 2828866 ------- 2868737 ------- 2910625 ------- 2938464 ------- 2963140 ------- 3003302 ------- 3043264 ------- 3069123 ------- 3095909 ------- 3126693 ------- 3160485 ------- 3196039 ------- 3229504 ------- 3259712 ------- 3286439 ------- 3318852 ------- 3346821 ------- 3370119 ------- 3395204 ------- 3425888 ------- 3448611 ------- 3476130 ------- 3502372 ------- 3529474 ------- 3556390 ------- 3583553 ------- 3612550 ------- 3647875 ------- 3679140 ------- 3702661 ------- 3738017 ------- 3778050 ------- 3806114 ------- 3839074 ------- 3872805 ------- 3905697 ------- 3926212 ------- 3959841 ------- 3997281 ------- 4033861 ------- 4063591 ------- 4097831 ------- 4124807 ------- 4158656 ------- 4195748 ------- 4234274 ------- 4269952 ------- 4298949 ------- 4332806 ------- 4364705 ------- 4398246 ------- 4430695 ------- 4466403 ------- 4494662 ------- 4524420 ------- 4558561 ------- 4601092 ------- 4632871 ------- 4658694 ------- 4690501 ------- 4728066 ------- 4758657 ------- 4788294 ------- 4818597 ------- 4855874 ------- 4890913 ------- 4915366 ------- 4940709 ------- 4972357 ------- 4995298 ------- 5019523 ------- 5043329 ------- 5077376 ------- 5109920 ------- 5136582 ------- 5161152 ------- 5191846 ------- 5219973 ------- 5251015 ------- 5282021 ------- 5312355 ------- 5343207 ------- 5381318 ------- 5416163 ------- 5445382 ------- 5476933 ------- 5509185 ------- 5539237 ------- 5566818 ------- 5588739 ------- 5620481 ------- 5644001 ------- 5667010 ------- 5689476 ------- 5724709 ------- 5755398 ------- 5790598 ------- 5819425 ------- 5846341 ------- 5874656 ------- 5908067 ------- 5933572 ------- 5962659 ------- 5999971 116 │ │ │ │ │ │ │ histogram(18)= 0 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 1200 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 1200 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 28805 1200 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 28805 1200 29405 600 29405 600 29405 600 29405 600 29405 1200 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 1200 29405 600 29405 600 29405 600 28805 1200 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 28805 1200 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 28805 1200 29405 600 29405 600 29405 600 29405 600 29405 600 29405 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 1200 29405 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 30006 600 117 │ │ │ │ │ │ │ <--- 29 ------- 959 ------- 1845 ------- 3339 ------- 4395 ------- 5525 ------- 6349 ------- 7298 ------- 8340 ------- 9659 ------- 10756 ------- 11642 ------- 12662 ------- 13609 ------- 14663 ------- 15886 ------- 16905 ------- 17902 ------- 18705 ------- 19722 ------- 20827 ------- 21789 ------- 23026 ------- 24201 ------- 25338 ------- 26224 ------- 27182 ------- 28202 ------- 29058 ------- 29919 ------- 31031 ------- 32058 ------- 33058 ------- 34089 ------- 34972 ------- 35929 ------- 36995 ------- 37901 ------- 38814 ------- 39884 ------- 41044 ------- 42034 ------- 43257 ------- 44224 ------- 45196 ------- 46284 ------- 47373 ------- 48352 ------- 49175 ------- 50212 ------- 51359 ------- 52449 ------- 53225 ------- 54295 ------- 55556 ------- 56736 ------- 57984 ------- 59102 ------- 60117 ------- 61111 ------- 62007 ------- 63054 ------- 63923 ------- 64971 ------- 66018 ------- 67114 ------- 67979 ------- 69163 ------- 70178 ------- 71421 ------- 72412 ------- 73432 ------- 74444 ------- 75421 ------- 76307 ------- 77194 ------- 78249 ------- 79229 ------- 80220 ------- 81103 ------- 81841 ------- 83133 ------- 84398 ------- 85526 ------- 86382 ------- 87333 ------- 88313 ------- 89185 ------- 90240 ------- 91121 ------- 91927 ------- 92840 ------- 93562 ------- 94443 ------- 95372 ------- 96282 ------- 97084 ------- 97969 ------- 99105 ------- 100036 ------- 100911 ------- 101928 ------- 102725 ------- 103625 ------- 104599 ------- 105568 ------- 106366 ------- 107318 ------- 108221 ------- 109084 ------- 110150 ------- 111130 ------- 112290 ------- 113258 ------- 114514 ------- 115361 ------- 116860 ------- 118141 ------- 119083 ------- 120205 ------- 121265 ------- 122280 ------- 123210 ------- 124316 ------- 125393 ------- 126419 ------- 127466 ------- 128467 ------- 129550 ------- 130729 ------- 131956 ------- 133065 ------- 134173 ------- 135106 ------- 136339 ------- 137237 ------- 138221 ------- 139139 ------- 140103 ------- 141250 ------- 142059 ------- 142984 ------- 144048 ------- 145243 ------- 146186 ------- 147153 ------- 148099 ------- 149103 ------- 149945 ------- 150918 ------- 151860 ------- 152830 ------- 153863 ------- 154681 ------- 156041 ------- 156862 ------- 157688 ------- 158743 ------- 159676 ------- 160684 ------- 161325 ------- 162394 ------- 163558 ------- 164576 ------- 165819 ------- 166748 ------- 167734 ------- 168986 ------- 170087 ------- 170931 ------- 171933 ------- 172836 ------- 174038 ------- 175011 ------- 175836 ------- 176680 ------- 177741 ------- 178899 ------- 179745 ------- 180631 ------- 181664 ------- 182624 ------- 183639 ------- 184414 ------- 185145 ------- 186261 ------- 187090 ------- 188033 ------- 189049 ------- 190063 ------- 191040 ------- 192115 ------- 193408 ------- 194360 ------- 195506 ------- 196582 ------- 197367 ------- 198465 ------- 199096 ------- 199970 118 │ │ │ │ │ │ │ histogram(19)= 0 600 28805 3000 29405 600 29405 600 29405 600 29405 600 29405 1200 29405 1200 29405 1200 28805 1200 28805 1800 29405 600 29405 1200 29405 600 29405 600 28805 1200 29405 1200 28805 1200 28205 1800 29405 1200 29405 600 29405 1200 29405 1200 29405 600 29405 1200 29405 1200 28805 1800 29405 600 28805 1800 28805 1200 28805 1200 29405 1200 28805 1800 29405 600 28205 1800 29405 600 29405 600 28805 1200 29405 600 28805 1200 29405 600 29405 600 28805 1200 28805 1800 27605 2400 29405 600 28205 1800 29405 2400 29405 600 28805 1800 28205 1800 28805 1200 29405 3000 29405 1200 29405 1800 29405 600 29405 600 28205 1800 29405 600 29405 1800 29405 1800 29405 600 29405 600 28805 1200 28805 1200 29405 1200 28205 1800 29405 600 28805 1200 27605 2400 29405 600 29405 1200 29405 1200 29405 600 29405 1800 29405 1200 28205 1800 29405 600 29405 1200 29405 1200 28805 1200 28205 1800 29405 1800 28805 1200 29405 600 29405 1800 28205 2400 29405 600 28805 1200 28205 2400 28805 1200 27605 2400 28805 1200 29405 600 28805 1800 29405 1800 28805 600 28205 1800 28805 600 29405 600 29405 1200 28805 600 28805 1200 29405 1800 27605 1800 27605 2400 27605 1800 29405 1200 28805 600 28805 1200 29405 1200 28805 2400 28805 1200 28805 600 28205 1200 28205 1200 29405 600 28805 1200 29405 600 28205 2400 28205 1200 29405 600 29405 1800 28805 1200 28205 1200 27605 2400 27605 1800 28805 1200 29405 600 28805 1200 29405 600 29405 600 28805 1200 29405 600 29405 600 29405 600 28805 1200 29405 1200 28805 600 29405 1800 28205 1200 27605 1800 29405 600 29405 600 29405 1200 28805 1200 28805 1200 28205 1200 29405 1800 28205 1800 28805 600 28805 1200 28205 1200 29405 600 28805 1800 28205 1800 27605 2400 28805 600 29405 600 28805 1200 29405 600 28805 2400 28805 1200 28805 1200 28805 600 28205 1200 28805 1200 29405 600 29405 600 29405 1800 28805 600 28805 600 28805 2400 28805 600 28805 1800 28805 1200 28805 600 27005 2400 29405 600 28205 1800 29405 1200 27605 1800 28805 1200 28805 1200 29405 600 29405 600 29405 600 29405 1200 28805 600 29405 600 27605 2400 28805 1200 29405 600 28805 1800 28805 1800 28205 1200 28805 1200 28805 600 29405 1200 28205 1200 119 │ │ │ │ │ │ │ <--- 6 ------- 59 ------- 106 ------- 147 ------- 189 ------- 219 ------- 272 ------- 335 ------- 387 ------- 433 ------- 485 ------- 539 ------- 600 ------- 653 ------- 698 ------- 749 ------- 806 ------- 855 ------- 904 ------- 961 ------- 1008 ------- 1065 ------- 1115 ------- 1163 ------- 1212 ------- 1270 ------- 1329 ------- 1373 ------- 1417 ------- 1470 ------- 1514 ------- 1566 ------- 1616 ------- 1668 ------- 1719 ------- 1765 ------- 1819 ------- 1871 ------- 1926 ------- 1978 ------- 2030 ------- 2080 ------- 2128 ------- 2173 ------- 2223 ------- 2270 ------- 2318 ------- 2382 ------- 2444 ------- 2491 ------- 2534 ------- 2584 ------- 2632 ------- 2675 ------- 2736 ------- 2781 ------- 2841 ------- 2905 ------- 2940 ------- 2996 ------- 3045 ------- 3084 ------- 3124 ------- 3181 ------- 3224 ------- 3268 ------- 3318 ------- 3362 ------- 3419 ------- 3466 ------- 3515 ------- 3560 ------- 3615 ------- 3669 ------- 3725 ------- 3777 ------- 3825 ------- 3871 ------- 3923 ------- 3980 ------- 4035 ------- 4078 ------- 4135 ------- 4184 ------- 4244 ------- 4296 ------- 4346 ------- 4396 ------- 4444 ------- 4489 ------- 4540 ------- 4575 ------- 4627 ------- 4683 ------- 4731 ------- 4777 ------- 4831 ------- 4900 ------- 4953 ------- 5006 ------- 5061 ------- 5119 ------- 5161 ------- 5208 ------- 5260 ------- 5315 ------- 5361 ------- 5415 ------- 5474 ------- 5529 ------- 5572 ------- 5635 ------- 5689 ------- 5738 ------- 5792 ------- 5835 ------- 5890 ------- 5935 ------- 5997 ------- 6039 ------- 6094 ------- 6151 ------- 6201 ------- 6245 ------- 6291 ------- 6343 ------- 6387 ------- 6437 ------- 6480 ------- 6540 ------- 6580 ------- 6629 ------- 6673 ------- 6718 ------- 6771 ------- 6823 ------- 6878 ------- 6935 ------- 6974 ------- 7017 ------- 7060 ------- 7112 ------- 7170 ------- 7231 ------- 7279 ------- 7329 ------- 7373 ------- 7427 ------- 7477 ------- 7520 ------- 7564 ------- 7616 ------- 7671 ------- 7716 ------- 7760 ------- 7815 ------- 7861 ------- 7917 ------- 7969 ------- 8018 ------- 8063 ------- 8112 ------- 8180 ------- 8229 ------- 8268 ------- 8320 ------- 8376 ------- 8432 ------- 8474 ------- 8522 ------- 8569 ------- 8616 ------- 8664 ------- 8705 ------- 8765 ------- 8814 ------- 8868 ------- 8906 ------- 8948 ------- 8990 ------- 9035 ------- 9090 ------- 9137 ------- 9188 ------- 9241 ------- 9292 ------- 9354 ------- 9411 ------- 9472 ------- 9526 ------- 9569 ------- 9613 ------- 9658 ------- 9708 ------- 9737 ------- 9792 ------- 9838 ------- 9903 ------- 9952 ------- 10000 120 │ │ │ │ │ │ ├── scan partsupp 121 │ │ │ │ │ │ │ ├── save-table-name: q9_scan_10 122 │ │ │ │ │ │ │ ├── columns: ps_partkey:33(int!null) ps_suppkey:34(int!null) ps_supplycost:36(float!null) 123 │ │ │ │ │ │ │ ├── stats: [rows=800000, distinct(33)=199241, null(33)=0, distinct(34)=9920, null(34)=0, distinct(36)=100379, null(36)=0, distinct(33,34)=798302, null(33,34)=0] 124 │ │ │ │ │ │ │ │ histogram(33)= 0 80 3920 80 3920 80 3920 80 3920 80 3840 160 3840 160 3920 80 3920 80 3920 80 3920 80 3920 160 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3840 160 3920 80 3920 80 3920 80 3920 80 3920 160 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3840 160 3920 80 3920 80 3920 160 3920 80 3920 160 3920 80 3920 80 3920 80 3920 80 3920 80 3920 160 3920 80 3920 80 3920 80 3920 80 3920 80 3920 160 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 3920 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 3920 160 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 4000 80 125 │ │ │ │ │ │ │ │ <--- 4 ------ 793 ------ 1856 ------ 2808 ------ 3809 ------ 4923 ------ 5975 ------ 6944 ------ 8085 ------ 8945 ------ 9831 ------ 10952 ------ 11932 ------ 12775 ------ 13849 ------ 14925 ------ 16016 ------ 16828 ------ 17768 ------ 18705 ------ 19631 ------ 20600 ------ 21491 ------ 22254 ------ 23327 ------ 24491 ------ 25470 ------ 26331 ------ 27327 ------ 28308 ------ 29359 ------ 30542 ------ 31592 ------ 32495 ------ 33408 ------ 34624 ------ 35726 ------ 36676 ------ 37637 ------ 38485 ------ 39368 ------ 40372 ------ 41034 ------ 42185 ------ 43333 ------ 44466 ------ 45440 ------ 46571 ------ 47469 ------ 48346 ------ 49379 ------ 50571 ------ 51830 ------ 52967 ------ 53673 ------ 54656 ------ 55504 ------ 56539 ------ 57393 ------ 58366 ------ 59577 ------ 60559 ------ 61676 ------ 62471 ------ 63421 ------ 64449 ------ 65409 ------ 66254 ------ 67127 ------ 68127 ------ 69177 ------ 70183 ------ 71209 ------ 72101 ------ 73102 ------ 73994 ------ 74899 ------ 76016 ------ 77098 ------ 77842 ------ 79137 ------ 80242 ------ 81364 ------ 82331 ------ 83158 ------ 84283 ------ 85282 ------ 86437 ------ 87450 ------ 88419 ------ 89493 ------ 90478 ------ 91468 ------ 92552 ------ 93200 ------ 94191 ------ 95067 ------ 96272 ------ 97228 ------ 98126 ------ 99198 ------ 100219 ------ 101057 ------ 102038 ------ 102775 ------ 103711 ------ 104623 ------ 105710 ------ 106734 ------ 107932 ------ 109255 ------ 110220 ------ 111235 ------ 112174 ------ 113260 ------ 114081 ------ 115103 ------ 115864 ------ 116794 ------ 117741 ------ 118712 ------ 119470 ------ 120528 ------ 121572 ------ 122536 ------ 123629 ------ 124404 ------ 125301 ------ 126257 ------ 127139 ------ 128267 ------ 129258 ------ 130442 ------ 131845 ------ 133164 ------ 134005 ------ 135076 ------ 135868 ------ 137297 ------ 138777 ------ 139806 ------ 140741 ------ 141896 ------ 142719 ------ 143727 ------ 144645 ------ 145510 ------ 146507 ------ 147449 ------ 148467 ------ 149635 ------ 150563 ------ 151751 ------ 152613 ------ 153416 ------ 154612 ------ 155853 ------ 156866 ------ 158311 ------ 159230 ------ 160390 ------ 161455 ------ 162555 ------ 163435 ------ 164549 ------ 165663 ------ 166891 ------ 167757 ------ 168732 ------ 169644 ------ 170532 ------ 171671 ------ 172778 ------ 173599 ------ 174321 ------ 175624 ------ 176663 ------ 177632 ------ 178555 ------ 179551 ------ 180510 ------ 181682 ------ 182648 ------ 183408 ------ 184543 ------ 185722 ------ 186713 ------ 187787 ------ 188730 ------ 189604 ------ 190711 ------ 191690 ------ 192692 ------ 193702 ------ 194685 ------ 195725 ------ 196730 ------ 197724 ------ 198701 ------ 199973 126 │ │ │ │ │ │ │ │ histogram(34)= 0 80 3920 240 3920 80 3920 160 3920 80 3920 240 3920 80 3760 320 3680 320 3920 80 3920 160 3920 240 3920 80 3920 160 3840 160 3920 80 3920 80 3760 240 3840 160 3920 80 3840 160 3680 320 3920 80 3840 160 3840 160 3760 320 3840 160 3840 160 3920 80 3840 240 3920 80 3920 80 3840 160 3760 240 3920 160 3920 80 3920 80 3920 80 3920 320 3920 80 3920 160 3840 400 3760 240 3920 160 3920 160 3600 480 3920 80 3680 320 3840 160 3840 160 3920 240 3840 160 3920 160 3920 80 3920 160 3920 80 3760 240 3920 80 3920 80 3840 320 3840 160 3840 160 3920 240 3840 480 3920 160 3840 240 3920 160 3920 160 3920 80 3840 160 3920 80 3920 80 3920 80 3920 80 3840 240 3840 240 3920 80 3840 320 3920 80 3920 80 3920 240 3840 240 3920 160 3920 80 3840 160 3840 240 3920 240 3840 80 3680 320 3920 160 3840 160 3840 80 3920 80 3840 160 3840 160 3920 80 3920 80 3840 160 3920 80 3920 160 3840 240 3840 80 3840 160 3760 160 3920 80 3920 80 3840 240 3760 240 3840 80 3920 160 3840 80 3920 80 3920 80 3920 80 3920 160 3840 80 3920 80 3760 240 3920 80 3920 160 3760 160 3920 160 3840 80 3920 160 3840 160 3840 160 3600 320 3920 160 3840 80 3920 80 3680 320 3840 240 3760 160 3920 80 3920 80 3920 80 3920 80 3920 80 3680 320 3920 160 3840 160 3760 160 3920 240 3840 160 3840 240 3600 320 3840 80 3840 80 3920 160 3760 160 3840 160 3840 320 3840 80 3840 160 3760 240 3840 80 3840 240 3760 160 3840 160 3840 160 3920 240 3760 160 3840 80 3920 160 3680 240 3840 160 3840 160 3760 240 3920 80 3920 240 3760 160 3760 240 3840 80 3840 240 3840 240 3760 320 3760 240 3840 80 3840 160 3840 240 3760 320 3760 160 3840 160 3840 160 3840 80 3760 160 3840 80 3840 160 3920 160 3840 80 3920 80 3840 160 3920 80 3840 240 3840 80 3920 80 3760 240 3920 240 3840 80 3680 240 127 │ │ │ │ │ │ │ │ <--- 2 ------ 49 ------ 90 ------ 141 ------ 183 ------ 235 ------ 278 ------ 319 ------ 360 ------ 406 ------ 458 ------ 511 ------ 561 ------ 622 ------ 674 ------ 731 ------ 781 ------ 822 ------ 882 ------ 934 ------ 988 ------ 1026 ------ 1072 ------ 1114 ------ 1188 ------ 1245 ------ 1291 ------ 1335 ------ 1380 ------ 1433 ------ 1488 ------ 1537 ------ 1590 ------ 1642 ------ 1692 ------ 1751 ------ 1807 ------ 1846 ------ 1887 ------ 1939 ------ 1994 ------ 2045 ------ 2097 ------ 2139 ------ 2190 ------ 2240 ------ 2293 ------ 2344 ------ 2385 ------ 2427 ------ 2484 ------ 2538 ------ 2601 ------ 2651 ------ 2730 ------ 2781 ------ 2825 ------ 2874 ------ 2938 ------ 2978 ------ 3034 ------ 3086 ------ 3139 ------ 3179 ------ 3231 ------ 3274 ------ 3334 ------ 3387 ------ 3431 ------ 3477 ------ 3530 ------ 3581 ------ 3633 ------ 3680 ------ 3725 ------ 3775 ------ 3820 ------ 3876 ------ 3923 ------ 3982 ------ 4036 ------ 4078 ------ 4116 ------ 4183 ------ 4227 ------ 4275 ------ 4336 ------ 4376 ------ 4424 ------ 4481 ------ 4537 ------ 4582 ------ 4630 ------ 4680 ------ 4727 ------ 4779 ------ 4828 ------ 4881 ------ 4938 ------ 4986 ------ 5040 ------ 5087 ------ 5138 ------ 5188 ------ 5237 ------ 5280 ------ 5318 ------ 5358 ------ 5405 ------ 5459 ------ 5516 ------ 5561 ------ 5615 ------ 5681 ------ 5744 ------ 5790 ------ 5847 ------ 5885 ------ 5927 ------ 5991 ------ 6042 ------ 6111 ------ 6165 ------ 6207 ------ 6259 ------ 6313 ------ 6359 ------ 6418 ------ 6471 ------ 6530 ------ 6587 ------ 6626 ------ 6672 ------ 6739 ------ 6784 ------ 6837 ------ 6886 ------ 6952 ------ 6994 ------ 7040 ------ 7081 ------ 7134 ------ 7178 ------ 7232 ------ 7280 ------ 7330 ------ 7378 ------ 7435 ------ 7486 ------ 7537 ------ 7593 ------ 7636 ------ 7680 ------ 7737 ------ 7788 ------ 7836 ------ 7877 ------ 7928 ------ 7993 ------ 8036 ------ 8083 ------ 8135 ------ 8180 ------ 8221 ------ 8263 ------ 8313 ------ 8352 ------ 8399 ------ 8453 ------ 8517 ------ 8566 ------ 8612 ------ 8664 ------ 8716 ------ 8766 ------ 8821 ------ 8871 ------ 8922 ------ 8956 ------ 9007 ------ 9050 ------ 9100 ------ 9154 ------ 9203 ------ 9246 ------ 9311 ------ 9358 ------ 9407 ------ 9470 ------ 9525 ------ 9564 ------ 9633 ------ 9672 ------ 9730 ------ 9778 ------ 9824 ------ 9868 ------ 9919 ------ 9959 ------ 10000 128 │ │ │ │ │ │ │ ├── key: (33,34) 129 │ │ │ │ │ │ │ └── fd: (33,34)-->(36) 130 │ │ │ │ │ │ └── filters 131 │ │ │ │ │ │ ├── ps_suppkey:34 = l_suppkey:19 [type=bool, outer=(19,34), constraints=(/19: (/NULL - ]; /34: (/NULL - ]), fd=(19)==(34), (34)==(19)] 132 │ │ │ │ │ │ └── ps_partkey:33 = l_partkey:18 [type=bool, outer=(18,33), constraints=(/18: (/NULL - ]; /33: (/NULL - ]), fd=(18)==(33), (33)==(18)] 133 │ │ │ │ │ └── filters (true) 134 │ │ │ │ ├── scan nation 135 │ │ │ │ │ ├── save-table-name: q9_scan_11 136 │ │ │ │ │ ├── columns: n_nationkey:47(int!null) n_name:48(char!null) 137 │ │ │ │ │ ├── stats: [rows=25, distinct(47)=25, null(47)=0, distinct(48)=25, null(48)=0] 138 │ │ │ │ │ │ histogram(47)= 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 139 │ │ │ │ │ │ <--- 0 --- 1 --- 2 --- 3 --- 4 --- 5 --- 6 --- 7 --- 8 --- 9 --- 10 --- 11 --- 12 --- 13 --- 14 --- 15 --- 16 --- 17 --- 18 --- 19 --- 20 --- 21 --- 22 --- 23 --- 24 140 │ │ │ │ │ ├── key: (47) 141 │ │ │ │ │ └── fd: (47)-->(48) 142 │ │ │ │ └── filters (true) 143 │ │ │ ├── scan supplier@s_nk 144 │ │ │ │ ├── save-table-name: q9_scan_12 145 │ │ │ │ ├── columns: s_suppkey:10(int!null) s_nationkey:13(int!null) 146 │ │ │ │ ├── stats: [rows=10000, distinct(10)=9920, null(10)=0, distinct(13)=25, null(13)=0] 147 │ │ │ │ │ histogram(10)= 0 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 49 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 50 1 148 │ │ │ │ │ <--- 1 ---- 51 ---- 101 ---- 151 ---- 201 ---- 251 ---- 301 ---- 351 ---- 401 ---- 451 ---- 501 ---- 551 ---- 601 ---- 651 ---- 701 ---- 751 ---- 801 ---- 851 ---- 901 ---- 951 ---- 1001 ---- 1051 ---- 1101 ---- 1151 ---- 1201 ---- 1251 ---- 1301 ---- 1351 ---- 1401 ---- 1451 ---- 1501 ---- 1551 ---- 1601 ---- 1651 ---- 1701 ---- 1751 ---- 1801 ---- 1851 ---- 1901 ---- 1951 ---- 2001 ---- 2051 ---- 2101 ---- 2151 ---- 2201 ---- 2251 ---- 2301 ---- 2351 ---- 2401 ---- 2451 ---- 2501 ---- 2551 ---- 2601 ---- 2651 ---- 2701 ---- 2751 ---- 2801 ---- 2851 ---- 2901 ---- 2951 ---- 3001 ---- 3051 ---- 3101 ---- 3151 ---- 3201 ---- 3251 ---- 3301 ---- 3351 ---- 3401 ---- 3451 ---- 3501 ---- 3551 ---- 3601 ---- 3651 ---- 3701 ---- 3751 ---- 3801 ---- 3851 ---- 3901 ---- 3951 ---- 4001 ---- 4051 ---- 4101 ---- 4151 ---- 4201 ---- 4251 ---- 4301 ---- 4351 ---- 4401 ---- 4451 ---- 4501 ---- 4551 ---- 4601 ---- 4651 ---- 4701 ---- 4751 ---- 4801 ---- 4851 ---- 4901 ---- 4951 ---- 5001 ---- 5051 ---- 5101 ---- 5151 ---- 5201 ---- 5251 ---- 5301 ---- 5351 ---- 5401 ---- 5451 ---- 5501 ---- 5551 ---- 5601 ---- 5651 ---- 5701 ---- 5751 ---- 5801 ---- 5851 ---- 5901 ---- 5951 ---- 6001 ---- 6051 ---- 6101 ---- 6151 ---- 6201 ---- 6251 ---- 6301 ---- 6351 ---- 6401 ---- 6451 ---- 6501 ---- 6551 ---- 6601 ---- 6651 ---- 6701 ---- 6751 ---- 6801 ---- 6851 ---- 6901 ---- 6951 ---- 7001 ---- 7051 ---- 7101 ---- 7151 ---- 7201 ---- 7251 ---- 7301 ---- 7351 ---- 7401 ---- 7451 ---- 7501 ---- 7552 ---- 7603 ---- 7654 ---- 7705 ---- 7756 ---- 7807 ---- 7858 ---- 7909 ---- 7960 ---- 8011 ---- 8062 ---- 8113 ---- 8164 ---- 8215 ---- 8266 ---- 8317 ---- 8368 ---- 8419 ---- 8470 ---- 8521 ---- 8572 ---- 8623 ---- 8674 ---- 8725 ---- 8776 ---- 8827 ---- 8878 ---- 8929 ---- 8980 ---- 9031 ---- 9082 ---- 9133 ---- 9184 ---- 9235 ---- 9286 ---- 9337 ---- 9388 ---- 9439 ---- 9490 ---- 9541 ---- 9592 ---- 9643 ---- 9694 ---- 9745 ---- 9796 ---- 9847 ---- 9898 ---- 9949 ---- 10000 149 │ │ │ │ │ histogram(13)= 0 420 0 413 0 397 0 412 0 415 0 380 0 402 0 396 0 415 0 405 0 393 0 438 0 377 0 362 0 376 0 373 0 406 0 421 0 407 0 398 0 411 0 399 0 401 0 390 0 393 150 │ │ │ │ │ <--- 0 --- 1 --- 2 --- 3 --- 4 --- 5 --- 6 --- 7 --- 8 --- 9 --- 10 --- 11 --- 12 --- 13 --- 14 --- 15 --- 16 --- 17 --- 18 --- 19 --- 20 --- 21 --- 22 --- 23 --- 24 151 │ │ │ │ ├── key: (10) 152 │ │ │ │ └── fd: (10)-->(13) 153 │ │ │ └── filters 154 │ │ │ ├── s_suppkey:10 = l_suppkey:19 [type=bool, outer=(10,19), constraints=(/10: (/NULL - ]; /19: (/NULL - ]), fd=(10)==(19), (19)==(10)] 155 │ │ │ └── s_nationkey:13 = n_nationkey:47 [type=bool, outer=(13,47), constraints=(/13: (/NULL - ]; /47: (/NULL - ]), fd=(13)==(47), (47)==(13)] 156 │ │ └── filters 157 │ │ └── p_name:2 LIKE '%green%' [type=bool, outer=(2), constraints=(/2: (/NULL - ])] 158 │ └── projections 159 │ ├── extract('year', o_orderdate:42) [as=o_year:51, type=float, outer=(42), immutable] 160 │ └── (l_extendedprice:22 * (1.0 - l_discount:23)) - (ps_supplycost:36 * l_quantity:21) [as=amount:52, type=float, outer=(21-23,36)] 161 └── aggregations 162 └── sum [as=sum:53, type=float, outer=(52)] 163 └── amount:52 [type=float] 164 165 stats table=q9_sort_1 166 ---- 167 column_names row_count distinct_count null_count 168 {nation} 175 25 0 169 {o_year} 175 7 0 170 {sum_profit} 175 175 0 171 ~~~~ 172 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 173 {nation} 1501.00 8.58 <== 25.00 1.00 0.00 1.00 174 {o_year} 1501.00 8.58 <== 1208.00 172.57 <== 0.00 1.00 175 {sum_profit} 1501.00 8.58 <== 1501.00 8.58 <== 0.00 1.00 176 177 stats table=q9_group_by_2 178 ---- 179 column_names row_count distinct_count null_count 180 {n_name} 175 25 0 181 {o_year} 175 7 0 182 {sum} 175 175 0 183 ~~~~ 184 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 185 {n_name} 1501.00 8.58 <== 25.00 1.00 0.00 1.00 186 {o_year} 1501.00 8.58 <== 1208.00 172.57 <== 0.00 1.00 187 {sum} 1501.00 8.58 <== 1501.00 8.58 <== 0.00 1.00 188 189 stats table=q9_project_3 190 ---- 191 column_names row_count distinct_count null_count 192 {amount} 319404 315234 0 193 {n_name} 319404 25 0 194 {o_year} 319404 7 0 195 ~~~~ 196 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 197 {amount} 2407.00 132.70 <== 1508.00 209.04 <== 0.00 1.00 198 {n_name} 2407.00 132.70 <== 25.00 1.00 0.00 1.00 199 {o_year} 2407.00 132.70 <== 1208.00 172.57 <== 0.00 1.00 200 201 stats table=q9_lookup_join_4 202 ---- 203 column_names row_count distinct_count null_count 204 {l_discount} 319404 11 0 205 {l_extendedprice} 319404 212580 0 206 {l_orderkey} 319404 288573 0 207 {l_partkey} 319404 10632 0 208 {l_quantity} 319404 50 0 209 {l_suppkey} 319404 9799 0 210 {n_name} 319404 25 0 211 {n_nationkey} 319404 25 0 212 {o_orderdate} 319404 2406 0 213 {o_orderkey} 319404 288573 0 214 {p_name} 319404 10680 0 215 {p_partkey} 319404 10632 0 216 {ps_partkey} 319404 10632 0 217 {ps_suppkey} 319404 9799 0 218 {ps_supplycost} 319404 34839 0 219 {s_nationkey} 319404 25 0 220 {s_suppkey} 319404 9799 0 221 ~~~~ 222 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 223 {l_discount} 2407.00 132.70 <== 11.00 1.00 0.00 1.00 224 {l_extendedprice} 2407.00 132.70 <== 1508.00 140.97 <== 0.00 1.00 225 {l_orderkey} 2407.00 132.70 <== 1508.00 191.36 <== 0.00 1.00 226 {l_partkey} 2407.00 132.70 <== 2357.00 4.51 <== 0.00 1.00 227 {l_quantity} 2407.00 132.70 <== 50.00 1.00 0.00 1.00 228 {l_suppkey} 2407.00 132.70 <== 1521.00 6.44 <== 0.00 1.00 229 {n_name} 2407.00 132.70 <== 25.00 1.00 0.00 1.00 230 {n_nationkey} 2407.00 132.70 <== 25.00 1.00 0.00 1.00 231 {o_orderdate} 2407.00 132.70 <== 1208.00 1.99 <== 0.00 1.00 232 {o_orderkey} 2407.00 132.70 <== 1508.00 191.36 <== 0.00 1.00 233 {p_name} 2407.00 132.70 <== 2364.00 4.52 <== 0.00 1.00 234 {p_partkey} 2407.00 132.70 <== 2357.00 4.51 <== 0.00 1.00 235 {ps_partkey} 2407.00 132.70 <== 1508.00 7.05 <== 0.00 1.00 236 {ps_suppkey} 2407.00 132.70 <== 1444.00 6.79 <== 0.00 1.00 237 {ps_supplycost} 2407.00 132.70 <== 1504.00 23.16 <== 0.00 1.00 238 {s_nationkey} 2407.00 132.70 <== 25.00 1.00 0.00 1.00 239 {s_suppkey} 2407.00 132.70 <== 1521.00 6.44 <== 0.00 1.00 240 241 stats table=q9_inner_join_5 242 ---- 243 column_names row_count distinct_count null_count 244 {l_discount} 6001215 11 0 245 {l_extendedprice} 6001215 925955 0 246 {l_orderkey} 6001215 1527270 0 247 {l_partkey} 6001215 199241 0 248 {l_quantity} 6001215 50 0 249 {l_suppkey} 6001215 9920 0 250 {n_name} 6001215 25 0 251 {n_nationkey} 6001215 25 0 252 {o_orderdate} 6001215 2406 0 253 {o_orderkey} 6001215 1527270 0 254 {ps_partkey} 6001215 199241 0 255 {ps_suppkey} 6001215 9920 0 256 {ps_supplycost} 6001215 100379 0 257 {s_nationkey} 6001215 25 0 258 {s_suppkey} 6001215 9920 0 259 ~~~~ 260 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 261 {l_discount} 2405.00 2495.31 <== 11.00 1.00 0.00 1.00 262 {l_extendedprice} 2405.00 2495.31 <== 2356.00 393.02 <== 0.00 1.00 263 {l_orderkey} 2405.00 2495.31 <== 2357.00 647.97 <== 0.00 1.00 264 {l_partkey} 2405.00 2495.31 <== 2357.00 84.53 <== 0.00 1.00 265 {l_quantity} 2405.00 2495.31 <== 50.00 1.00 0.00 1.00 266 {l_suppkey} 2405.00 2495.31 <== 2405.00 4.12 <== 0.00 1.00 267 {n_name} 2405.00 2495.31 <== 25.00 1.00 0.00 1.00 268 {n_nationkey} 2405.00 2495.31 <== 25.00 1.00 0.00 1.00 269 {o_orderdate} 2405.00 2495.31 <== 1520.00 1.58 0.00 1.00 270 {o_orderkey} 2405.00 2495.31 <== 2357.00 647.97 <== 0.00 1.00 271 {ps_partkey} 2405.00 2495.31 <== 2357.00 84.53 <== 0.00 1.00 272 {ps_suppkey} 2405.00 2495.31 <== 2136.00 4.64 <== 0.00 1.00 273 {ps_supplycost} 2405.00 2495.31 <== 2342.00 42.86 <== 0.00 1.00 274 {s_nationkey} 2405.00 2495.31 <== 25.00 1.00 0.00 1.00 275 {s_suppkey} 2405.00 2495.31 <== 2405.00 4.12 <== 0.00 1.00 276 277 stats table=q9_inner_join_6 278 ---- 279 column_names row_count distinct_count null_count 280 {l_discount} 150030375 11 0 281 {l_extendedprice} 150030375 925955 0 282 {l_orderkey} 150030375 1527270 0 283 {l_partkey} 150030375 199241 0 284 {l_quantity} 150030375 50 0 285 {l_suppkey} 150030375 9920 0 286 {n_name} 150030375 25 0 287 {n_nationkey} 150030375 25 0 288 {o_orderdate} 150030375 2406 0 289 {o_orderkey} 150030375 1527270 0 290 {ps_partkey} 150030375 199241 0 291 {ps_suppkey} 150030375 9920 0 292 {ps_supplycost} 150030375 100379 0 293 ~~~~ 294 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 295 {l_discount} 59642.00 2515.52 <== 11.00 1.00 0.00 1.00 296 {l_extendedprice} 59642.00 2515.52 <== 58064.00 15.95 <== 0.00 1.00 297 {l_orderkey} 59642.00 2515.52 <== 59642.00 25.61 <== 0.00 1.00 298 {l_partkey} 59642.00 2515.52 <== 59642.00 3.34 <== 0.00 1.00 299 {l_quantity} 59642.00 2515.52 <== 50.00 1.00 0.00 1.00 300 {l_suppkey} 59642.00 2515.52 <== 9920.00 1.00 0.00 1.00 301 {n_name} 59642.00 2515.52 <== 25.00 1.00 0.00 1.00 302 {n_nationkey} 59642.00 2515.52 <== 25.00 1.00 0.00 1.00 303 {o_orderdate} 59642.00 2515.52 <== 2406.00 1.00 0.00 1.00 304 {o_orderkey} 59642.00 2515.52 <== 59642.00 25.61 <== 0.00 1.00 305 {ps_partkey} 59642.00 2515.52 <== 59642.00 3.34 <== 0.00 1.00 306 {ps_suppkey} 59642.00 2515.52 <== 9920.00 1.00 0.00 1.00 307 {ps_supplycost} 59642.00 2515.52 <== 45145.00 2.22 <== 0.00 1.00 308 309 stats table=q9_lookup_join_7 310 ---- 311 column_names row_count distinct_count null_count 312 {l_discount} 6001215 11 0 313 {l_extendedprice} 6001215 925955 0 314 {l_orderkey} 6001215 1527270 0 315 {l_partkey} 6001215 199241 0 316 {l_quantity} 6001215 50 0 317 {l_suppkey} 6001215 9920 0 318 {o_orderdate} 6001215 2406 0 319 {o_orderkey} 6001215 1527270 0 320 {ps_partkey} 6001215 199241 0 321 {ps_suppkey} 6001215 9920 0 322 {ps_supplycost} 6001215 100379 0 323 ~~~~ 324 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 325 {l_discount} 2386.00 2515.18 <== 11.00 1.00 0.00 1.00 326 {l_extendedprice} 2386.00 2515.18 <== 2386.00 388.08 <== 0.00 1.00 327 {l_orderkey} 2386.00 2515.18 <== 2386.00 640.10 <== 0.00 1.00 328 {l_partkey} 2386.00 2515.18 <== 2386.00 83.50 <== 0.00 1.00 329 {l_quantity} 2386.00 2515.18 <== 50.00 1.00 0.00 1.00 330 {l_suppkey} 2386.00 2515.18 <== 2386.00 4.16 <== 0.00 1.00 331 {o_orderdate} 2386.00 2515.18 <== 1518.00 1.58 0.00 1.00 332 {o_orderkey} 2386.00 2515.18 <== 2386.00 640.10 <== 0.00 1.00 333 {ps_partkey} 2386.00 2515.18 <== 2386.00 83.50 <== 0.00 1.00 334 {ps_suppkey} 2386.00 2515.18 <== 2386.00 4.16 <== 0.00 1.00 335 {ps_supplycost} 2386.00 2515.18 <== 2370.00 42.35 <== 0.00 1.00 336 337 stats table=q9_inner_join_8 338 ---- 339 column_names row_count distinct_count null_count 340 {l_discount} 6001215 11 0 341 {l_extendedprice} 6001215 925955 0 342 {l_orderkey} 6001215 1527270 0 343 {l_partkey} 6001215 199241 0 344 {l_quantity} 6001215 50 0 345 {l_suppkey} 6001215 9920 0 346 {ps_partkey} 6001215 199241 0 347 {ps_suppkey} 6001215 9920 0 348 {ps_supplycost} 6001215 100379 0 349 ~~~~ 350 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 351 {l_discount} 2429.00 2470.65 <== 11.00 1.00 0.00 1.00 352 {l_extendedprice} 2429.00 2470.65 <== 2426.00 381.68 <== 0.00 1.00 353 {l_orderkey} 2429.00 2470.65 <== 2427.00 629.28 <== 0.00 1.00 354 {l_partkey} 2429.00 2470.65 <== 2429.00 82.03 <== 0.00 1.00 355 {l_quantity} 2429.00 2470.65 <== 50.00 1.00 0.00 1.00 356 {l_suppkey} 2429.00 2470.65 <== 2429.00 4.08 <== 0.00 1.00 357 {ps_partkey} 2429.00 2470.65 <== 2429.00 82.03 <== 0.00 1.00 358 {ps_suppkey} 2429.00 2470.65 <== 2429.00 4.08 <== 0.00 1.00 359 {ps_supplycost} 2429.00 2470.65 <== 2400.00 41.82 <== 0.00 1.00 360 361 stats table=q9_scan_9 362 ---- 363 column_names row_count distinct_count null_count 364 {l_discount} 6001215 11 0 365 {l_extendedprice} 6001215 925955 0 366 {l_orderkey} 6001215 1527270 0 367 {l_partkey} 6001215 199241 0 368 {l_quantity} 6001215 50 0 369 {l_suppkey} 6001215 9920 0 370 ~~~~ 371 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 372 {l_discount} 6001215.00 1.00 11.00 1.00 0.00 1.00 373 {l_extendedprice} 6001215.00 1.00 925955.00 1.00 0.00 1.00 374 {l_orderkey} 6001215.00 1.00 1527270.00 1.00 0.00 1.00 375 {l_partkey} 6001215.00 1.00 199241.00 1.00 0.00 1.00 376 {l_quantity} 6001215.00 1.00 50.00 1.00 0.00 1.00 377 {l_suppkey} 6001215.00 1.00 9920.00 1.00 0.00 1.00 378 379 stats table=q9_scan_10 380 ---- 381 column_names row_count distinct_count null_count 382 {ps_partkey} 800000 199241 0 383 {ps_suppkey} 800000 9920 0 384 {ps_supplycost} 800000 100379 0 385 ~~~~ 386 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 387 {ps_partkey} 800000.00 1.00 199241.00 1.00 0.00 1.00 388 {ps_suppkey} 800000.00 1.00 9920.00 1.00 0.00 1.00 389 {ps_supplycost} 800000.00 1.00 100379.00 1.00 0.00 1.00 390 391 stats table=q9_scan_11 392 ---- 393 column_names row_count distinct_count null_count 394 {n_name} 25 25 0 395 {n_nationkey} 25 25 0 396 ~~~~ 397 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 398 {n_name} 25.00 1.00 25.00 1.00 0.00 1.00 399 {n_nationkey} 25.00 1.00 25.00 1.00 0.00 1.00 400 401 stats table=q9_scan_12 402 ---- 403 column_names row_count distinct_count null_count 404 {s_nationkey} 10000 25 0 405 {s_suppkey} 10000 9920 0 406 ~~~~ 407 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 408 {s_nationkey} 10000.00 1.00 25.00 1.00 0.00 1.00 409 {s_suppkey} 10000.00 1.00 9920.00 1.00 0.00 1.00