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

Re: wchareq improvement

From: a_ogawa <a_ogawa(at)hi-ho(dot)ne(dot)jp>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: wchareq improvement
Date: 2005-05-26 14:01:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Bruce Momjian wrote:
> Patch applied with adjustment --- the second part of your patch that
> skips comparing the first byte seemed unnecessary.  It seemed likely
> to cause a cpu stall, so just doing the loop seemed faster.
> Did you test if the second part of your patch actually caused a speedup?

Well, I measured the performance today. As a result, I confirmed the
second part of my patch is unnecessary as you pointed it out.
Thanks for comment and applying patch.

> a_ogawa wrote:
> >
> > In SQL that uses 'like' operator, wchareq is used to compare characters.
> >
> > 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.


--- Atsushi Ogawa

In response to

pgsql-patches by date

Next:From: Tom LaneDate: 2005-05-26 14:10:50
Subject: Re: pgsql: Add PL/pgSQL SQLSTATE and SQLERRM support which sets these values
Previous:From: Peter EisentrautDate: 2005-05-26 10:59:51
Subject: Re: Implementation of SQLSTATE and SQLERRM variables

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