Re: constraint with reference to the same table
От | Victor Yegorov |
---|---|
Тема | Re: constraint with reference to the same table |
Дата | |
Msg-id | 20030515010341.GD1549@nordlb.lv обсуждение исходный текст |
Ответ на | Re: constraint with reference to the same table (Stephan Szabo <sszabo@megazone23.bigpanda.com>) |
Ответы |
Re: constraint with reference to the same table
|
Список | pgsql-performance |
* Stephan Szabo <sszabo@megazone23.bigpanda.com> [15.05.2003 03:54]: > > That can be a win, but if you're actually dropping and adding the > constraint again it may not be on large tables since it'll still do a > whole bunch of index lookups to check the existing rows when the alter > table add constraint happens. Disabling triggers and re-enabling them is > faster but breaks the guarantee of the constraint. You're right. I thought of big tables after posting the reply. My solution is suitable for my case, i.e. not so big tables. Returning to the very first question I asked. May be it is usefull to implicitly create index on foreign key columns? Actually, untill you had pointed on seq. scans, I thought Postgres is using internal indicies - don't ask me why. -- Victor Yegorov
В списке pgsql-performance по дате отправления: