On Mon, Jun 12, 2017 at 8:17 PM, Justin Pryzby <pry...@telsasoft.com> wrote:
> I know PG 10 will have support "CREATE STATISTICS.." for this.. > > ..but I wondered if there's a recommended workaround in earlier versions ? > Not without seeing the query.... > > 2) memory explosion in hash join (due to poor estimate?) caused OOM. > As far as I know, the only way a hash join should do this is if the join includes a huge number of rows with exactly the same 32 bit hash codes. Otherwise, it should spill to disk without causing OOM. Hash aggregates, on the other hand, are a different matter. Cheers, Jeff