From 6e553c37ba188c375b184f85da2dddb9ff7ccc77 Mon Sep 17 00:00:00 2001 From: GreatSQL Date: Mon, 2 Dec 2024 01:27:20 +0000 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E9=80=80=20'Pull=20Request=20!2=20:?= =?UTF-8?q?=20=E3=80=90=E8=BD=BB=E9=87=8F=E7=BA=A7=20PR=E3=80=91=EF=BC=9Au?= =?UTF-8?q?pdate=20Oracle/or=5Fquery=5Ftable=5Fdate.go.'?= 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 49cb632..af79b93 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("BEGIN dbms_stats.gather_table_stats('%s','%s');END;", or.Schema, or.Table) + strsql = fmt.Sprintf("exec dbms_stats.gather_table_stats('%s','%s');", 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