pgsql: Avoid detoast in texteq/textne/byteaeq/byteane for unequal-lengt - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Avoid detoast in texteq/textne/byteaeq/byteane for unequal-lengt
Date
Msg-id E1PfGyv-0000iA-7D@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Avoid detoast in texteq/textne/byteaeq/byteane for unequal-length strings.

We can get the length of a compressed or out-of-line datum without actually
detoasting it.  If the lengths of two strings are unequal, we can then
conclude they are unequal without detoasting.  That saves considerable work
in an admittedly less-common case, without costing anything much when the
optimization doesn't apply.

Noah Misch

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=1b393f4e5db4fd6bbc86a4e88785b6945a1541d0

Modified Files
--------------
src/backend/utils/adt/varlena.c |  116 +++++++++++++++++++++++++--------------
1 files changed, 75 insertions(+), 41 deletions(-)


pgsql-committers by date:

Previous
From: Magnus Hagander
Date:
Subject: pgsql: Log replication connections only when log_connections is on
Next
From: Bruce Momjian
Date:
Subject: pgsql: In test_fsync, adjust test headings to match wal_sync_method val