Re: Why CASCADE constraint takes more time when table is loaded with huge records?
От | David Johnston |
---|---|
Тема | Re: Why CASCADE constraint takes more time when table is loaded with huge records? |
Дата | |
Msg-id | DC4A0E81-93BC-43CC-AE22-A941B6D119F7@yahoo.com обсуждение исходный текст |
Ответ на | Why CASCADE constraint takes more time when table is loaded with huge records? (Siva Palanisamy <siva_p@hcl.com>) |
Список | pgsql-general |
Hi ya,
As I had raised a question here at ‘Please recommend the best bulk-delete option’ (http://stackoverflow.com/questions/8172101/please-recommend-the-best-bulk-delete-option), CASCADE constraint is the one that prevents me to delete all the records in all the tables when they were loaded with bulk records. Is there any reason for why CASCADE takes time when DELETE FROM table1; Or TRUNCATE table1 CASCADE is attempted? FYI, I'm using PostgreSQL 8.1.4. Though outdated, when I remove CASCADE constraint in my table structures (listed in the top link), both DELETE and TRUNCATE queries work fine and completes quickly. However, CASCADE is what I needed! I can't just remove the constraint. Please help me on this.
Regards,
Siva.
В списке pgsql-general по дате отправления: