Re: on cascade delete performances, transaction and set constraints deferred
| От | Ivan Sergio Borgonovo |
|---|---|
| Тема | Re: on cascade delete performances, transaction and set constraints deferred |
| Дата | |
| Msg-id | 20080818215139.484369c9@dawn.webthatworks.it обсуждение исходный текст |
| Ответ на | Re: on cascade delete performances, transaction and set constraints deferred (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-general |
On Mon, 18 Aug 2008 15:16:01 -0400 Tom Lane <tgl@sss.pgh.pa.us> wrote: > Ivan Sergio Borgonovo <mail@webthatworks.it> writes: > > I'm not sure what's really happening but why apparently the > > delete statements get executed before the 2 inserts even if > > constraints are deferred? > > You didn't mark the FK constraints as deferrable --- I'm pretty > sure the default is NOT DEFERRABLE. My fault. I don't know how did I succeeded to read that the default was DEFERRABLE while it is clearly stated it is not. I can't see a direct way to add DEFERRABLE to an already existing constraint. Is dropping and adding the only path? > > Why does it take so long? > > Indexes on the FK columns would probably help. There is one actually. I'll post another email with a more sensible subject to ask more advices on this, if google doesn't help me first. Thanks. -- Ivan Sergio Borgonovo http://www.webthatworks.it
В списке pgsql-general по дате отправления: