How to make PG use work_mem?

Поиск
Список
Период
Сортировка
От Torsten Förtsch
Тема How to make PG use work_mem?
Дата
Msg-id 531EFE76.5080501@gmx.net
обсуждение исходный текст
Ответы Re: How to make PG use work_mem?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi,

I have a query that involves an external sort:

   ->  Sort  (cost=13662680.01..13850498.48 rows=75127389 width=16)
             (actual time=980098.397..1021411.862 rows=74181544 loops=1)
         Sort Key: (ROW(account_id, (purchase_time)::date))
         Sort Method: external merge  Disk: 3118088kB
         Buffers: shared hit=1568637 read=1327223,
                  temp read=389763 written=389763

What puzzles me is that this happens even when I set work_mem to 50GB in
the session.

Why does it still use the external merge?

The query runs on a streaming replica if that matters.

Torsten


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

Предыдущее
От: Albe Laurenz
Дата:
Сообщение: Re: Extracting data from the view to retrieve the foreign key is not declared
Следующее
От: "Aggarwal, Ajay"
Дата:
Сообщение: Re: replication timeout in pg_basebackup