Re: Optimization in convert_string_datum?

From: "Magnus Hagander" <magnus(at)hagander(dot)net>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Optimization in convert_string_datum?
Date: 2007-05-03 05:50:41
Message-ID: 20070503055117.85805DCC8F3@svr2.hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > I'm reviewing the strxfrm patch, and while comparing that code to the
> > code in varstr_cmp (which uses the same UTF8/UTF16 workaround but for
> > strcoll instead), and I noticed that in varstr_cmp we have an
> > optimization to use a stack based buffer instead of palloc if the string
> > is short enough. Is convert_string_datum performance-critical enough to
> > make it worthwhile to put a similar optimization there?
>
> No, I don't believe so. It should only get invoked a few times per
> query at most, since only the planner uses it.

ok.

> It would be far more useful to figure out a way to make that code
> actually do something sane with multibyte encodings than to
> micro-optimize what's there.

I'm not volunteering to do that - at least not now ;)

/Magnus

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message NikhilS 2007-05-03 05:59:52 Re: CREATE TABLE LIKE INCLUDING INDEXES support
Previous Message Neil Conway 2007-05-03 05:49:39 Re: CREATE TABLE LIKE INCLUDING INDEXES support