Replace Old Table with New
От | David Lebling |
---|---|
Тема | Replace Old Table with New |
Дата | |
Msg-id | 031001c1414d$da36db80$0201010a@myserver.net обсуждение исходный текст |
Ответы |
Re: Replace Old Table with New
|
Список | pgsql-novice |
I have a set of tables that periodically need to be thrown away and completely rebuilt with new data. I'm using JDBC to interact with PostgreSQL. Is there a straightforward and efficient way to do this? I tried using the commit/rollback methods in JDBC but blew Java memory out of the water (these are decent-sized but not enormous datasets: 60,000 records more or less). I investigated using 'alter table ... rename to ...' but it didn't seem to also rename the associated indexes, and before actually implementing code to do it I want to ask if that would actually work. (If it did it would be the best way to go, as I have plenty of disk space available for an extra temp copy of the database). The tables are very simple, with primary keys and in one case a supplemental additional index. Any advice would be appreciated. Dave Lebling Ucentric Systems, LLC
В списке pgsql-novice по дате отправления: