|
|
 | | From: | Keith Worthington | | Subject: | Primary keys and indexes | | Date: | Fri, 21 Jan 2005 15:54:36 -0500 |
|
|
 | Hi All,
Does building a primary key constraint automatically generate an index? Using pgadmin I cannot see it if it does. Should I explicitly build indexes on primary keys? Wouldn't building a unique index on the same columns as the primary key be redundent? Your guidance is appreciated.
Kind Regards, Keith
______________________________________________ 99main Internet Services http://www.99main.com
---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings
|
|
 | | From: | Bruno Wolff III | | Subject: | Re: Primary keys and indexes | | Date: | Fri, 21 Jan 2005 15:20:09 -0600 |
|
|
 | On Fri, Jan 21, 2005 at 15:54:36 -0500, Keith Worthington wrote: > Hi All, > > Does building a primary key constraint automatically generate an index? Using > pgadmin I cannot see it if it does. Should I explicitly build indexes on > primary keys? Wouldn't building a unique index on the same columns as the > primary key be redundent? Your guidance is appreciated.
Yes, when you declare a primary (or unique) key a unique index over the columns of the key is created.
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
|
|
|