Which indexes to drop - Mailing list pgsql-novice

From John Taylor
Subject Which indexes to drop
Date
Msg-id 02061815035401.01632@splash.hq.jtresponse.co.uk
Whole thread Raw
Responses Re: Which indexes to drop
List pgsql-novice
Hi,

I'm optimising my data load by dropping indexes.

My question is, what do I do with the indexes created by postgres for primary keys ?

Is it OK to drop them ?
What will happen to the constraint checking ?

How do I create them again afterwards, so that they are used correctly for constraint checking ?

Say I have a table:

create table transmission (
  id serial not null,
  start timestamp not null default CURRENT_TIMESTAMP,
  stop timestamp,
  complete boolean not null default false,
  primary key(id,complete)
)

This will have an index:
  transmission_pkey

After data loading can I create it again as follows ?

CREATE INDEX transmission_pkey ON transmission(id,complete)


Thanks
JohnT

pgsql-novice by date:

Previous
From: Tony Griffiths
Date:
Subject: Client-side libraries for fmgr invocation
Next
From: John Taylor
Date:
Subject: What gets inherited