From 8b49a6044d06b557047210dba2735081bb037e96 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 5 Jan 2014 12:28:39 -0500 Subject: Cache catalog lookup data across groups in ordered-set aggregates. The initial commit of ordered-set aggregates just did all the setup work afresh each time the aggregate function is started up. But in a GROUP BY query, the catalog lookups need not be repeated for each group, since the column datatypes and sort information won't change. When there are many small groups, this makes for a useful, though not huge, performance improvement. Per suggestion from Andrew Gierth. Profiling of these cases suggests that it might be profitable to avoid duplicate lookups within tuplesort startup as well; but changing the tuplesort APIs would have much broader impact, so I left that for another day. --- src/include/catalog/pg_operator.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/include') diff --git a/src/include/catalog/pg_operator.h b/src/include/catalog/pg_operator.h index a49cfdbdded..2fe9f935d46 100644 --- a/src/include/catalog/pg_operator.h +++ b/src/include/catalog/pg_operator.h @@ -128,6 +128,7 @@ DATA(insert OID = 95 ( "<" PGNSP PGUID b f f 21 21 16 520 524 int2lt scalar DESCR("less than"); DATA(insert OID = 96 ( "=" PGNSP PGUID b t t 23 23 16 96 518 int4eq eqsel eqjoinsel )); DESCR("equal"); +#define Int4EqualOperator 96 DATA(insert OID = 97 ( "<" PGNSP PGUID b f f 23 23 16 521 525 int4lt scalarltsel scalarltjoinsel )); DESCR("less than"); #define Int4LessOperator 97 -- cgit v1.2.3