diff --git a/plugins/tpcc/4.0.0.0/analyze.sql b/plugins/tpcc/4.0.0.0/analyze.sql index 0c26f259574acbe3f9622500f41634574b475991..e180f5b416185c9198020ddd43c98a268b9a701a 100644 --- a/plugins/tpcc/4.0.0.0/analyze.sql +++ b/plugins/tpcc/4.0.0.0/analyze.sql @@ -1,11 +1,10 @@ -set _force_parallel_query_dop = {cpu_total}; -analyze table bmsql_warehouse partition(bmsql_warehouse) compute statistics for all columns size auto; -analyze table bmsql_district partition(bmsql_district) compute statistics for all columns size auto; -analyze table bmsql_customer partition(bmsql_customer) compute statistics for all columns size auto; -analyze table bmsql_new_order partition(bmsql_new_order) compute statistics for all columns size auto; -analyze table bmsql_oorder partition(bmsql_oorder) compute statistics for all columns size auto; -analyze table bmsql_order_line partition(bmsql_order_line) compute statistics for all columns size auto; -analyze table bmsql_stock partition(bmsql_stock) compute statistics for all columns size auto; -analyze table bmsql_history partition(bmsql_history) compute statistics for all columns size auto; -analyze table bmsql_config compute statistics for all columns size auto; -analyze table bmsql_item compute statistics for all columns size auto; \ No newline at end of file +call dbms_stats.gather_table_stats('test', 'bmsql_warehouse', degree=>{cpu_total}, granularity=>'GLOBAL', method_opt=>'FOR ALL COLUMNS SIZE AUTO'); +call dbms_stats.gather_table_stats('test', 'bmsql_district', degree=>{cpu_total}, granularity=>'GLOBAL', method_opt=>'FOR ALL COLUMNS SIZE AUTO'); +call dbms_stats.gather_table_stats('test', 'bmsql_customer', degree=>{cpu_total}, granularity=>'GLOBAL', method_opt=>'FOR ALL COLUMNS SIZE AUTO'); +call dbms_stats.gather_table_stats('test', 'bmsql_new_order', degree=>{cpu_total}, granularity=>'GLOBAL', method_opt=>'FOR ALL COLUMNS SIZE AUTO'); +call dbms_stats.gather_table_stats('test', 'bmsql_oorder', degree=>{cpu_total}, granularity=>'GLOBAL', method_opt=>'FOR ALL COLUMNS SIZE AUTO'); +call dbms_stats.gather_table_stats('test', 'bmsql_order_line', degree=>{cpu_total}, granularity=>'GLOBAL', method_opt=>'FOR ALL COLUMNS SIZE AUTO'); +call dbms_stats.gather_table_stats('test', 'bmsql_stock', degree=>{cpu_total}, granularity=>'GLOBAL', method_opt=>'FOR ALL COLUMNS SIZE AUTO'); +call dbms_stats.gather_table_stats('test', 'bmsql_history', degree=>{cpu_total}, granularity=>'GLOBAL', method_opt=>'FOR ALL COLUMNS SIZE AUTO'); +call dbms_stats.gather_table_stats('test', 'bmsql_config', degree=>{cpu_total}, granularity=>'AUTO', method_opt=>'FOR ALL COLUMNS SIZE AUTO'); +call dbms_stats.gather_table_stats('test', 'bmsql_item', degree=>{cpu_total}, granularity=>'AUTO', method_opt=>'FOR ALL COLUMNS SIZE AUTO'); \ No newline at end of file diff --git a/plugins/tpch/3.1.0/run_test.py b/plugins/tpch/3.1.0/run_test.py index c6782c578543b60f4aa12855042ad688292cdace..5dcfcbde1a194d4b32a42fbf6099b3a6be3de183 100644 --- a/plugins/tpch/3.1.0/run_test.py +++ b/plugins/tpch/3.1.0/run_test.py @@ -227,10 +227,10 @@ def run_test(plugin_context, db, cursor, *args, **kwargs): end_time = time.time() cost = end_time - start_time total_cost += cost - stdio.print('[%s]: end %s, cost %.1fs' % (time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(end_time)), path, cost)) + stdio.print('[%s]: end %s, cost %.2fs' % (time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(end_time)), path, cost)) if not ret: raise Exception(ret.stderr) - stdio.print('Total Cost: %.1fs' % total_cost) + stdio.print('Total Cost: %.2fs' % total_cost) return plugin_context.return_true() except KeyboardInterrupt: stdio.stop_loading('fail') diff --git a/plugins/tpch/4.0.0.0/analyze.sql b/plugins/tpch/4.0.0.0/analyze.sql index 776cbd7cf4475e4b8d14f8e6c64b88fd07cdf0e3..99946b3d1a293d91116f75471c2b837b30a36b53 100644 --- a/plugins/tpch/4.0.0.0/analyze.sql +++ b/plugins/tpch/4.0.0.0/analyze.sql @@ -1,9 +1,8 @@ -set _force_parallel_query_dop = {cpu_total}; -analyze table lineitem partition(lineitem) compute statistics for all columns size auto; -analyze table orders partition(orders) compute statistics for all columns size auto; -analyze table partsupp partition(partsupp) compute statistics for all columns size auto; -analyze table part partition(part) compute statistics for all columns size auto; -analyze table customer partition(customer) compute statistics for all columns size auto; -analyze table supplier partition(supplier) compute statistics for all columns size auto; -analyze table nation compute statistics for all columns size auto; -analyze table region compute statistics for all columns size auto; \ No newline at end of file +call dbms_stats.gather_table_stats('test', 'lineitem', degree=>{cpu_total}, granularity=>'GLOBAL', method_opt=>'FOR ALL COLUMNS SIZE AUTO'); +call dbms_stats.gather_table_stats('test', 'orders', degree=>{cpu_total}, granularity=>'GLOBAL', method_opt=>'FOR ALL COLUMNS SIZE AUTO'); +call dbms_stats.gather_table_stats('test', 'partsupp', degree=>{cpu_total}, granularity=>'GLOBAL', method_opt=>'FOR ALL COLUMNS SIZE AUTO'); +call dbms_stats.gather_table_stats('test', 'part', degree=>{cpu_total}, granularity=>'GLOBAL', method_opt=>'FOR ALL COLUMNS SIZE AUTO'); +call dbms_stats.gather_table_stats('test', 'customer', degree=>{cpu_total}, granularity=>'GLOBAL', method_opt=>'FOR ALL COLUMNS SIZE AUTO'); +call dbms_stats.gather_table_stats('test', 'supplier', degree=>{cpu_total}, granularity=>'GLOBAL', method_opt=>'FOR ALL COLUMNS SIZE AUTO'); +call dbms_stats.gather_table_stats('test', 'nation', degree=>{cpu_total}, granularity=>'AUTO', method_opt=>'FOR ALL COLUMNS SIZE AUTO'); +call dbms_stats.gather_table_stats('test', 'region', degree=>{cpu_total}, granularity=>'AUTO', method_opt=>'FOR ALL COLUMNS SIZE AUTO'); \ No newline at end of file diff --git a/plugins/tpch/4.0.0.0/run_test.py b/plugins/tpch/4.0.0.0/run_test.py index 37fec0513d8f297359f8b1303018e7d2b519de56..64264fb09509acb31e9772996dbd323ff92a2066 100644 --- a/plugins/tpch/4.0.0.0/run_test.py +++ b/plugins/tpch/4.0.0.0/run_test.py @@ -243,10 +243,10 @@ def run_test(plugin_context, db, cursor, *args, **kwargs): end_time = time.time() cost = end_time - start_time total_cost += cost - stdio.print('[%s]: end %s, cost %.1fs' % (time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(end_time)), path, cost)) + stdio.print('[%s]: end %s, cost %.2fs' % (time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(end_time)), path, cost)) if not ret: raise Exception(ret.stderr) - stdio.print('Total Cost: %.1fs' % total_cost) + stdio.print('Total Cost: %.2fs' % total_cost) return plugin_context.return_true() except KeyboardInterrupt: stdio.stop_loading('fail')