Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6fafa6a

Browse files
committed
vacuumlo query cleanups
No need for VACUUM ANAYZE of newly created/populated temp table, justuse analyze.No need to apologize for using subquery in DELETE anymore.
1 parentd1ba294 commit6fafa6a

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

‎contrib/vacuumlo/vacuumlo.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/contrib/vacuumlo/vacuumlo.c,v 1.41 2009/02/27 09:30:21 petere Exp $
11+
* $PostgreSQL: pgsql/contrib/vacuumlo/vacuumlo.c,v 1.42 2009/07/13 22:56:30 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -155,11 +155,11 @@ vacuumlo(char *database, struct _param * param)
155155
PQclear(res);
156156

157157
/*
158-
*Vacuum the temp table so that planner will generate decent plans for
158+
*Analyze the temp table so that planner will generate decent plans for
159159
* the DELETEs below.
160160
*/
161161
buf[0]='\0';
162-
strcat(buf,"VACUUMANALYZE vacuum_l");
162+
strcat(buf,"ANALYZE vacuum_l");
163163
res=PQexec(conn,buf);
164164
if (PQresultStatus(res)!=PGRES_COMMAND_OK)
165165
{
@@ -216,11 +216,6 @@ vacuumlo(char *database, struct _param * param)
216216
if (param->verbose)
217217
fprintf(stdout,"Checking %s in %s.%s\n",field,schema,table);
218218

219-
/*
220-
* The "IN" construct used here was horribly inefficient before
221-
* Postgres 7.4, but should be now competitive if not better than the
222-
* bogus join we used before.
223-
*/
224219
snprintf(buf,BUFSIZE,
225220
"DELETE FROM vacuum_l "
226221
"WHERE lo IN (SELECT \"%s\" FROM \"%s\".\"%s\")",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp