[mb-devel] Why create the constraints after table creation?

Matthias Friedrich matt at mafr.de
Sun Oct 22 09:28:42 UTC 2006


On Saturday, 2006-10-21, Matt Perry wrote:
> I'm taking my first stroll through the mb_server source and I noticed
> something odd with the SQL.  Why are the tables being created and then
> the constraints and primary keys added afterwards in other files?  Was
> there a practical reason for this as opposed to adding those as part
> of the create table statement?

Inserting data from a snapshot takes much more time with enabled
constraints than without.

Cheers,
	Matthias



More information about the MusicBrainz-devel mailing list