Skip site navigation (1) Skip section navigation (2)

Re: suggestion

From: Lukas Smith <smith(at)pooteeweet(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: suggestion
Date: 2006-02-24 07:25:44
Message-ID: dtmcdm$3kd$ (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Tom Lane wrote:

> worse --- in the first place there are severe performance issues
> associated with unindexed foreign-key checks, and in the second place
> there is the foot-gun problem that you might forget to re-add the
> indexes at all.

MySQL has a syntax in ALTER TABLE similar to PGSQL's DISABLE/ENABLE 
TRIGGER to do the same for KEYS. That way you will not run the risk of 
forgetting the INDEX (though you could still forget to enable them).

Potentially there could be a switch in pg_restore to create all KEYS as 
disabled initially and automatically enable them after the import is 
complete. Note that it could be smart enough to give special treatment 
to foreign keys.


In response to

pgsql-hackers by date

Next:From: Simon RiggsDate: 2006-02-24 08:48:31
Subject: Re: memory context for tuplesort return values
Previous:From: Michael GlaesemannDate: 2006-02-24 07:24:15
Subject: Re: PostgreSQL unit tests

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group