Fast deletes
От | Jason Hihn |
---|---|
Тема | Fast deletes |
Дата | |
Msg-id | NGBBLHANMLKMHPDGJGAPCEGECMAA.jhihn@paytimepayroll.com обсуждение исходный текст |
Ответы |
Re: Fast deletes
Re: Fast deletes |
Список | pgsql-novice |
I'm looking for a fast way to completely clear a table that does not involve dropping it. Essentially, I want the table to get empty quick. I can understand why DELETE can be much slower than a drop and recreate of the table, however none of those reasons apply here. There are no cascades on the tables I wish to drop, and the table clearing happens w.r.t. keys. That is to say, I clear out the leaf tables first and work up the stem, whenever there are dependencies. I was hoping there would be something like a truncate command that would just rest the table blindly. Is there such a way? I don't like the drop table idea because if the file for the schema isn't available (offline disk or something) then I'd be fubar. Currently, it takes several minutes (10+) to of empty one of my biggest 3 tables, and the entire time postmaster is pegged at 99.8% CPU. (90% of that is "system"). The machine isn't using any swap memory either... Thanks, Jason Hihn
В списке pgsql-novice по дате отправления: