Re: Estimate maintenance_work_mem for CREATE INDEX

From: scott ribe <scott_ribe(at)elevated-dev(dot)com>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Estimate maintenance_work_mem for CREATE INDEX
Date: 2017-12-19 14:29:29
Message-ID: 76272163-2E25-4997-9D6F-983F0BBA5885@elevated-dev.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-hackers

> On Dec 19, 2017, at 7:14 AM, Greg Stark <stark(at)mit(dot)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. EXPLAIN ANALYZE might involve a whole table scan, or might involve more dense sampling.

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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Fabrízio de Royes Mello 2017-12-19 15:02:21 Re: Background worker process
Previous Message Greg Stark 2017-12-19 14:14:34 Re: Estimate maintenance_work_mem for CREATE INDEX

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksandr Parfenov 2017-12-19 14:31:09 Re: [HACKERS] Flexible configuration for full-text search
Previous Message Marina Polyakova 2017-12-19 14:22:29 Re: WIP Patch: Pgbench Serialization and deadlock errors