Dear Tom, Dave,

Tom Lane wrote:

Ah-hah, and I'll bet that the column being linked to this one by the
foreign key constraint is still an integer?

It sure is ; being a PostgreSQL novice (BTW : many thanks to the whole of the PG development team for such an excellent product), I got on this track by means of .

With two tables each containing some 20.000 entries, the fk creation time between both of them increases from ~ 1.8 secs to ~ 221 secs.

Seems odd that the cost would get *that* much worse. Maybe we need to
look at whether the FK checking queries need to include explicit casts

Well, I reproduced the slowdown with some 20 to 30 different tables.
Anyway, glad I could be of some help, albeit only by testing some (probably quite meaningless) border cases ... :)



Didier Moens
RUG/VIB - Dept. Molecular Biomedical Research - Core IT
tel ++32(9)2645309 fax ++32(9)2645348

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to