Re: [PERFORM] encouraging index-only scans

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Jim Nasby <jim(at)nasby(dot)net>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Peter Geoghegan <peter(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PERFORM] encouraging index-only scans
Date: 2014-02-11 18:41:46
Message-ID: 20140211184146.GG2289@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

On Tue, Feb 11, 2014 at 07:31:03PM +0100, Andres Freund wrote:
> On 2014-02-11 13:23:19 -0500, Bruce Momjian wrote:
> > On Tue, Feb 11, 2014 at 06:54:10PM +0100, Andres Freund wrote:
> > > On 2014-02-11 12:12:13 -0500, Bruce Momjian wrote:
> > > > Yes, that pretty much sums it up. We introduced index-only scans in 9.2
> > > > (2012) but they still seem to be not usable for insert-only workloads
> > > > two years later. Based on current progress, it doesn't look like this
> > > > will be corrected until 9.5 (2015). I am kind of confused why this has
> > > > not generated more urgency.
> > >
> > > I think this largely FUD. They are hugely beneficial in some scenarios
> > > and less so in others. Just like lots of other features we have.
> >
> > I don't understand. Index-only scans are known to have benefits --- if
> > an insert-only workload can't use that, why is that acceptable? What is
> > fear-uncertainty-and-doubt about that? Please explain.
>
> Uh, for one, insert only workloads certainly aren't the majority of
> usecases. Ergo there are plenty of cases where index only scans work out
> of the box.

True.

> Also, they *do* work for insert only workloads, you just either have to
> wait longer, or manually trigger VACUUMs. That's a far cry from not

Wait longer for what? Anti-xid-wraparound vacuum?

> being usable.

Is using VACUUM for these cases documented? Should it be?

> I am not saying it shouldn't be improved, I just don't see the point of
> bringing it up while everyone is busy with the last CF and claiming it
> is unusable and that stating that it is surprisising that nobody really
> cares.

Well, I brought it up in September too. My point was not that it is a
new issue but that it has been such an ignored issue for two years. I
am not asking for a fix, but right now we don't even have a plan on how
to improve this.

I still don't see how this is FUD, and you have not explained it to me.
This is a known limitation for two years, not documented (?), and with
no TODO item and no plan on how to improve it. Do you want to declare
such cases FUD and just ignore them? I don't see how that moves us
forward.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-02-11 18:42:59 Re: narwhal and PGDLLIMPORT
Previous Message Andres Freund 2014-02-11 18:39:31 unitialized data in populate_record_worker

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2014-02-11 18:54:48 Re: [PERFORM] encouraging index-only scans
Previous Message Andres Freund 2014-02-11 18:31:03 Re: [PERFORM] encouraging index-only scans