pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jacob Bunk Nielsen <jacob@bunk.cc>
To: pgsql-general@lists.postgresql.org
Subject: Re: Rearchitecting for storage
Date: Fri, 19 Jul 2019 19:39:16 +0200
Message-ID: <87blxpgbzv.fsf@paven.bunk.cc> (raw)
In-Reply-To: <CAAiTEH8_VhMMD1pFu85qtsjUgXQYMxb2JW2aFLzL2j5J1Y=bhw@mail.gmail.com>
References: <CAAiTEH-442wghJmt=Yw2bnUvxNW-nwTMoFLqgLrTZ1CmZxiZJA@mail.gmail.com>
	<20190718173424.GB25488@aart.rice.edu>
	<CAAiTEH_VY_hPVBFNrkdD4YHHst5WJff9=gCt2cE3B0xeFV_2Hg@mail.gmail.com>
	<A853620E-A179-49A5-B079-B7EF01F2802D@gmail.com>
	<CAAiTEH8_VhMMD1pFu85qtsjUgXQYMxb2JW2aFLzL2j5J1Y=bhw@mail.gmail.com>

Matthew Pounsett <matt@conundrum.com> writes:
> On Thu, 18 Jul 2019 at 19:53, Rob Sargent <robjsargent@gmail.com> wrote:
>
>  Can you afford to drop and re-create those 6 indices?
>
> Technically, yes. I don't see any reason we'd be prevented from doing that. But, rebuilding them will take a long time. That's a lot of downtime to incur any time we update
> the DB. I'd prefer to avoid it if I can. For scale, the recent 'reindex database' that failed ran for nine days before it ran out of room, and that was in single-user. Trying to do
> that concurrently would take a lot longer, I imagine.

This may be a stupid question, but are you certain they are all used? It
wouldn't be the first time that I've seen someone create indexes and
then never use them. This script can tell you if there are any indexes
that seems largely unused.

https://github.com/pgexperts/pgx_scripts/blob/master/indexes/unused_indexes.sql

If you can run your application without access to the indexes for a
while you can create them concurrently in the background using "CREATE
INDEX CONCURRENTLY ...".

Best regards,
Jacob






view thread (19+ messages)  latest in thread

Message-ID: <87blxpgbzv.fsf@paven.bunk.cc>
Permalink:  ../87blxpgbzv.fsf@paven.bunk.cc/
Also on:    postgresql.org/message-id/87blxpgbzv.fsf@paven.bunk.cc

 · 

reply

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-general@postgresql.org
  Cc: jacob@bunk.cc
  Subject: Re: Rearchitecting for storage
  In-Reply-To: <87blxpgbzv.fsf@paven.bunk.cc>
  References: <CAAiTEH-442wghJmt=Yw2bnUvxNW-nwTMoFLqgLrTZ1CmZxiZJA@mail.gmail.com> <20190718173424.GB25488@aart.rice.edu> <CAAiTEH_VY_hPVBFNrkdD4YHHst5WJff9=gCt2cE3B0xeFV_2Hg@mail.gmail.com> <A853620E-A179-49A5-B079-B7EF01F2802D@gmail.com> <CAAiTEH8_VhMMD1pFu85qtsjUgXQYMxb2JW2aFLzL2j5J1Y=bhw@mail.gmail.com> <87blxpgbzv.fsf@paven.bunk.cc>

* 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