On 7 March 2016 at 20:23, Jeff Janes <jeff.janes@xxxxxxxxx> 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 -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general