Re: Invalid indexes should not consume update overhead - Mailing list pgsql-bugs

From Rader, David
Subject Re: Invalid indexes should not consume update overhead
Date
Msg-id CAABt7R7WcB1wHhe_RgFLjBNFkWREumMyBTQUaLFo_5_LQ3ft_g@mail.gmail.com
Whole thread Raw
In response to Re: Invalid indexes should not consume update overhead  (Peter Geoghegan <pg@heroku.com>)
Responses Re: Invalid indexes should not consume update overhead
Re: Invalid indexes should not consume update overhead
List pgsql-bugs
On Sunday, July 17, 2016, Peter Geoghegan <pg@heroku.com> wrote:

> On Sun, Jul 17, 2016 at 4:41 AM, Tomasz Ostrowski
> <tometzky+pg@ato.waw.pl <javascript:;>> wrote:
> > That wouldn't solve my problem, which is that I need a way to disable
> > indexes before large update. I believe (but I'm not sure) that Oracle has
> > this concept:
> >         ALTER INDEX [INDEX_NAME] UNUSABLE;
>
> I think that this must make the index unusable to the optimizer. The
> idea being that you can see the impact of dropping the index without
> actually doing so, reserving the ability to back out (mark the index
> usable once more rather than actually dropping it) if it turns out
> that the index is of some use.
>
> If it simply made the index unusable while removing any ongoing
> obligation for writes to maintain the index, then what's the point in
> supporting this at all? You need to be able to mark it usable again.
>
> --
> Peter Geoghegan


For example, in SQL Server you can "alter index disable". If you are about
to do a lot of bulk operations. But there is no "re-enable"; instead you
have to "alter index rebuild" because as has been said on this thread you
don't know what has changed since the disable.

Basically this is very similar to dropping and recreating indexes around
bulk loads/updates.




>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org <javascript:;>
> )
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
>


--
--
David Rader
davidr@openscg.com

pgsql-bugs by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Invalid indexes should not consume update overhead
Next
From: Peter Geoghegan
Date:
Subject: Re: Invalid indexes should not consume update overhead