Re: char() overhead on read-only workloads not so insignifcant as the docs claim it is... - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: char() overhead on read-only workloads not so insignifcant as the docs claim it is...
Date
Msg-id 20090615235816.GO7285@alvh.no-ip.org
Whole thread Raw
In response to Re: char() overhead on read-only workloads not so insignifcant as the docs claim it is...  (Gurjeet Singh <singh.gurjeet@gmail.com>)
Responses Re: char() overhead on read-only workloads not so insignifcant as the docs claim it is...  (Jeremy Kerr <jk@ozlabs.org>)
[PATCH] backend: compare word-at-a-time in bcTruelen  (Jeremy Kerr <jk@ozlabs.org>)
List pgsql-hackers
> On Sat, Jun 13, 2009 at 3:44 PM, Stefan Kaltenbrunner
> <stefan@kaltenbrunner.cc> wrote:

> > The specific query is causing bcTruelen to show up in the profile is:
> >
> > "SELECT c from sbtest where id between $1 and $2 order by c" where the
> > parameters are for example
> > $1 = '5009559', $2 = '5009658' - ie ranges of 100.
> >
> >
> > benchmarking only that query results in:
> >
> > samples  %        symbol name
> > 2148182  23.5861  bcTruelen
> > 369463    4.0565  index_getnext
> > 362784    3.9832  AllocSetAlloc

Gurjeet Singh escribió:
> Comments?

Maybe bcTruelen could be optimized to step on one word at a time
(perhaps by using XOR against a precomputed word filled with ' '),
instead of one byte at a time ...

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: What does log_destination = csvlog mean?
Next
From: Jeremy Kerr
Date:
Subject: Re: char() overhead on read-only workloads not so insignifcant as the docs claim it is...