From: Tom Lane <tgl@sss.pgh.pa.us>
To: Samuel Gendler <sgendler@ideasculptor.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: in-memory sorting
Date: Thu, 19 Aug 2010 09:29:39 -0400
Message-ID: <26184.1282224579@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTi=4U7m-PViREaJxAgXrjdvQ6juJmJEWkSfGSvZ6@mail.gmail.com>
References: <AANLkTikp=KrFmUSrs+z7BQvbFnuyM=0KjPRKA2EbxDKY@mail.gmail.com>
<AANLkTi=4U7m-PViREaJxAgXrjdvQ6juJmJEWkSfGSvZ6@mail.gmail.com>
Samuel Gendler <sgendler@ideasculptor.com> writes:
> Answered my own question. Cranking work_mem up to 350MB revealed that
> the in-memory sort requires more memory than the disk sort.
Yeah. The on-disk representation of sortable data is tighter than the
in-memory representation for various reasons, mostly that we're willing
to work at making it small. Datums aren't necessarily properly aligned
for example, and there's also palloc overhead to consider in-memory.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, sgendler@ideasculptor.com
Subject: Re: in-memory sorting
In-Reply-To: <26184.1282224579@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox