Re: Indexes on individual columns of composite primary key - Mailing list pgsql-general

From Matthew Walden
Subject Re: Indexes on individual columns of composite primary key
Date
Msg-id AANLkTikSeBK9Nehdo06O0o=ujCirYcFCthGSCDx=E0yJ@mail.gmail.com
Whole thread Raw
In response to Re: Indexes on individual columns of composite primary key  (Dann Corbit <DCorbit@connx.com>)
List pgsql-general
"Apparently (after reading the documentation link provided by Tom) there can be value to indexes when accessed with leading columns missing".

That is a new one on me too - interesting.

I suppose it comes down to testing at the end of the day - if you "set enable_seqscan to false" and "EXPLAIN ANALYSE" your query then you will see whether the indexes you create are used.  Whether they are useful will require you to set enable_seqscan back to true and see whether the optimizer chooses to use them (but that will change as your data does).

pgsql-general by date:

Previous
From: "Gauthier, Dave"
Date:
Subject: v9 deployment advise
Next
From: Matthew Walden
Date:
Subject: Re: Expected frequency of auto_vacuum activity