From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | Geoff Winkless <pgsqladmin(at)geoff(dot)dj> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: index problems (again) |
Date: | 2016-03-07 20:31:02 |
Message-ID: | CAMkU=1wmuTYGqhfrZseUYcGc6vftZJqo_BaNZWS1GSaw6aWCNQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Mar 7, 2016 at 8:37 AM, Geoff Winkless <pgsqladmin(at)geoff(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Janes | 2016-03-07 20:37:54 | Re: index problems (again) |
Previous Message | Jeff Janes | 2016-03-07 20:23:12 | Re: index problems (again) |