From 0711803775a37e0bf39d7efdd1e34d9d7e640ea1 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Fri, 8 Apr 2016 02:36:26 -0400 Subject: Use quicksort, not replacement selection, for external sorting. We still use replacement selection for the first run of the sort only and only when the number of tuples is relatively small. Otherwise, the first run, and subsequent runs in all cases, are produced using quicksort. This tends to be faster except perhaps for very small amounts of working memory. Peter Geoghegan, reviewed by Tomas Vondra, Jeff Janes, Mithun Cy, Greg Stark, and me. --- src/include/miscadmin.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/include/miscadmin.h') diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h index 9200f045a24..356fcc6edac 100644 --- a/src/include/miscadmin.h +++ b/src/include/miscadmin.h @@ -239,6 +239,7 @@ extern bool enableFsync; extern bool allowSystemTableMods; extern PGDLLIMPORT int work_mem; extern PGDLLIMPORT int maintenance_work_mem; +extern PGDLLIMPORT int replacement_sort_tuples; extern int VacuumCostPageHit; extern int VacuumCostPageMiss; -- cgit v1.2.3