github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/sql/opt/memo/testdata/stats_quality/tpch/q05 (about) 1 import file=tpch_schema 2 ---- 3 4 import file=tpch_stats 5 ---- 6 7 # -------------------------------------------------- 8 # Q5 9 # Local Supplier Volume 10 # Lists the revenue volume done through local suppliers. 11 # 12 # Lists for each nation in a region the revenue volume that resulted from 13 # lineitem transactions in which the customer ordering parts and the supplier 14 # filling them were both within that nation. The query is run in order to 15 # determine whether to institute local distribution centers in a given region. 16 # The query considers only parts ordered in a given year. The query displays the 17 # nations and revenue volume in descending order by revenue. Revenue volume for 18 # all qualifying lineitems in a particular nation is defined as 19 # sum(l_extendedprice * (1 - l_discount)). 20 # 21 # TODO: 22 # 1. Join ordering 23 # -------------------------------------------------- 24 save-tables database=tpch save-tables-prefix=q5 25 SELECT 26 n_name, 27 sum(l_extendedprice * (1 - l_discount)) AS revenue 28 FROM 29 customer, 30 orders, 31 lineitem, 32 supplier, 33 nation, 34 region 35 WHERE 36 c_custkey = o_custkey 37 AND l_orderkey = o_orderkey 38 AND l_suppkey = s_suppkey 39 AND c_nationkey = s_nationkey 40 AND s_nationkey = n_nationkey 41 AND n_regionkey = r_regionkey 42 AND r_name = 'ASIA' 43 AND o_orderDATE >= DATE '1994-01-01' 44 AND o_orderDATE < DATE '1994-01-01' + INTERVAL '1' YEAR 45 GROUP BY 46 n_name 47 ORDER BY 48 revenue DESC; 49 ---- 50 sort 51 ├── save-table-name: q5_sort_1 52 ├── columns: n_name:42(char!null) revenue:49(float!null) 53 ├── stats: [rows=5, distinct(42)=5, null(42)=0, distinct(49)=5, null(49)=0] 54 ├── key: (42) 55 ├── fd: (42)-->(49) 56 ├── ordering: -49 57 └── group-by 58 ├── save-table-name: q5_group_by_2 59 ├── columns: n_name:42(char!null) sum:49(float!null) 60 ├── grouping columns: n_name:42(char!null) 61 ├── stats: [rows=5, distinct(42)=5, null(42)=0, distinct(49)=5, null(49)=0] 62 ├── key: (42) 63 ├── fd: (42)-->(49) 64 ├── project 65 │ ├── save-table-name: q5_project_3 66 │ ├── columns: column48:48(float!null) n_name:42(char!null) 67 │ ├── stats: [rows=13445.4933, distinct(42)=5, null(42)=0, distinct(48)=13135.9517, null(48)=0] 68 │ ├── inner-join (hash) 69 │ │ ├── save-table-name: q5_inner_join_4 70 │ │ ├── columns: c_custkey:1(int!null) c_nationkey:4(int!null) o_orderkey:9(int!null) o_custkey:10(int!null) o_orderdate:13(date!null) l_orderkey:18(int!null) l_suppkey:20(int!null) l_extendedprice:23(float!null) l_discount:24(float!null) s_suppkey:34(int!null) s_nationkey:37(int!null) n_nationkey:41(int!null) n_name:42(char!null) n_regionkey:43(int!null) r_regionkey:45(int!null) r_name:46(char!null) 71 │ │ ├── stats: [rows=13445.4933, distinct(1)=13445.4933, null(1)=0, distinct(4)=5, null(4)=0, distinct(9)=13060.5826, null(9)=0, distinct(10)=13445.4933, null(10)=0, distinct(13)=365, null(13)=0, distinct(18)=13060.5826, null(18)=0, distinct(20)=1843.54504, null(20)=0, distinct(23)=13107.8032, null(23)=0, distinct(24)=11, null(24)=0, distinct(34)=1843.54504, null(34)=0, distinct(37)=5, null(37)=0, distinct(41)=5, null(41)=0, distinct(42)=5, null(42)=0, distinct(43)=1, null(43)=0, distinct(45)=1, null(45)=0, distinct(46)=0.996222107, null(46)=0, distinct(23,24)=13135.9517, null(23,24)=0] 72 │ │ ├── fd: ()-->(46), (1)-->(4), (9)-->(10,13), (34)-->(37), (41)-->(42,43), (43)==(45), (45)==(43), (37)==(4,41), (41)==(4,37), (20)==(34), (34)==(20), (9)==(18), (18)==(9), (1)==(10), (10)==(1), (4)==(37,41) 73 │ │ ├── inner-join (hash) 74 │ │ │ ├── save-table-name: q5_inner_join_5 75 │ │ │ ├── columns: o_orderkey:9(int!null) o_custkey:10(int!null) o_orderdate:13(date!null) l_orderkey:18(int!null) l_suppkey:20(int!null) l_extendedprice:23(float!null) l_discount:24(float!null) s_suppkey:34(int!null) s_nationkey:37(int!null) n_nationkey:41(int!null) n_name:42(char!null) n_regionkey:43(int!null) r_regionkey:45(int!null) r_name:46(char!null) 76 │ │ │ ├── stats: [rows=333477.366, distinct(9)=230330.769, null(9)=0, distinct(10)=89272.9399, null(10)=0, distinct(13)=365, null(13)=0, distinct(18)=230330.769, null(18)=0, distinct(20)=1844.80594, null(20)=0, distinct(23)=263171.144, null(23)=0, distinct(24)=11, null(24)=0, distinct(34)=1844.80594, null(34)=0, distinct(37)=5, null(37)=0, distinct(41)=5, null(41)=0, distinct(42)=5, null(42)=0, distinct(43)=1, null(43)=0, distinct(45)=1, null(45)=0, distinct(46)=0.996222107, null(46)=0, distinct(23,24)=287513.644, null(23,24)=0] 77 │ │ │ ├── fd: ()-->(46), (9)-->(10,13), (34)-->(37), (41)-->(42,43), (43)==(45), (45)==(43), (37)==(41), (41)==(37), (20)==(34), (34)==(20), (9)==(18), (18)==(9) 78 │ │ │ ├── inner-join (hash) 79 │ │ │ │ ├── save-table-name: q5_inner_join_6 80 │ │ │ │ ├── columns: l_orderkey:18(int!null) l_suppkey:20(int!null) l_extendedprice:23(float!null) l_discount:24(float!null) s_suppkey:34(int!null) s_nationkey:37(int!null) n_nationkey:41(int!null) n_name:42(char!null) n_regionkey:43(int!null) r_regionkey:45(int!null) r_name:46(char!null) 81 │ │ │ │ ├── stats: [rows=1209922.38, distinct(18)=835685.959, null(18)=0, distinct(20)=1844.80594, null(20)=0, distinct(23)=675298.21, null(23)=0, distinct(24)=11, null(24)=0, distinct(34)=1844.80594, null(34)=0, distinct(37)=5, null(37)=0, distinct(41)=5, null(41)=0, distinct(42)=5, null(42)=0, distinct(43)=1, null(43)=0, distinct(45)=1, null(45)=0, distinct(46)=0.996222107, null(46)=0, distinct(23,24)=1095803.99, null(23,24)=0] 82 │ │ │ │ ├── fd: ()-->(46), (34)-->(37), (41)-->(42,43), (43)==(45), (45)==(43), (37)==(41), (41)==(37), (20)==(34), (34)==(20) 83 │ │ │ │ ├── scan lineitem 84 │ │ │ │ │ ├── save-table-name: q5_scan_7 85 │ │ │ │ │ ├── columns: l_orderkey:18(int!null) l_suppkey:20(int!null) l_extendedprice:23(float!null) l_discount:24(float!null) 86 │ │ │ │ │ └── stats: [rows=6001215, distinct(18)=1527270, null(18)=0, distinct(20)=9920, null(20)=0, distinct(23)=925955, null(23)=0, distinct(24)=11, null(24)=0, distinct(23,24)=6001215, null(23,24)=0] 87 │ │ │ │ │ histogram(18)= 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 88 │ │ │ │ │ <--- 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 89 │ │ │ │ │ histogram(20)= 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 90 │ │ │ │ │ <--- 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 91 │ │ │ │ ├── inner-join (lookup supplier@s_nk) 92 │ │ │ │ │ ├── save-table-name: q5_lookup_join_8 93 │ │ │ │ │ ├── columns: s_suppkey:34(int!null) s_nationkey:37(int!null) n_nationkey:41(int!null) n_name:42(char!null) n_regionkey:43(int!null) r_regionkey:45(int!null) r_name:46(char!null) 94 │ │ │ │ │ ├── key columns: [41] = [37] 95 │ │ │ │ │ ├── stats: [rows=2000, distinct(34)=1844.80594, null(34)=0, distinct(37)=5, null(37)=0, distinct(41)=5, null(41)=0, distinct(42)=5, null(42)=0, distinct(43)=1, null(43)=0, distinct(45)=1, null(45)=0, distinct(46)=0.996222107, null(46)=0] 96 │ │ │ │ │ ├── key: (34) 97 │ │ │ │ │ ├── fd: ()-->(46), (34)-->(37), (41)-->(42,43), (43)==(45), (45)==(43), (37)==(41), (41)==(37) 98 │ │ │ │ │ ├── inner-join (hash) 99 │ │ │ │ │ │ ├── save-table-name: q5_inner_join_9 100 │ │ │ │ │ │ ├── columns: n_nationkey:41(int!null) n_name:42(char!null) n_regionkey:43(int!null) r_regionkey:45(int!null) r_name:46(char!null) 101 │ │ │ │ │ │ ├── stats: [rows=5, distinct(41)=5, null(41)=0, distinct(42)=5, null(42)=0, distinct(43)=1, null(43)=0, distinct(45)=1, null(45)=0, distinct(46)=0.996222107, null(46)=0] 102 │ │ │ │ │ │ ├── key: (41) 103 │ │ │ │ │ │ ├── fd: ()-->(46), (41)-->(42,43), (43)==(45), (45)==(43) 104 │ │ │ │ │ │ ├── scan nation 105 │ │ │ │ │ │ │ ├── save-table-name: q5_scan_10 106 │ │ │ │ │ │ │ ├── columns: n_nationkey:41(int!null) n_name:42(char!null) n_regionkey:43(int!null) 107 │ │ │ │ │ │ │ ├── stats: [rows=25, distinct(41)=25, null(41)=0, distinct(42)=25, null(42)=0, distinct(43)=5, null(43)=0] 108 │ │ │ │ │ │ │ │ histogram(41)= 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 109 │ │ │ │ │ │ │ │ <--- 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 110 │ │ │ │ │ │ │ │ histogram(43)= 0 5 0 5 0 5 0 5 0 5 111 │ │ │ │ │ │ │ │ <--- 0 --- 1 --- 2 --- 3 --- 4 112 │ │ │ │ │ │ │ ├── key: (41) 113 │ │ │ │ │ │ │ └── fd: (41)-->(42,43) 114 │ │ │ │ │ │ ├── select 115 │ │ │ │ │ │ │ ├── save-table-name: q5_select_11 116 │ │ │ │ │ │ │ ├── columns: r_regionkey:45(int!null) r_name:46(char!null) 117 │ │ │ │ │ │ │ ├── stats: [rows=1, distinct(45)=1, null(45)=0, distinct(46)=1, null(46)=0] 118 │ │ │ │ │ │ │ ├── key: (45) 119 │ │ │ │ │ │ │ ├── fd: ()-->(46) 120 │ │ │ │ │ │ │ ├── scan region 121 │ │ │ │ │ │ │ │ ├── save-table-name: q5_scan_12 122 │ │ │ │ │ │ │ │ ├── columns: r_regionkey:45(int!null) r_name:46(char!null) 123 │ │ │ │ │ │ │ │ ├── stats: [rows=5, distinct(45)=5, null(45)=0, distinct(46)=5, null(46)=0] 124 │ │ │ │ │ │ │ │ │ histogram(45)= 0 1 0 1 0 1 0 1 0 1 125 │ │ │ │ │ │ │ │ │ <--- 0 --- 1 --- 2 --- 3 --- 4 126 │ │ │ │ │ │ │ │ ├── key: (45) 127 │ │ │ │ │ │ │ │ └── fd: (45)-->(46) 128 │ │ │ │ │ │ │ └── filters 129 │ │ │ │ │ │ │ └── r_name:46 = 'ASIA' [type=bool, outer=(46), constraints=(/46: [/'ASIA' - /'ASIA']; tight), fd=()-->(46)] 130 │ │ │ │ │ │ └── filters 131 │ │ │ │ │ │ └── n_regionkey:43 = r_regionkey:45 [type=bool, outer=(43,45), constraints=(/43: (/NULL - ]; /45: (/NULL - ]), fd=(43)==(45), (45)==(43)] 132 │ │ │ │ │ └── filters (true) 133 │ │ │ │ └── filters 134 │ │ │ │ └── l_suppkey:20 = s_suppkey:34 [type=bool, outer=(20,34), constraints=(/20: (/NULL - ]; /34: (/NULL - ]), fd=(20)==(34), (34)==(20)] 135 │ │ │ ├── index-join orders 136 │ │ │ │ ├── save-table-name: q5_index_join_13 137 │ │ │ │ ├── columns: o_orderkey:9(int!null) o_custkey:10(int!null) o_orderdate:13(date!null) 138 │ │ │ │ ├── stats: [rows=230330.769, distinct(9)=230330.769, null(9)=0, distinct(10)=91686.8358, null(10)=0, distinct(13)=365, null(13)=0] 139 │ │ │ │ │ histogram(13)= 0 0 5838.5 450 7200 1500 7200 300 6450 900 7200 1050 6600 900 7050 600 6900 900 6600 900 6600 750 6900 1050 6450 900 7050 1350 6750 1050 6150 1500 7200 600 6900 600 6900 450 7050 300 6600 750 7200 600 6750 600 7200 300 7200 1350 7050 1200 6600 1050 7050 900 7050 450 6450 1050 6900 450 0 542.31 140 │ │ │ │ │ <--- '1993-12-31' -------- '1994-01-12' ------ '1994-01-23' ------ '1994-02-04' ------ '1994-02-16' ------ '1994-03-01' ------ '1994-03-14' ------ '1994-03-24' ------ '1994-04-06' ------ '1994-04-20' ------ '1994-05-01' ------ '1994-05-12' ------ '1994-05-23' ------ '1994-06-03' ------ '1994-06-16' ------ '1994-06-25' ------ '1994-07-08' ------ '1994-07-19' ------ '1994-08-01' ------ '1994-08-14' ------ '1994-08-25' ------ '1994-09-06' ------ '1994-09-18' ------ '1994-10-01' ------ '1994-10-17' ------ '1994-10-30' ------ '1994-11-10' ------ '1994-11-22' ------ '1994-12-02' ------ '1994-12-16' ------ '1994-12-30' --- '1994-12-31' 141 │ │ │ │ ├── key: (9) 142 │ │ │ │ ├── fd: (9)-->(10,13) 143 │ │ │ │ └── scan orders@o_od 144 │ │ │ │ ├── save-table-name: q5_scan_14 145 │ │ │ │ ├── columns: o_orderkey:9(int!null) o_orderdate:13(date!null) 146 │ │ │ │ ├── constraint: /13/9: [/'1994-01-01' - /'1994-12-31'] 147 │ │ │ │ ├── stats: [rows=230330.769, distinct(9)=230330.769, null(9)=0, distinct(13)=365, null(13)=0] 148 │ │ │ │ │ histogram(9)= 0 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1128.6 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 1151.7 23.033 149 │ │ │ │ │ <--- 998 --------- 26593 -------- 56613 -------- 85827 -------- 115587 -------- 140512 -------- 167076 -------- 198882 -------- 228580 -------- 262243 -------- 292064 -------- 316161 -------- 344194 -------- 368550 -------- 402722 -------- 434529 -------- 468807 -------- 495107 -------- 526338 -------- 563239 -------- 597733 -------- 641894 -------- 665730 -------- 688742 -------- 721767 -------- 750050 -------- 787879 -------- 814565 -------- 837381 -------- 866657 -------- 902855 -------- 927172 -------- 952772 -------- 975840 -------- 1008646 -------- 1032066 -------- 1074656 -------- 1104896 -------- 1138369 -------- 1166689 -------- 1194912 -------- 1225222 -------- 1253284 -------- 1284803 -------- 1318499 -------- 1348609 -------- 1376609 -------- 1404933 -------- 1435745 -------- 1460325 -------- 1491648 -------- 1518852 -------- 1542567 -------- 1574277 -------- 1597958 -------- 1624964 -------- 1647555 -------- 1683651 -------- 1717189 -------- 1750563 -------- 1784775 -------- 1812449 -------- 1838850 -------- 1867751 -------- 1891783 -------- 1918790 -------- 1949827 -------- 1986021 -------- 2020134 -------- 2045829 -------- 2077894 -------- 2118912 -------- 2143264 -------- 2176486 -------- 2204838 -------- 2234146 -------- 2260484 -------- 2288512 -------- 2317121 -------- 2344321 -------- 2362567 -------- 2396133 -------- 2423623 -------- 2454884 -------- 2483879 -------- 2520162 -------- 2545574 -------- 2571874 -------- 2608417 -------- 2637477 -------- 2665607 -------- 2692231 -------- 2724261 -------- 2764451 -------- 2798656 -------- 2824775 -------- 2858690 -------- 2881990 -------- 2911814 -------- 2945056 -------- 2981315 -------- 3010306 -------- 3032320 -------- 3064389 -------- 3084166 -------- 3108832 -------- 3136032 -------- 3168484 -------- 3204039 -------- 3229922 -------- 3256549 -------- 3283169 -------- 3315236 -------- 3346756 -------- 3375879 -------- 3408007 -------- 3441827 -------- 3471204 -------- 3505414 -------- 3527938 -------- 3562561 -------- 3598630 -------- 3627270 -------- 3659266 -------- 3686468 -------- 3713505 -------- 3750817 -------- 3777696 -------- 3808129 -------- 3834533 -------- 3871968 -------- 3904931 -------- 3934215 -------- 3960643 -------- 3990336 -------- 4023203 -------- 4057826 -------- 4090691 -------- 4121216 -------- 4159681 -------- 4190726 -------- 4222624 -------- 4246567 -------- 4283653 -------- 4314339 -------- 4342592 -------- 4373829 -------- 4402372 -------- 4431332 -------- 4464452 -------- 4496327 -------- 4526789 -------- 4551109 -------- 4582401 -------- 4615974 -------- 4648482 -------- 4669601 -------- 4705891 -------- 4732869 -------- 4766145 -------- 4805862 -------- 4840677 -------- 4866787 -------- 4895332 -------- 4928100 -------- 4956323 -------- 4992161 -------- 5027008 -------- 5065797 -------- 5099011 -------- 5130592 -------- 5163463 -------- 5197314 -------- 5224994 -------- 5253892 -------- 5277638 -------- 5307105 -------- 5335750 -------- 5369828 -------- 5402528 -------- 5434183 -------- 5464227 -------- 5491072 -------- 5520679 -------- 5543047 -------- 5576708 -------- 5614951 -------- 5646055 -------- 5674721 -------- 5700295 -------- 5732066 -------- 5761255 -------- 5791233 -------- 5819651 -------- 5852291 -------- 5880258 -------- 5909062 -------- 5943111 -------- 5973926 -------- 5998752 150 │ │ │ │ │ histogram(13)= 0 0 5838.5 450 7200 1500 7200 300 6450 900 7200 1050 6600 900 7050 600 6900 900 6600 900 6600 750 6900 1050 6450 900 7050 1350 6750 1050 6150 1500 7200 600 6900 600 6900 450 7050 300 6600 750 7200 600 6750 600 7200 300 7200 1350 7050 1200 6600 1050 7050 900 7050 450 6450 1050 6900 450 0 542.31 151 │ │ │ │ │ <--- '1993-12-31' -------- '1994-01-12' ------ '1994-01-23' ------ '1994-02-04' ------ '1994-02-16' ------ '1994-03-01' ------ '1994-03-14' ------ '1994-03-24' ------ '1994-04-06' ------ '1994-04-20' ------ '1994-05-01' ------ '1994-05-12' ------ '1994-05-23' ------ '1994-06-03' ------ '1994-06-16' ------ '1994-06-25' ------ '1994-07-08' ------ '1994-07-19' ------ '1994-08-01' ------ '1994-08-14' ------ '1994-08-25' ------ '1994-09-06' ------ '1994-09-18' ------ '1994-10-01' ------ '1994-10-17' ------ '1994-10-30' ------ '1994-11-10' ------ '1994-11-22' ------ '1994-12-02' ------ '1994-12-16' ------ '1994-12-30' --- '1994-12-31' 152 │ │ │ │ ├── key: (9) 153 │ │ │ │ └── fd: (9)-->(13) 154 │ │ │ └── filters 155 │ │ │ └── l_orderkey:18 = o_orderkey:9 [type=bool, outer=(9,18), constraints=(/9: (/NULL - ]; /18: (/NULL - ]), fd=(9)==(18), (18)==(9)] 156 │ │ ├── scan customer@c_nk 157 │ │ │ ├── save-table-name: q5_scan_15 158 │ │ │ ├── columns: c_custkey:1(int!null) c_nationkey:4(int!null) 159 │ │ │ ├── stats: [rows=150000, distinct(1)=148813, null(1)=0, distinct(4)=25, null(4)=0] 160 │ │ │ │ histogram(1)= 0 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 735 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 750 15 161 │ │ │ │ <--- 2 ----- 776 ----- 1422 ----- 2189 ----- 2973 ----- 3583 ----- 4390 ----- 5154 ----- 5962 ----- 6965 ----- 7596 ----- 8303 ----- 9167 ----- 9833 ----- 10695 ----- 11397 ----- 11979 ----- 12651 ----- 13397 ----- 14144 ----- 14951 ----- 15698 ----- 16460 ----- 17203 ----- 17846 ----- 18462 ----- 19390 ----- 20189 ----- 20852 ----- 21642 ----- 22379 ----- 23009 ----- 23856 ----- 24734 ----- 25473 ----- 26231 ----- 26978 ----- 27654 ----- 28276 ----- 29054 ----- 29727 ----- 30527 ----- 31177 ----- 32126 ----- 32984 ----- 33684 ----- 34316 ----- 35070 ----- 35703 ----- 36397 ----- 37156 ----- 37709 ----- 38488 ----- 39131 ----- 39740 ----- 40736 ----- 41459 ----- 42388 ----- 42999 ----- 43844 ----- 44571 ----- 45428 ----- 46283 ----- 46979 ----- 47712 ----- 48708 ----- 49487 ----- 50275 ----- 51131 ----- 51836 ----- 52652 ----- 53389 ----- 54179 ----- 54861 ----- 55609 ----- 56492 ----- 57284 ----- 57917 ----- 58793 ----- 59665 ----- 60285 ----- 60840 ----- 61523 ----- 62354 ----- 63178 ----- 63933 ----- 64642 ----- 65282 ----- 65864 ----- 66755 ----- 67407 ----- 68099 ----- 68875 ----- 69638 ----- 70304 ----- 71016 ----- 71830 ----- 72742 ----- 73590 ----- 74434 ----- 75274 ----- 75861 ----- 76547 ----- 77252 ----- 77978 ----- 78650 ----- 79313 ----- 79925 ----- 80677 ----- 81497 ----- 82205 ----- 82962 ----- 83879 ----- 84815 ----- 85521 ----- 86272 ----- 87140 ----- 87759 ----- 88634 ----- 89452 ----- 90192 ----- 90920 ----- 91756 ----- 92690 ----- 93299 ----- 93950 ----- 94812 ----- 95569 ----- 96295 ----- 96904 ----- 97499 ----- 98144 ----- 98764 ----- 99582 ----- 100453 ----- 101098 ----- 101892 ----- 102700 ----- 103419 ----- 104297 ----- 105040 ----- 105864 ----- 106498 ----- 107196 ----- 108022 ----- 108731 ----- 109398 ----- 110145 ----- 110849 ----- 111758 ----- 112501 ----- 113222 ----- 114019 ----- 114904 ----- 115693 ----- 116350 ----- 116955 ----- 117581 ----- 118366 ----- 119159 ----- 119902 ----- 120535 ----- 121321 ----- 121993 ----- 122769 ----- 123504 ----- 124225 ----- 124992 ----- 125632 ----- 126685 ----- 127641 ----- 128303 ----- 129042 ----- 129589 ----- 130548 ----- 131374 ----- 132325 ----- 133042 ----- 133883 ----- 134716 ----- 135520 ----- 136173 ----- 136858 ----- 137584 ----- 138381 ----- 139162 ----- 139923 ----- 140738 ----- 141557 ----- 142287 ----- 143002 ----- 143794 ----- 144420 ----- 145276 ----- 146100 ----- 146977 ----- 147821 ----- 148440 ----- 149247 ----- 149978 162 │ │ │ │ histogram(4)= 0 6255 0 5190 0 6345 0 5505 0 5520 0 6585 0 6405 0 5895 0 5640 0 5775 0 5745 0 6630 0 6300 0 6255 0 6105 0 5760 0 6270 0 5850 0 6195 0 6330 0 6150 0 5820 0 5790 0 5985 0 5700 163 │ │ │ │ <--- 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 164 │ │ │ ├── key: (1) 165 │ │ │ └── fd: (1)-->(4) 166 │ │ └── filters 167 │ │ ├── c_custkey:1 = o_custkey:10 [type=bool, outer=(1,10), constraints=(/1: (/NULL - ]; /10: (/NULL - ]), fd=(1)==(10), (10)==(1)] 168 │ │ └── c_nationkey:4 = s_nationkey:37 [type=bool, outer=(4,37), constraints=(/4: (/NULL - ]; /37: (/NULL - ]), fd=(4)==(37), (37)==(4)] 169 │ └── projections 170 │ └── l_extendedprice:23 * (1.0 - l_discount:24) [as=column48:48, type=float, outer=(23,24)] 171 └── aggregations 172 └── sum [as=sum:49, type=float, outer=(48)] 173 └── column48:48 [type=float] 174 175 stats table=q5_sort_1 176 ---- 177 column_names row_count distinct_count null_count 178 {n_name} 5 5 0 179 {revenue} 5 5 0 180 ~~~~ 181 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 182 {n_name} 5.00 1.00 5.00 1.00 0.00 1.00 183 {revenue} 5.00 1.00 5.00 1.00 0.00 1.00 184 185 stats table=q5_group_by_2 186 ---- 187 column_names row_count distinct_count null_count 188 {n_name} 5 5 0 189 {sum} 5 5 0 190 ~~~~ 191 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 192 {n_name} 5.00 1.00 5.00 1.00 0.00 1.00 193 {sum} 5.00 1.00 5.00 1.00 0.00 1.00 194 195 stats table=q5_project_3 196 ---- 197 column_names row_count distinct_count null_count 198 {column48} 7243 7245 0 199 {n_name} 7243 5 0 200 ~~~~ 201 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 202 {column48} 13445.00 1.86 13136.00 1.81 0.00 1.00 203 {n_name} 13445.00 1.86 5.00 1.00 0.00 1.00 204 205 stats table=q5_inner_join_4 206 ---- 207 column_names row_count distinct_count null_count 208 {c_custkey} 7243 5557 0 209 {c_nationkey} 7243 5 0 210 {l_discount} 7243 11 0 211 {l_extendedprice} 7243 7208 0 212 {l_orderkey} 7243 6640 0 213 {l_suppkey} 7243 1944 0 214 {n_name} 7243 5 0 215 {n_nationkey} 7243 5 0 216 {n_regionkey} 7243 1 0 217 {o_custkey} 7243 5557 0 218 {o_orderdate} 7243 365 0 219 {o_orderkey} 7243 6640 0 220 {r_name} 7243 1 0 221 {r_regionkey} 7243 1 0 222 {s_nationkey} 7243 5 0 223 {s_suppkey} 7243 1944 0 224 ~~~~ 225 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 226 {c_custkey} 13445.00 1.86 13445.00 2.42 <== 0.00 1.00 227 {c_nationkey} 13445.00 1.86 5.00 1.00 0.00 1.00 228 {l_discount} 13445.00 1.86 11.00 1.00 0.00 1.00 229 {l_extendedprice} 13445.00 1.86 13108.00 1.82 0.00 1.00 230 {l_orderkey} 13445.00 1.86 13061.00 1.97 <== 0.00 1.00 231 {l_suppkey} 13445.00 1.86 1844.00 1.05 0.00 1.00 232 {n_name} 13445.00 1.86 5.00 1.00 0.00 1.00 233 {n_nationkey} 13445.00 1.86 5.00 1.00 0.00 1.00 234 {n_regionkey} 13445.00 1.86 1.00 1.00 0.00 1.00 235 {o_custkey} 13445.00 1.86 13445.00 2.42 <== 0.00 1.00 236 {o_orderdate} 13445.00 1.86 365.00 1.00 0.00 1.00 237 {o_orderkey} 13445.00 1.86 13061.00 1.97 <== 0.00 1.00 238 {r_name} 13445.00 1.86 1.00 1.00 0.00 1.00 239 {r_regionkey} 13445.00 1.86 1.00 1.00 0.00 1.00 240 {s_nationkey} 13445.00 1.86 5.00 1.00 0.00 1.00 241 {s_suppkey} 13445.00 1.86 1844.00 1.05 0.00 1.00 242 243 stats table=q5_inner_join_5 244 ---- 245 column_names row_count distinct_count null_count 246 {l_discount} 182183 11 0 247 {l_extendedprice} 182183 164481 0 248 {l_orderkey} 182183 123823 0 249 {l_suppkey} 182183 2002 0 250 {n_name} 182183 5 0 251 {n_nationkey} 182183 5 0 252 {n_regionkey} 182183 1 0 253 {o_custkey} 182183 68395 0 254 {o_orderdate} 182183 365 0 255 {o_orderkey} 182183 123823 0 256 {r_name} 182183 1 0 257 {r_regionkey} 182183 1 0 258 {s_nationkey} 182183 5 0 259 {s_suppkey} 182183 2002 0 260 ~~~~ 261 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 262 {l_discount} 333477.00 1.83 11.00 1.00 0.00 1.00 263 {l_extendedprice} 333477.00 1.83 263171.00 1.60 0.00 1.00 264 {l_orderkey} 333477.00 1.83 230331.00 1.86 0.00 1.00 265 {l_suppkey} 333477.00 1.83 1845.00 1.09 0.00 1.00 266 {n_name} 333477.00 1.83 5.00 1.00 0.00 1.00 267 {n_nationkey} 333477.00 1.83 5.00 1.00 0.00 1.00 268 {n_regionkey} 333477.00 1.83 1.00 1.00 0.00 1.00 269 {o_custkey} 333477.00 1.83 89273.00 1.31 0.00 1.00 270 {o_orderdate} 333477.00 1.83 365.00 1.00 0.00 1.00 271 {o_orderkey} 333477.00 1.83 230331.00 1.86 0.00 1.00 272 {r_name} 333477.00 1.83 1.00 1.00 0.00 1.00 273 {r_regionkey} 333477.00 1.83 1.00 1.00 0.00 1.00 274 {s_nationkey} 333477.00 1.83 5.00 1.00 0.00 1.00 275 {s_suppkey} 333477.00 1.83 1845.00 1.09 0.00 1.00 276 277 stats table=q5_inner_join_6 278 ---- 279 column_names row_count distinct_count null_count 280 {l_discount} 1201113 11 0 281 {l_extendedprice} 1201113 634132 0 282 {l_orderkey} 1201113 825141 0 283 {l_suppkey} 1201113 2002 0 284 {n_name} 1201113 5 0 285 {n_nationkey} 1201113 5 0 286 {n_regionkey} 1201113 1 0 287 {r_name} 1201113 1 0 288 {r_regionkey} 1201113 1 0 289 {s_nationkey} 1201113 5 0 290 {s_suppkey} 1201113 2002 0 291 ~~~~ 292 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 293 {l_discount} 1209922.00 1.01 11.00 1.00 0.00 1.00 294 {l_extendedprice} 1209922.00 1.01 675298.00 1.06 0.00 1.00 295 {l_orderkey} 1209922.00 1.01 835686.00 1.01 0.00 1.00 296 {l_suppkey} 1209922.00 1.01 1845.00 1.09 0.00 1.00 297 {n_name} 1209922.00 1.01 5.00 1.00 0.00 1.00 298 {n_nationkey} 1209922.00 1.01 5.00 1.00 0.00 1.00 299 {n_regionkey} 1209922.00 1.01 1.00 1.00 0.00 1.00 300 {r_name} 1209922.00 1.01 1.00 1.00 0.00 1.00 301 {r_regionkey} 1209922.00 1.01 1.00 1.00 0.00 1.00 302 {s_nationkey} 1209922.00 1.01 5.00 1.00 0.00 1.00 303 {s_suppkey} 1209922.00 1.01 1845.00 1.09 0.00 1.00 304 305 stats table=q5_scan_7 306 ---- 307 column_names row_count distinct_count null_count 308 {l_discount} 6001215 11 0 309 {l_extendedprice} 6001215 925955 0 310 {l_orderkey} 6001215 1527270 0 311 {l_suppkey} 6001215 9920 0 312 ~~~~ 313 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 314 {l_discount} 6001215.00 1.00 11.00 1.00 0.00 1.00 315 {l_extendedprice} 6001215.00 1.00 925955.00 1.00 0.00 1.00 316 {l_orderkey} 6001215.00 1.00 1527270.00 1.00 0.00 1.00 317 {l_suppkey} 6001215.00 1.00 9920.00 1.00 0.00 1.00 318 319 stats table=q5_lookup_join_8 320 ---- 321 column_names row_count distinct_count null_count 322 {n_name} 2003 5 0 323 {n_nationkey} 2003 5 0 324 {n_regionkey} 2003 1 0 325 {r_name} 2003 1 0 326 {r_regionkey} 2003 1 0 327 {s_nationkey} 2003 5 0 328 {s_suppkey} 2003 2002 0 329 ~~~~ 330 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 331 {n_name} 2000.00 1.00 5.00 1.00 0.00 1.00 332 {n_nationkey} 2000.00 1.00 5.00 1.00 0.00 1.00 333 {n_regionkey} 2000.00 1.00 1.00 1.00 0.00 1.00 334 {r_name} 2000.00 1.00 1.00 1.00 0.00 1.00 335 {r_regionkey} 2000.00 1.00 1.00 1.00 0.00 1.00 336 {s_nationkey} 2000.00 1.00 5.00 1.00 0.00 1.00 337 {s_suppkey} 2000.00 1.00 1845.00 1.09 0.00 1.00 338 339 stats table=q5_inner_join_9 340 ---- 341 column_names row_count distinct_count null_count 342 {n_name} 5 5 0 343 {n_nationkey} 5 5 0 344 {n_regionkey} 5 1 0 345 {r_name} 5 1 0 346 {r_regionkey} 5 1 0 347 ~~~~ 348 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 349 {n_name} 5.00 1.00 5.00 1.00 0.00 1.00 350 {n_nationkey} 5.00 1.00 5.00 1.00 0.00 1.00 351 {n_regionkey} 5.00 1.00 1.00 1.00 0.00 1.00 352 {r_name} 5.00 1.00 1.00 1.00 0.00 1.00 353 {r_regionkey} 5.00 1.00 1.00 1.00 0.00 1.00 354 355 stats table=q5_scan_10 356 ---- 357 column_names row_count distinct_count null_count 358 {n_name} 25 25 0 359 {n_nationkey} 25 25 0 360 {n_regionkey} 25 5 0 361 ~~~~ 362 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 363 {n_name} 25.00 1.00 25.00 1.00 0.00 1.00 364 {n_nationkey} 25.00 1.00 25.00 1.00 0.00 1.00 365 {n_regionkey} 25.00 1.00 5.00 1.00 0.00 1.00 366 367 stats table=q5_select_11 368 ---- 369 column_names row_count distinct_count null_count 370 {r_name} 1 1 0 371 {r_regionkey} 1 1 0 372 ~~~~ 373 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 374 {r_name} 1.00 1.00 1.00 1.00 0.00 1.00 375 {r_regionkey} 1.00 1.00 1.00 1.00 0.00 1.00 376 377 stats table=q5_scan_12 378 ---- 379 column_names row_count distinct_count null_count 380 {r_name} 5 5 0 381 {r_regionkey} 5 5 0 382 ~~~~ 383 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 384 {r_name} 5.00 1.00 5.00 1.00 0.00 1.00 385 {r_regionkey} 5.00 1.00 5.00 1.00 0.00 1.00 386 387 stats table=q5_index_join_13 388 ---- 389 column_names row_count distinct_count null_count 390 {o_custkey} 227597 86427 0 391 {o_orderdate} 227597 365 0 392 {o_orderkey} 227597 229152 0 393 ~~~~ 394 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 395 {o_custkey} 230331.00 1.01 91687.00 1.06 0.00 1.00 396 {o_orderdate} 230331.00 1.01 365.00 1.00 0.00 1.00 397 {o_orderkey} 230331.00 1.01 230331.00 1.01 0.00 1.00 398 399 stats table=q5_scan_15 400 ---- 401 column_names row_count distinct_count null_count 402 {c_custkey} 150000 148813 0 403 {c_nationkey} 150000 25 0 404 ~~~~ 405 column_names row_count_est row_count_err distinct_count_est distinct_count_err null_count_est null_count_err 406 {c_custkey} 150000.00 1.00 148813.00 1.00 0.00 1.00 407 {c_nationkey} 150000.00 1.00 25.00 1.00 0.00 1.00