Re: Is it worth to optimize VACUUM/ANALYZE by combining duplicate rel instances into single rel instance? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Is it worth to optimize VACUUM/ANALYZE by combining duplicate rel instances into single rel instance?
Date
Msg-id 2297467.1618065190@sss.pgh.pa.us
Whole thread Raw
In response to Is it worth to optimize VACUUM/ANALYZE by combining duplicate rel instances into single rel instance?  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: Is it worth to optimize VACUUM/ANALYZE by combining duplicate rel instances into single rel instance?
List pgsql-hackers
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> writes:
> I'm reading the code for vacuum/analyze and it looks like currently we
> call vacuum_rel/analyze_rel for each relation specified. Which means
> that if a relation is specified more than once, then we simply
> vacuum/analyze it that many times. Do we gain any advantage by
> vacuuming/analyzing a relation back-to-back within a single command? I
> strongly feel no. I'm thinking we could do a simple optimization here,

This really is not something to expend cycles and code complexity on.
If the user wrote the same table more than once, that's their choice.

            regards, tom lane



pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Replication slot stats misgivings
Next
From: Japin Li
Date:
Subject: Re: Truncate in synchronous logical replication failed