On 19 November 2015 at 01:22, Greg Stark <stark@mit.edu> wrote:
Perhaps the right thing to do is report a statistic to pg_stats so DBAs can see how often sorts are in memory, how often they're on disk, and how often the on disk sort requires n passes. That would put them in the same category as "sequential scans" for DBAs that expect the application to only run index-based OLTP queries for example. The problem with this is that sorts are not tied to a particular relation and without something to group on the stat will be pretty hard to act on.
+1
We don't have a message appear when hash joins use go weird, and we definitely don't want anything like that for sorts either.
--
Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services