pg_dump performance lossage for primary keys

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: pg_dump performance lossage for primary keys
Date: 2001-04-03 18:33:33
Message-ID: 6553.986322813@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I notice that pg_dump now dumps primary-key indexes in the style

CREATE TABLE ... (
"dest_index" integer DEFAULT ...,
Constraint "dest_addresses_pkey" Primary Key ("dest_index")
);

...

COPY ... FROM stdin;
-- load data
\.

-- create other indexes for table

Isn't this pretty darn stupid? Previously, we created indexes after
loading the data. We're going to take a huge performance hit to do it
this way.

IMHO it would be better to reach in and set the "primary key" flag on
the index after creating it normally.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Warner 2001-04-03 19:18:32 Re: pg_dump performance lossage for primary keys
Previous Message Tom Lane 2001-04-03 18:17:05 Re: Final call for platform testing