pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: scott ribe <scott_ribe@elevated-dev.com>
To: Greg Stark <stark@mit.edu>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Estimate maintenance_work_mem for CREATE INDEX
Date: Tue, 19 Dec 2017 07:29:29 -0700
Message-ID: <76272163-2E25-4997-9D6F-983F0BBA5885@elevated-dev.com> (raw)
In-Reply-To: <CAM-w4HOOhfif6nao1GU9B-8rzb1vy5YGocW+XFy4HOQmupvZbw@mail.gmail.com>
References: <CACACo5QCnCotZgJaZj8ev92KpBnaS4TCTZzRLkoXZ=q5_n8A7A@mail.gmail.com>
	<CACACo5SbX3e90EYMfp+UDYm5Db1TaPU7crFoxnFFWhnQe=A2_Q@mail.gmail.com>
	<CAM-w4HOOhfif6nao1GU9B-8rzb1vy5YGocW+XFy4HOQmupvZbw@mail.gmail.com>

> 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. 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





view thread (6+ messages)  latest in thread

Message-ID: <76272163-2E25-4997-9D6F-983F0BBA5885@elevated-dev.com>
Permalink:  ../76272163-2E25-4997-9D6F-983F0BBA5885@elevated-dev.com/
Also on:    postgresql.org/message-id/76272163-2E25-4997-9D6F-983F0BBA5885@elevated-dev.com

 · 

reply

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-admin@postgresql.org
  Cc: scott_ribe@elevated-dev.com, stark@mit.edu, pgsql-admin@lists.postgresql.org
  Subject: Re: Estimate maintenance_work_mem for CREATE INDEX
  In-Reply-To: <76272163-2E25-4997-9D6F-983F0BBA5885@elevated-dev.com>

* 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