Re: Foreign key wierdness

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Foreign key wierdness
Дата
Msg-id 23829.1043267410@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Foreign key wierdness  ("Dave Page" <dpage@vale-housing.co.uk>)
Ответы Re: Foreign key wierdness  (Hannu Krosing <hannu@tm.ee>)
Re: Foreign key wierdness  (Didier Moens <moensd@xs4all.be>)
Список pgsql-hackers
Didier Moens <Didier.Moens@dmb001.rug.ac.be> writes:
> I did some extensive testing using PostgreSQL 7.3.1 (logs and results 
> available upon request), and the massive slowdown is NOT related to 
> qualified tablename syntax or (lack of) VACUUM ANALYZE, but to the 
> following change :

> pgAdminII 1.4.2 :
> -------------------
> CREATE TABLE articles (
>     article_id integer DEFAULT 
> nextval('"articles_article_id_key"'::text) NOT NULL,
> ...

> pgAdminII 1.4.12 :
> --------------------
> CREATE TABLE articles (
>     article_id bigint DEFAULT nextval('"articles_article_id_key"'::text) 
> NOT NULL,
> ...

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

> 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
...
        regards, tom lane


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

Предыдущее
От: "D. Hageman"
Дата:
Сообщение: Namespace/Table Visibility Behavior Issues
Следующее
От: Viacheslav N Tararin
Дата:
Сообщение: WIn32 port