On 31 Mar 2016 03:02, "bricklen" <bricklen@xxxxxxxxx> wrote: > Perhaps a partial index like "create index pa_sc_id_pidx on pa (sc_id) with (fillfactor=100) where field1 IS NULL;" will help? Thanks for the suggestion. It might, but the problem with that is there's (something like) field2-16 which are used in similar queries. I'll stick with enable_seqscan=off, it seems to be doing the trick; thanks though. Geoff -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general