Insert performance for large transaction with multiple COPY FROM

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Insert performance for large transaction with multiple COPY FROM
Дата
Msg-id CAMkU=1zx2MXdT+za1PokYc5SZEe4j=qaHG8GuG=13UOQ3oRScQ@mail.gmail.com
обсуждение исходный текст
Ответ на Insert performance for large transaction with multiple COPY FROM  (Horst Dehmer <horst.dehmer@gmail.com>)
Ответы Re: Insert performance for large transaction with multiple COPY FROM
Список pgsql-performance
On Friday, January 11, 2013, Horst Dehmer wrote:

Except - and that's the wall I'm hitting - for one table which yielded just 75 records/second.
The main 'problem' seem to be the FK constraints. Dropping just them restored insert performance for this table to 6k records/s.

It sure sounds like you don't have enough RAM to hold the foreign-key table data needed to check the constraints, so every insert needs one disk revolution to fetch the data.

If you drop the indexes and constraints one at a time until it speeds up, is there a certain one that is the culprit? 

You can look in pg_statio_user_tables to see what tables and indexes have high io being driven by the bulk loading.

Use "top" to see of the server is mostly IO bound or CPU bound.

Cheers,

Jeff

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

Предыдущее
От: Horst Dehmer
Дата:
Сообщение: Insert performance for large transaction with multiple COPY FROM
Следующее
От: Claudio Freire
Дата:
Сообщение: Re: Insert performance for large transaction with multiple COPY FROM