Re: Database size Vs performance degradation
От | Craig James |
---|---|
Тема | Re: Database size Vs performance degradation |
Дата | |
Msg-id | 48908988.7020204@emolecules.com обсуждение исходный текст |
Ответ на | Re: Database size Vs performance degradation ("Dave North" <DNorth@signiant.com>) |
Ответы |
Re: Database size Vs performance degradation
|
Список | pgsql-performance |
Dave North wrote: > Thank you for the suggestion..much appreciated. Alas, I don't think > this will be possible without a change to the application but it's a > good idea nonetheless. I assume you mean the "create table as select ..." suggestion (don't forget to include a little quoted material so we'llknow what you are replying to :-) You don't have to change the application. One of the great advantages of Postgres is that even table creation, droppingand renaming are transactional. So you can do the select / drop / rename as a transaction by an external app, andyour main application will be none the wiser. In pseudo-SQL: begin create table new_table as (select * from old_table); create index ... on new_table ... (as needed) drop table old_table alter table new_table rename to old_table commit You should be able to just execute this by hand on a running system, and see if some of your bloat goes away. Craig
В списке pgsql-performance по дате отправления: