This is an automated email from the ASF dual-hosted git repository.

kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 03149e14c5e39013e4a15b5ee3842e62a00e8872
Author: zhangguoqiang <[email protected]>
AuthorDate: Wed Aug 23 18:01:40 2023 +0800

    [fix](tools)fix perf tools analyze db (#23370)
---
 tools/clickbench-tools/run-clickbench-queries.sh |  3 +++
 tools/ssb-tools/bin/run-ssb-flat-queries.sh      |  3 ++-
 tools/ssb-tools/bin/run-ssb-queries.sh           |  6 +++++-
 tools/tpch-tools/bin/run-tpch-queries.sh         | 15 +++++++++++++--
 4 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/tools/clickbench-tools/run-clickbench-queries.sh 
b/tools/clickbench-tools/run-clickbench-queries.sh
index e2e636a39e..831879b764 100755
--- a/tools/clickbench-tools/run-clickbench-queries.sh
+++ b/tools/clickbench-tools/run-clickbench-queries.sh
@@ -103,9 +103,12 @@ pre_set() {
 
 pre_set "set global parallel_fragment_exec_instance_num=8;"
 pre_set "set global exec_mem_limit=32G;"
+pre_set "set global query_timeout=900;"
+
 echo '============================================'
 pre_set "show variables"
 echo '============================================'
+pre_set "analyze table hits with sync;"
 
 TRIES=3
 QUERY_NUM=1
diff --git a/tools/ssb-tools/bin/run-ssb-flat-queries.sh 
b/tools/ssb-tools/bin/run-ssb-flat-queries.sh
index 133c7216aa..0cdb4c68d9 100755
--- a/tools/ssb-tools/bin/run-ssb-flat-queries.sh
+++ b/tools/ssb-tools/bin/run-ssb-flat-queries.sh
@@ -117,13 +117,14 @@ origin_batch_size=$(
 run_sql "set global parallel_fragment_exec_instance_num=8;"
 run_sql "set global exec_mem_limit=8G;"
 run_sql "set global batch_size=4096;"
+run_sql "set global query_timeout=900;"
 echo '============================================'
 run_sql "show variables;"
 echo '============================================'
 run_sql "show table status;"
 echo '============================================'
 start=$(date +%s)
-run_sql "analyze database ${DB} with sync;"
+run_sql "analyze table lineorder_flat with sync;"
 end=$(date +%s)
 totalTime=$((end - start))
 echo "analyze database ${DB} with sync total time: ${totalTime} s"
diff --git a/tools/ssb-tools/bin/run-ssb-queries.sh 
b/tools/ssb-tools/bin/run-ssb-queries.sh
index ad5aecd9af..e2329dba72 100755
--- a/tools/ssb-tools/bin/run-ssb-queries.sh
+++ b/tools/ssb-tools/bin/run-ssb-queries.sh
@@ -133,7 +133,11 @@ echo '============================================'
 run_sql "show table status;"
 echo '============================================'
 start=$(date +%s)
-run_sql "analyze database ${DB} with sync;"
+run_sql "analyze table part with sync;"
+run_sql "analyze table customer with sync;"
+run_sql "analyze table supplier with sync;"
+run_sql "analyze table dates with sync;"
+run_sql "analyze table lineorder with sync;"
 end=$(date +%s)
 totalTime=$((end - start))
 echo "analyze database ${DB} with sync total time: ${totalTime} s"
diff --git a/tools/tpch-tools/bin/run-tpch-queries.sh 
b/tools/tpch-tools/bin/run-tpch-queries.sh
index b0caa4e787..39dd0ed58c 100755
--- a/tools/tpch-tools/bin/run-tpch-queries.sh
+++ b/tools/tpch-tools/bin/run-tpch-queries.sh
@@ -96,13 +96,24 @@ run_sql() {
     echo "$*"
     mysql -h"${FE_HOST}" -u"${USER}" -P"${FE_QUERY_PORT}" -D"${DB}" -e "$*"
 }
-
+run_sql "set global query_timeout=900;"
 echo '============================================'
 run_sql "show variables;"
 echo '============================================'
 run_sql "show table status;"
 echo '============================================'
-run_sql "analyze database ${DB};"
+start=$(date +%s)
+run_sql "analyze table lineitem with sync;"
+run_sql "analyze table orders with sync;"
+run_sql "analyze table partsupp with sync;"
+run_sql "analyze table part with sync;"
+run_sql "analyze table customer with sync;"
+run_sql "analyze table supplier with sync;"
+run_sql "analyze table nation with sync;"
+run_sql "analyze table region with sync;"
+end=$(date +%s)
+totalTime=$((end - start))
+echo "analyze database ${DB} with sync total time: ${totalTime} s"
 echo '============================================'
 echo "Time Unit: ms"
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to