Hi,
Can anybody tell me, what is this means..
this is i am getting when i am adding primary key
NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "tablename_pkey" for table "tablename"
Thanks
Postgres Primary Key
Moderator: General Moderators
- CoderGoblin
- DevNet Resident
- Posts: 1425
- Joined: Tue Mar 16, 2004 10:03 am
- Location: Aachen, Germany
Indexes are primarily used to enhance database performance (though inappropriate use will result in slower performance).
As primary keys are unique and do not depend on other tables they can speed up query access to the table by having the index in place hence they are automatically added. You can also add additional indexes with the "CREATE INDEX" command (See http://www.postgresql.org/docs/7.4/inte ... index.html).
Too many or incorrectly indexed columns can degrade performance.
It is customary to run a "Vacuum analyse" on the database at regular intervals (cron job) to tidy up the indexes.
This sort of detail should be covered anywhere dealing with database management but at the moment I cannot point you to a specific reference point.
As primary keys are unique and do not depend on other tables they can speed up query access to the table by having the index in place hence they are automatically added. You can also add additional indexes with the "CREATE INDEX" command (See http://www.postgresql.org/docs/7.4/inte ... index.html).
Too many or incorrectly indexed columns can degrade performance.
It is customary to run a "Vacuum analyse" on the database at regular intervals (cron job) to tidy up the indexes.
This sort of detail should be covered anywhere dealing with database management but at the moment I cannot point you to a specific reference point.