Re: Estimate maintenance_work_mem for CREATE INDEX - Mailing list pgsql-admin

From scott ribe
Subject Re: Estimate maintenance_work_mem for CREATE INDEX
Date
Msg-id 76272163-2E25-4997-9D6F-983F0BBA5885@elevated-dev.com
Whole thread Raw
In response to Re: Estimate maintenance_work_mem for CREATE INDEX  (Greg Stark <stark@mit.edu>)
List pgsql-admin
> On Dec 19, 2017, at 7:14 AM, Greg Stark <stark@mit.edu> wrote:
>
> I'm not clear how you would determine how much memory is needed to
> sort a table without actually doing the sort though. So that would be
> more of an EXPLAIN ANALYZE wouldn't it?

I'd think EXPLAIN could use a quite rough approximation, say based on a rather sparse random sampling of values.
EXPLAINANALYZE might involve a whole table scan, or might involve more dense sampling. 

--
Scott Ribe
https://www.linkedin.com/in/scottribe/
(303) 722-0567



pgsql-admin by date:

Previous
From: Greg Stark
Date:
Subject: Re: Estimate maintenance_work_mem for CREATE INDEX
Next
From: Fabrízio de Royes Mello
Date:
Subject: Re: Background worker process