Skip site navigation (1) Skip section navigation (2)

pgsql: Avoid detoast in texteq/textne/byteaeq/byteane forunequal-lengt

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Avoid detoast in texteq/textne/byteaeq/byteane forunequal-lengt
Date: 2011-01-18 19:12:41
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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



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

pgsql-committers by date

Next:From: Bruce MomjianDate: 2011-01-18 20:53:57
Subject: pgsql: In test_fsync,adjust test headings to match wal_sync_method val
Previous:From: Magnus HaganderDate: 2011-01-18 19:04:05
Subject: pgsql: Log replication connections only when log_connections is on

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group