Re: Unusual table size and very slow inserts

Поиск
Список
Период
Сортировка
От Greg Smith
Тема Re: Unusual table size and very slow inserts
Дата
Msg-id 4B692EDC.2010001@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Unusual table size and very slow inserts  (Ivano Luberti <luberti@archicoop.it>)
Список pgsql-general
Ivano Luberti wrote:
> This is what I was thinking , but today I was able to look at the
> processes running while a client was doing a bunc of inserts. There was
> no autovacuum running and every insert was taking many seconds to e
> executed.
>

Have you done any basic tuning of the database parameters?  From your
earlier message, it sounds like you might have checkpoint_segments at
its default, which can contribute to these inserts taking so long.  See
http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server for a
guide to where to start.

Also, if you want to get a better idea what's actually going on with
your data, you should be looking at "select * from pg_stat_user_tables"
; that will give you information about things like how many dead rows
there are in the table, when autovacuum last did some work, etc.  Should
be possible to figure out what's different about the use pattern of this
table compared to the ones you suggest work as expected by analyzing
that data.

P.S. To clean up from one of these messes you might try CLUSTER instead
of VACUUM FULL.

--
Greg Smith  2ndQuadrant US  Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com   www.2ndQuadrant.us


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

Предыдущее
От: Shoaib Mir
Дата:
Сообщение: Re: add column specify position
Следующее
От: Greg Stark
Дата:
Сообщение: Re: surprised by non-strict array_append