Re: index problems (again) - Mailing list pgsql-general

From Jeff Janes
Subject Re: index problems (again)
Date
Msg-id CAMkU=1wmuTYGqhfrZseUYcGc6vftZJqo_BaNZWS1GSaw6aWCNQ@mail.gmail.com
Whole thread Raw
In response to Re: index problems (again)  (Geoff Winkless <pgsqladmin@geoff.dj>)
List pgsql-general
On Mon, Mar 7, 2016 at 8:37 AM, Geoff Winkless <pgsqladmin@geoff.dj> wrote:
>
> 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.

If relallvisible is zero, it thinks it gets zero benefit from an index
only scan.  It thinks that using a larger index has a small, but
non-zero, cost over the smaller index.

> We can see that by the massive speedup I get by
> using index(scid,scdate), which in all other respects is going to
> suffer from exactly the same problem from that the scid-only index
> suffers.

What massive speedup?  (scid,scdate) is the index it *does* use in
your worse demonstrated
case.


pgsql-general by date:

Previous
From: Jeff Janes
Date:
Subject: Re: index problems (again)
Next
From: Jeff Janes
Date:
Subject: Re: index problems (again)