Re: [GENERAL] Deleting, indexes and transactions

2012-05-28 Thread Tom Lane
Adrian Klaver writes: > On 05/28/2012 08:46 AM, Stevo Slavić wrote: >> I guess in this case, referential action, from your quote, on deleting >> As is check that there are no Bs referencing to-be-deleted A row. But >> since all Bs are deleted (not committed yet though) prior to deleting >> As, I

Re: [GENERAL] Deleting, indexes and transactions

2012-05-28 Thread Adrian Klaver
On 05/28/2012 08:46 AM, Stevo Slavić wrote: Hello Adrian, Thanks for replying! I guess in this case, referential action, from your quote, on deleting As is check that there are no Bs referencing to-be-deleted A row. But since all Bs are deleted (not committed yet though) prior to deleting As, I

Re: [GENERAL] Deleting, indexes and transactions

2012-05-28 Thread Stevo Slavić
Hello Adrian, Thanks for replying! I guess in this case, referential action, from your quote, on deleting As is check that there are no Bs referencing to-be-deleted A row. But since all Bs are deleted (not committed yet though) prior to deleting As, I don't understand why is this check taking tha

Re: [GENERAL] Deleting, indexes and transactions

2012-05-28 Thread Adrian Klaver
On 05/28/2012 07:23 AM, Stevo Slavić wrote: Hello PostgreSQL community, Two tables, A and B, both with auto generated technical PK, A and B are in relationship via nullable non-unique FK a_fk column in B to A's PK. There are no other relationships involving table A. Lets say A has ~20k rows, and

[GENERAL] Deleting, indexes and transactions

2012-05-28 Thread Stevo Slavić
Hello PostgreSQL community, Two tables, A and B, both with auto generated technical PK, A and B are in relationship via nullable non-unique FK a_fk column in B to A's PK. There are no other relationships involving table A. Lets say A has ~20k rows, and B ~500k rows. When there is no index on a_fk