Re: Foreign key wierdness

Поиск
Список
Период
Сортировка
От Didier Moens
Тема Re: Foreign key wierdness
Дата
Msg-id 3E2F1AD7.8080101@xs4all.be
обсуждение исходный текст
Ответ на Re: Foreign key wierdness  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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 
http://archives.postgresql.org/pgsql-sql/2001-05/msg00395.php .


>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 ...  :)


Regards,
Didier

-- 

Didier Moens
-----
RUG/VIB - Dept. Molecular Biomedical Research - Core IT
tel ++32(9)2645309 fax ++32(9)2645348
http://www.dmb.rug.ac.be




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Antonio Scotti
Дата:
Сообщение: On Commit Triggers
Следующее
От: Didier Moens
Дата:
Сообщение: Re: Foreign key wierdness