You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ALTER TABLE partsupp ADD INDEX I1 (PS_PARTKEY, PS_SUPPKEY);
112
-
ALTER TABLE lineitem ADD COLUMN `recdate_gt_commitdate` tinyint(4) NOT NULL DEFAULT 0;
113
-
UPDATE lineitem SET recdate_gt_commitdate = 1 WHERE l_receiptdate > l_commitdate;
114
-
ALTER TABLE lineitem ADD INDEX(`l_orderkey`, `l_suppkey`,recdate_gt_commitdate);
84
+
ALTER TABLE lineitem ADD INDEX(`l_orderkey`, `l_suppkey`);
115
85
ALTER TABLE orders ADD INDEX(`o_orderkey`, `o_orderstatus`);
116
86
ALTER TABLE supplier ADD INDEX(s_nationkey, s_suppkey,s_name);
117
-
ALTER TABLE supplier ADD FOREIGN KEY (S_NATIONKEY) REFERENCES nation(N_NATIONKEY);
118
-
ALTER TABLE orders ADD FOREIGN KEY (O_CUSTKEY) REFERENCES customer(C_CUSTKEY);
119
-
ALTER TABLE lineitem ADD FOREIGN KEY (L_ORDERKEY) REFERENCES orders(O_ORDERKEY);
120
-
ALTER TABLE lineitem ADD FOREIGN KEY (L_PARTKEY) REFERENCES part(P_PARTKEY);
121
-
ALTER TABLE lineitem ADD FOREIGN KEY (L_SUPPKEY) REFERENCES supplier(S_SUPPKEY);
122
-
ALTER table nation ADD FOREIGN KEY (N_REGIONKEY) REFERENCES region(R_REGIONKEY);
123
-
ALTER TABLE partsupp ADD FOREIGN KEY (PS_PARTKEY) REFERENCES part(P_PARTKEY);
124
-
ALTER TABLE partsupp ADD FOREIGN KEY (PS_SUPPKEY) REFERENCES supplier(S_SUPPKEY);
125
-
ALTER TABLE customer ADD FOREIGN KEY (C_NATIONKEY) REFERENCES nation(N_NATIONKEY);
126
-
SET histogram_size=40;
87
+
SET histogram_size=10;
127
88
ANALYZE TABLE lineitem PERSISTENT FOR COLUMNS(l_orderkey) INDEXES();
128
89
Table Op Msg_type Msg_text
129
90
tpchqa.lineitem analyze status Engine-independent statistics collected
130
-
tpchqa.lineitem analyze status Table is already up to date
91
+
tpchqa.lineitem analyze status OK
131
92
SET histogram_size=3;
132
93
ANALYZE TABLE partsupp PERSISTENT FOR COLUMNS(ps_partkey) INDEXES();
133
94
Table Op Msg_type Msg_text
134
95
tpchqa.partsupp analyze status Engine-independent statistics collected
135
-
tpchqa.partsupp analyze status Table is already up to date
96
+
tpchqa.partsupp analyze status OK
136
97
SET histogram_size=2;
137
98
ANALYZE TABLE part PERSISTENT FOR COLUMNS(p_partkey) INDEXES();
138
99
Table Op Msg_type Msg_text
139
100
tpchqa.part analyze status Engine-independent statistics collected
140
101
tpchqa.part analyze status OK
141
-
SET histogram_size=6;
102
+
SET histogram_size=5;
142
103
ANALYZE TABLE orders PERSISTENT FOR COLUMNS(o_orderkey) INDEXES();
143
104
Table Op Msg_type Msg_text
144
105
tpchqa.orders analyze status Engine-independent statistics collected
145
-
tpchqa.orders analyze status Table is already up to date
106
+
tpchqa.orders analyze status OK
146
107
SELECT count(*) from orders;
147
108
count(*)
148
109
150000
149
110
set columnstore_unstable_optimizer=on;
150
111
set optimizer_switch="index_merge=off,index_merge_union=off,index_merge_sort_union=off,index_merge_intersection=off,index_merge_sort_intersection=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=on,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=on,not_null_range_scan=off,hash_join_cardinality=off,cset_narrowing=off,sargable_casefold=off";
151
-
SET @@columnstore_query_accel_parallel_factor=15;
112
+
SET @@columnstore_query_accel_parallel_factor=5;
152
113
SELECT "QUERY 1";
153
114
QUERY 1
154
115
QUERY 1
@@ -172,10 +133,11 @@ A F 3774200.00 5320753880.69 5054096266.6828 5256751331.449234 25.537587 36002.1
172
133
N F 95257.00 133737795.84 127132372.6512 132286291.229445 25.300664 35521.326916 0.049394 3765
173
134
N O 7459297.00 10512270008.90 9986238338.3847 10385578376.585467 25.545538 36000.924688 0.050096 292000
174
135
R F 3785523.00 5337950526.47 5071818532.9420 5274405503.049367 25.525944 35994.029214 0.049989 148301
175
-
SET @rbo_rules := mcs_get_plan('rules');
176
-
SELECT @rbo_rules LIKE '%parallel_ces%' AS qa_q1_applied;
136
+
SELECT mcs_get_plan('rules') LIKE '%parallel_ces%' AS qa_q1_applied;
-942.73 Supplier#000000563 GERMANY 5797 Manufacturer#1 Rc7U1cRUhYs03JD 17-108-537-2691 slyly furiously final decoys; silent, special realms poach f
217
+
set columnstore_unstable_optimizer=on;
218
+
set optimizer_switch="index_merge=off,index_merge_union=off,index_merge_sort_union=off,index_merge_intersection=off,index_merge_sort_intersection=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=on,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=on,not_null_range_scan=off,hash_join_cardinality=off,cset_narrowing=off,sargable_casefold=off";
set optimizer_switch="index_merge=off,index_merge_union=off,index_merge_sort_union=off,index_merge_intersection=off,index_merge_sort_intersection=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=on,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=on,not_null_range_scan=off,hash_join_cardinality=off,cset_narrowing=off,sargable_casefold=off";
set optimizer_switch="index_merge=off,index_merge_union=off,index_merge_sort_union=off,index_merge_intersection=off,index_merge_sort_intersection=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=on,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=on,not_null_range_scan=off,hash_join_cardinality=off,cset_narrowing=off,sargable_casefold=off";
set optimizer_switch="index_merge=off,index_merge_union=off,index_merge_sort_union=off,index_merge_intersection=off,index_merge_sort_intersection=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=on,split_materialized=off,condition_pushdown_for_subquery=off,rowid_filter=off,condition_pushdown_from_having=on,not_null_range_scan=off,hash_join_cardinality=off,cset_narrowing=off,sargable_casefold=off";
0 commit comments