From 62d520fefb10236f07b245c5f4d514a97cc23529 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E6=B6=A6=E6=B3=BD?= <17367971251@163.com> Date: Fri, 22 Nov 2024 09:00:08 +0000 Subject: [PATCH] =?UTF-8?q?update=20Oracle/or=5Fquery=5Ftable=5Fdate.go.?= =?UTF-8?q?=20=E5=AF=B9=E6=AF=94oracle=E6=95=B0=E6=8D=AE=E5=BA=93=E4=B8=A4?= =?UTF-8?q?=E4=B8=AA=E9=9D=99=E6=80=81=E8=A1=A8=E6=97=B6=E5=80=99=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E7=BB=9F=E8=AE=A1=E4=BF=A1=E6=81=AF=E6=94=B6=E9=9B=86?= =?UTF-8?q?=E4=BC=9A=E6=8A=A5=E9=94=99=EF=BC=8C=E9=9C=80=E8=A6=81=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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