Re: Growing Database Size
От | Jim C. Nasby |
---|---|
Тема | Re: Growing Database Size |
Дата | |
Msg-id | 20030616060158.GB40542@flake.decibel.org обсуждение исходный текст |
Ответ на | Re: Growing Database Size ("Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>) |
Ответы |
Re: Growing Database Size
|
Список | pgsql-general |
On Sun, Jun 15, 2003 at 04:05:59PM +0530, Shridhar Daithankar wrote: > On 14 Jun 2003 at 13:50, Kenneth Godee wrote: > How about > > begin > drop table a; > drop table b; > create table a; > create table b; > copy -> table a; > copy ->table b; > commit; > vacuum analyze; > > I can almost bet that this would be faster than solution above as it would not > churn the disk as much, put simply. > > Hmm..Just wondering, will truncate in above steps would do the same job? Yes, truncate table would do the same job and more importantly, wouldn't go mucking about in the catalog tables. Assuming it's available in 7.2, you should absolutely use truncate instead of drop/create (man I wish more databases supported truncate). -- Jim C. Nasby (aka Decibel!) jim@nasby.net Member: Triangle Fraternity, Sports Car Club of America Give your computer some brain candy! www.distributed.net Team #1828 Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" FreeBSD: "Are you guys coming, or what?"
В списке pgsql-general по дате отправления: