Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0de0536

Browse files
NikolaySvitabaks
authored andcommitted
Analyze all databases with vacuumdb
When using the "logical" databases initialization, we need to analyze our target database (that one that has the data we just loaded). It looks like conn.DBName is pointing to "postgres" when we run vacuumdb. Switch to using "-all" for running ANALYZE. The most time is to be spent in our target database since only that database has significant volumes of data.
1 parent dac9c45 commit 0de0536

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/retrieval/engine/postgres/logical/logical.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func buildAnalyzeCommand(conn Connection, parallelJobs int) []string {
1515
"--analyze",
1616
"--jobs", strconv.Itoa(parallelJobs),
1717
"--username", conn.Username,
18-
"--dbname", conn.DBName,
18+
"--all",
1919
}
2020

2121
return analyzeCmd

0 commit comments

Comments
 (0)