Search Postgresql Archives

Re: Primary key gist index?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 14 Mar 2018 11:28:59 -0700
Paul Jungwirth <pj@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:

> > EXCLUDE USING gist (id WITH =, as_of_date WITH &&)  

> null), but maybe there are other primary-key duties it doesn't meet, 
> like defining foreign keys that reference it. I've been on-and-off 

The PK does provide a unique index.
It may be worth adding and index on 

    id where ( upper as_of_date = infinity )

for faster searches of current id's (assuming, of course, that there
is an infinite value for upper of as_of_date).


You will also need a PK if the table is used in foreign key 
constraints -- the other table has to ref this table's PK.
-- 
Steven Lembark                                       1505 National Ave
Workhorse Computing                                 Rockford, IL 61103
lembark@xxxxxxxxxxx                                    +1 888 359 3508




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux