postgresql/src/include/executor
Jeff Davis 3a232a3183 HashAgg: use better cardinality estimate for recursive spilling.
Use HyperLogLog to estimate the group cardinality in a spilled
partition. This estimate is used to choose the number of partitions if
we recurse.

The previous behavior was to use the number of tuples in a spilled
partition as the estimate for the number of groups, which lead to
overpartitioning. That could cause the number of batches to be much
higher than expected (with each batch being very small), which made it
harder to interpret EXPLAIN ANALYZE results.

Reviewed-by: Peter Geoghegan
Discussion: https://postgr.es/m/a856635f9284bc36f7a77d02f47bbb6aaf7b59b3.camel@j-davis.com
Backpatch-through: 13
2020-07-28 23:17:23 -07:00
..
execdebug.h Implement Incremental Sort 2020-04-06 21:35:10 +02:00
execdesc.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
execExpr.h Extend ExecBuildAggTrans() to support a NULL pointer check. 2020-03-04 17:29:18 -08:00
execParallel.h Add infrastructure to track WAL usage. 2020-04-04 10:02:08 +05:30
execPartition.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
executor.h Fix LookupTupleHashEntryHash() pipeline-stall issue. 2020-07-26 16:08:41 -07:00
functions.h Improve the handling of result type coercions in SQL functions. 2020-01-08 11:07:59 -05:00
hashjoin.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
instrument.h Change the display of WAL usage statistics in Explain. 2020-05-05 08:00:53 +05:30
nodeAgg.h HashAgg: use better cardinality estimate for recursive spilling. 2020-07-28 23:17:23 -07:00
nodeAppend.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeBitmapAnd.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeBitmapHeapscan.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeBitmapIndexscan.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeBitmapOr.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeCtescan.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeCustom.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeForeignscan.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeFunctionscan.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeGather.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeGatherMerge.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeGroup.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeHash.h Make EXPLAIN report maximum hashtable usage across multiple rescans. 2020-04-11 12:39:19 -04:00
nodeHashjoin.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeIncrementalSort.h Implement Incremental Sort 2020-04-06 21:35:10 +02:00
nodeIndexonlyscan.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeIndexscan.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeLimit.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeLockRows.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeMaterial.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeMergeAppend.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeMergejoin.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeModifyTable.h Optimize update of tables with generated columns 2020-02-17 15:20:58 +01:00
nodeNamedtuplestorescan.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeNestloop.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeProjectSet.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeRecursiveunion.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeResult.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeSamplescan.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeSeqscan.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeSetOp.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeSort.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeSubplan.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeSubqueryscan.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeTableFuncscan.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeTidscan.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeUnique.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeValuesscan.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeWindowAgg.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodeWorktablescan.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
spi.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
spi_priv.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tablefunc.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tqueue.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tstoreReceiver.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tuptable.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00