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

From Geoff Winkless
Subject Re: index problems (again)
Date
Msg-id CAEzk6fc+RW0p83ubKWnD=uH309TK0MNQu9cqQrQwCnM5S=58hw@mail.gmail.com
Whole thread Raw
In response to Re: index problems (again)  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-general
On 7 March 2016 at 20:23, Jeff Janes <jeff.janes@gmail.com> wrote:
> PostgreSQL does not (yet) implement "loose" index scans or "skip
> scans", which is what you are asking for.  You can roll your own using
> the techniques described here:
> https://wiki.postgresql.org/wiki/Loose_indexscan, which has the
> benefit over your example code in that you don't need to enumerate all
> possible values, it effectively does it for you.

Uh huh. This is obviously where my expectation is wrong, thanks. It
certainly makes it more obvious why (sc_id,scdate) is more attractive
to the planner than (scdate,sc_id) and why the index that was
transferred from the Other Database that we've migrated from isn't
useful here :)

Geoff


pgsql-general by date:

Previous
From: "Peter J. Holzer"
Date:
Subject: Re: index problems (again)
Next
From:
Date:
Subject: Re: Does a call to a language handler provide a context/session, and somewhere to keep session data?