At the head of wchareq, length of (multibyte) character is compared by
authorBruce Momjian <bruce@momjian.us>
Wed, 25 May 2005 22:59:33 +0000 (22:59 +0000)
committerBruce Momjian <bruce@momjian.us>
Wed, 25 May 2005 22:59:33 +0000 (22:59 +0000)
commit2de3c98ad61112a97b07c6e9883d97efc2ecb2ec
treed01783ef53cf82262b585552990e68cfa14dc6af
parent004403113bd1501d0b27efd1c84b69fddc61e793
At the head of wchareq, length of (multibyte) character is compared by
using pg_mblen. Therefore, pg_mblen is executed many times, and it
becomes a bottleneck.

This patch makes a short cut, and reduces execution frequency of
pg_mblen by comparing the first byte first.

a_ogawa
src/backend/utils/adt/like.c