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

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


The following commit(s) were added to refs/heads/master by this push:
     new c25e1b7d95 [fix](tools)fix perf tools analyze db (#23370)
c25e1b7d95 is described below

commit c25e1b7d95ef7fa86f06f3a78b24338333ee5072
Author: zhangguoqiang <18372634...@163.com>
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         | 11 +++++++++--
 4 files changed, 19 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 0c5ee8da38..39dd0ed58c 100755
--- a/tools/tpch-tools/bin/run-tpch-queries.sh
+++ b/tools/tpch-tools/bin/run-tpch-queries.sh
@@ -96,14 +96,21 @@ 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 '============================================'
 start=$(date +%s)
-run_sql "analyze database ${DB} with sync;"
+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"


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to