From: Tom Lane <tgl@sss.pgh.pa.us>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: hellojo180@yahoo.es, PostgreSQL Bugs <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #15987: Improve REINDEX of all indexes of a table at once
Date: Sun, 01 Sep 2019 11:36:25 -0400
Message-ID: <31841.1567352185@sss.pgh.pa.us> (raw)
In-Reply-To: <alpine.DEB.2.21.1909011143230.29429@lancre>
References: <15987-7d85883d9674a15e@postgresql.org>
<20190901043534.GA3190@paquier.xyz>
<alpine.DEB.2.21.1909011143230.29429@lancre>
Fabien COELHO <coelho@cri.ensmp.fr> writes:
>> I don't quite understand your request. You have REINDEX TABLE which
>> is able to reindex all the indexes of a table one by one, […]
> I understood the request as the scan should be factored out, so that
> reindexing a table with multiple indexes would cost only one seq scan.
I'm not totally convinced that that would be an improvement.
For starters, one would presumably have to divide up maintenance_work_mem
per index, which would be a substantial penalty for some index types.
Also, you'd be creating more randomized I/O on the index-writing side
of the equation (for those index types that write the index during the
scan).
It might net out as a win anyway depending on context, but I don't
think it's as clear-cut as the OP seems to think.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, coelho@cri.ensmp.fr, michael@paquier.xyz
Subject: Re: BUG #15987: Improve REINDEX of all indexes of a table at once
In-Reply-To: <31841.1567352185@sss.pgh.pa.us>
References: <15987-7d85883d9674a15e@postgresql.org> <20190901043534.GA3190@paquier.xyz> <alpine.DEB.2.21.1909011143230.29429@lancre> <31841.1567352185@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox