Re: Postgresql optimisation

Поиск
Список
Период
Сортировка
От Dave Dutcher
Тема Re: Postgresql optimisation
Дата
Msg-id D7EDFF73B48B43A6833B06DDE3D9C5E3@tridecap.com
обсуждение исходный текст
Ответ на Postgresql optimisation  (Denis BUCHER <dbucherml@hsolutions.ch>)
Ответы Re: Postgresql optimisation  (Matthew Wakeling <matthew@flymine.org>)
Список pgsql-performance
> -----Original Message-----
> From: Denis BUCHER
>
> And each morning huge tables are DELETED and all data is
> INSERTed new from a script. (Well, "huge" is very relative,
> it's only 400'000 records)

If you are deleting ALL rows in the tables, then I would suggest using
TRUNCATE instead of DELETE.  Truncate will be faster deleting and it will
not accumulate dead tuples.

Also if you switch to truncate then you should ANALYSE the tables after you
finish inserting.  Note that VACUUM ANALYSE is not necessary after a
truncate/insert because there should be no dead tuples to vacuum.

Dave




В списке pgsql-performance по дате отправления:

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: Postgresql optimisation
Следующее
От: Matthew Wakeling
Дата:
Сообщение: Re: Postgresql optimisation