From 5def97ad7fc5bae5657b6455bf2b5be3c9ab98c7 Mon Sep 17 00:00:00 2001 From: David Chen Date: Thu, 29 Mar 2018 16:42:08 +0800 Subject: [PATCH] fix analyze table (#19) --- ingest/restore/restore.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ingest/restore/restore.go b/ingest/restore/restore.go index 5c1a6dd7481f3..9685a0cfd055c 100644 --- a/ingest/restore/restore.go +++ b/ingest/restore/restore.go @@ -286,7 +286,7 @@ func analyzeTable(dsn config.DBStore, tables []string) error { for _, table := range tables { log.Infof("analyze table %s", table) - _, err := db.Exec("ANALYZE TABLE %s", table) + _, err := db.Exec(fmt.Sprintf("ANALYZE TABLE %s", table)) if err != nil { log.Errorf("analyze table %s error %s", table, errors.ErrorStack(err)) continue