Thread: Implicit btree index from unique constraint versus explicit btree index

Implicit btree index from unique constraint versus explicit btree index

From
"David Monarchi"
Date:
Hello -

PG v8.2

I have a number of fields in tables with a unique constraint defined on them resulting in the creation of an implicit btree index on the field.

Does PG use this implicit index in answering queries in the same manner as an explicit index, or do I have to create an explicit index in addition to the implicit one?

Thank you.

David

Re: Implicit btree index from unique constraint versus explicit btree index

From
Michael Glaesemann
Date:
On Oct 2, 2007, at 17:34 , David Monarchi wrote:

> Does PG use this implicit index in answering queries in the same
> manner as an explicit index,

Yes. The only thing implicit about the index is its creation.

Michael Glaesemann
grzm seespotcode net



Re: Implicit btree index from unique constraint versus explicit btree index

From
Michael Glaesemann
Date:
On Oct 2, 2007, at 18:01 , Michael Glaesemann wrote:

>
> On Oct 2, 2007, at 17:34 , David Monarchi wrote:
>
>> Does PG use this implicit index in answering queries in the same
>> manner as an explicit index,
>
> Yes. The only thing implicit about the index is its creation.

And its destruction, if the table it indexes is dropped

Michael Glaesemann
grzm seespotcode net

PS ...and the lamp, and that's all that's implicit.