pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Foreign key constraints compile faster in 7.4
2+ messages / 2 participants
[nested] [flat]

* Foreign key constraints compile faster in 7.4
@ 2005-05-03 15:11  Ashish Arte <ashish@openskysoftware.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Ashish Arte @ 2005-05-03 15:11 UTC (permalink / raw)
  To: pgsql-performance

Hello Everybody,

We recently upgraded to Postgres 7.4 from 7.3.9 and noticed that the
foreign key constraints compile noticeably faster. In 7.3 the
constraints would typically take more than an hour to run on our
production data. Now they take a minute or two.

Can anybody explain such a major performance improvement ?

Thanks

-- 
Ashish Arte
Open Sky Software




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Foreign key constraints compile faster in 7.4
@ 2005-05-03 15:59  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Ashish Arte <ashish@openskysoftware.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2005-05-03 15:59 UTC (permalink / raw)
  To: ashish@openskysoftware.com; +Cc: pgsql-performance

Ashish Arte <ashish@openskysoftware.com> writes:
> We recently upgraded to Postgres 7.4 from 7.3.9 and noticed that the
> foreign key constraints compile noticeably faster. In 7.3 the
> constraints would typically take more than an hour to run on our
> production data. Now they take a minute or two.

> Can anybody explain such a major performance improvement ?

Hey, we do do some work on this thing from time to time ;-)

Probably you are talking about this:

2003-10-06 12:38  tgl

	* src/: backend/commands/tablecmds.c,
	backend/utils/adt/ri_triggers.c, include/commands/trigger.h: During
	ALTER TABLE ADD FOREIGN KEY, try to check the existing rows using a
	single LEFT JOIN query instead of firing the check trigger for each
	row individually.  Stephan Szabo, with some kibitzing from Tom Lane
	and Jan Wieck.


			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-05-03 15:59 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-05-03 15:11 Foreign key constraints compile faster in 7.4 Ashish Arte <ashish@openskysoftware.com>
2005-05-03 15:59 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox