Re: Primary key gist index?
| От | Steven Lembark |
|---|---|
| Тема | Re: Primary key gist index? |
| Дата | |
| Msg-id | 20180314135234.55f60040@wrkhors.com обсуждение исходный текст |
| Ответ на | Re: Primary key gist index? (Paul Jungwirth <pj@illuminatedcomputing.com>) |
| Список | pgsql-general |
On Wed, 14 Mar 2018 11:28:59 -0700
Paul Jungwirth <pj@illuminatedcomputing.com> 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@wrkhors.com +1 888 359 3508
В списке pgsql-general по дате отправления: