Re: index problems (again)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Geoff Winkless <pgsqladmin(at)geoff(dot)dj>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: index problems (again)
Date: 2016-03-07 16:44:38
Message-ID: 1685.1457369078@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Geoff Winkless <pgsqladmin(at)geoff(dot)dj> writes:
> But as far as I can see, apart from the absolute extremes, the
> index-only scan is _always_ going to be quicker than the index+table
> scan.

Well, that is a different issue: what does the planner think of an
index-only scan as compared to a regular index scan. I suspect that
it's pricing the IOS very high because a lot of the table is dirty
and therefore will have to be visited even in a nominally index-only
scan. You might check whether the plan choice changes immediately
after a VACUUM of the table.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Karsten Hilbert 2016-03-07 17:17:17 pg_restore man page question
Previous Message Geoff Winkless 2016-03-07 16:37:37 Re: index problems (again)