Re: DELETE takes too much memory

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: DELETE takes too much memory
Дата
Msg-id 20160704170458.GA425951@alvherre.pgsql
обсуждение исходный текст
Ответ на DELETE takes too much memory  (Kouber Saparev <kouber@gmail.com>)
Ответы Re: DELETE takes too much memory
Список pgsql-performance
Kouber Saparev wrote:
> I tried to DELETE about 7 million rows at once, and the query went up to
> 15% of the RAM (120 GB in total), which pushed some indexes out and the
> server load went up to 250, so I had to kill the query.
>
> The involved table does not have neither foreign keys referring to other
> tables, nor other tables refer to it. The size of the table itself is 19 GB
> (15% of 120 GB). So why the DELETE tried to put the entire table in memory,
> or what did it do to take so much memory?

Are there triggers in the table?  Deferred triggers in particular can
use memory.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Kouber Saparev
Дата:
Сообщение: DELETE takes too much memory
Следующее
От: Kouber Saparev
Дата:
Сообщение: Re: DELETE takes too much memory