pgsql: Rotate instead of shifting hash join batch number.

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема pgsql: Rotate instead of shifting hash join batch number.
Дата
Msg-id E1ijXyd-0006Yh-Rl@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Rotate instead of shifting hash join batch number.

Our algorithm for choosing batch numbers turned out not to work
effectively for multi-billion key inner relations.  We would use
more hash bits than we have, and effectively concentrate all tuples
into a smaller number of batches than we intended.  While ideally
we should switch to wider hashes, for now, change the algorithm to
one that effectively gives up bits from the bucket number when we
don't have enough bits.  That means we'll finish up with longer
bucket chains than would be ideal, but that's better than having
batches that don't fit in work_mem and can't be divided.

Batch-patch to all supported releases.

Author: Thomas Munro
Reviewed-by: Tom Lane, thanks also to Tomas Vondra, Alvaro Herrera, Andres Freund for testing and discussion
Reported-by: James Coleman
Discussion: https://postgr.es/m/16104-dc11ed911f1ab9df%40postgresql.org

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/893eaf0be8be32f1d6ee364d5d9e2dae0d87ebfd

Modified Files
--------------
src/backend/executor/nodeHash.c | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Thomas Munro
Дата:
Сообщение: pgsql: Rotate instead of shifting hash join batch number.
Следующее
От: Thomas Munro
Дата:
Сообщение: pgsql: Rotate instead of shifting hash join batch number.