Search Postgresql Archives

How to make PG use work_mem?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux