From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | Dimitri Fontaine <dfontaine(at)hi-media(dot)com> |
Cc: | Jeremy Kerr <jk(at)ozlabs(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com> |
Subject: | Re: [PATCH] backend: compare word-at-a-time in bcTruelen |
Date: | 2009-06-26 12:03:04 |
Message-ID: | 20090626120304.GH20436@tamriel.snowman.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
* Dimitri Fontaine (dfontaine(at)hi-media(dot)com) wrote:
> Le 26 juin 09 à 05:20, Jeremy Kerr a écrit :
>>> Unfortunately, the cases with lots of padding spaces are probably
>>> much less probable than the cases with fewer. It would be unpleasant
>>> for example if this patch resulted in a severe performance
>>> degradation for a "canonical" example of char(n) being used properly,
>>> such as char(2) for US state abbreviations.
>>
>> Yep, makes sense. The other consideration is stock-ticker symbols, I
>> assume they may also be stored in CHAR(small n) columns.
>
> Could this optimisation only kicks in when n is "big enough"?
> I'm don't know if this part of the code knows the typmod...
Is it just the size that matters, or is it when there are few spaces at
the end? We do know the overall length, but I didn't see a definite
that if it's larger than X words, doing the by-word comparison is a win
regardless of how many actual spaces are at the end (apologies to Jeremy
if it's in his more detailed report, I havn't had a chance to look yet).
Thanks,
Stpehen
From | Date | Subject | |
---|---|---|---|
Next Message | Jeremy Kerr | 2009-06-26 12:07:41 | Re: [PATCH] backend: compare word-at-a-time in bcTruelen |
Previous Message | Tsutomu Yamada | 2009-06-26 09:07:24 | Proposal: More portable way to support 64bit platforms |