> 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