Re: PATCH: index-only scans with partial indexes

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, kgrittn(at)ymail(dot)com, Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: index-only scans with partial indexes
Date: 2016-01-31 22:11:38
Message-ID: 20160131221138.GA55127@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Konstantin Knizhnik wrote:
> I am very interested in this patch because it allows to use partial indexes to ... speed up inserts.
> I have implemented "ALTER INDEX ... WHERE ..." construction which allows to change predicate of partial index without necessity to fully rebuild it.
> So it is not necessary to insert new records in index immediately (if new records do not match partial index conditions).
> It can be done later in background (or at night). My experiments show that it allows to increase insert speed five times (for either partial indexes).
> At the same time we do not loose RDBMS requirement that result of query should not depend on presence of indexes. And it is applicable to all indexes: B-Tree, GIN, GIST,...
>
> But such optimization makes sense only of partial indexes can be used without extra overhead, first of all for index-only scans.
> And it is impossible without this patch.

That sounds interesting. So please review this patch and let us know
whether you like it, or whether you have any better ideas for any
particular hunk, or whether you think it should be rewritten from
scratch, or just state that it is perfect. If you think it's useful,
then it's a good idea to vouch for it to be integrated; and one way of
doing that is making sure it meets the quality standards etc. If you
don't say anything about the patch, we may never integrate it because we
might have doubts about whether it's worthy.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2016-01-31 22:19:41 Re: PostgreSQL Audit Extension
Previous Message Jan Wieck 2016-01-31 21:26:50 Re: WAL Re-Writes