From 6ee751587b7c6056fa8a1fd20de252711a1b0a48 Mon Sep 17 00:00:00 2001 From: YeJinrong Date: Fri, 29 Nov 2024 06:52:40 +0000 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=AF=94oracle=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E4=B8=A4=E4=B8=AA=E9=9D=99=E6=80=81=E8=A1=A8=E6=97=B6?= =?UTF-8?q?=E5=80=99=E6=89=A7=E8=A1=8C=E7=BB=9F=E8=AE=A1=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=94=B6=E9=9B=86=E4=BC=9A=E6=8A=A5=E9=94=99=EF=BC=8C=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: YeJinrong --- Oracle/or_query_table_date.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Oracle/or_query_table_date.go b/Oracle/or_query_table_date.go index af79b93..49cb632 100644 --- a/Oracle/or_query_table_date.go +++ b/Oracle/or_query_table_date.go @@ -191,7 +191,7 @@ func (or *QueryTable) TableRows(db *sql.DB, logThreadSeq int64) (uint64, error) dispos := dataDispos.DBdataDispos{DBType: DBType, LogThreadSeq: logThreadSeq, Event: Event, DB: db} vlog = fmt.Sprintf("(%d) [%s] Start querying the statistical information of table %s.%s in the %s database and get the number of rows in the table", logThreadSeq, Event, or.Schema, or.Table, DBType) global.Wlog.Debug(vlog) - strsql = fmt.Sprintf("exec dbms_stats.gather_table_stats('%s','%s');", or.Schema, or.Table) + strsql = fmt.Sprintf("BEGIN dbms_stats.gather_table_stats('%s','%s');END;", or.Schema, or.Table) dispos.DBSQLforExec(strsql) strsql = fmt.Sprintf("select num_rows as \"tableRows\" from dba_tables where owner='%s' and table_name='%s'", or.Schema, or.Table) if dispos.SqlRows, err = dispos.DBSQLforExec(strsql); err != nil { -- Gitee