Re: Fastest char datatype

From: Robert James <srobertjames(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Fastest char datatype
Date: 2009-07-20 13:23:46
Message-ID: e09785e00907200623o11237fa9s1ad983d180841d66@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Is there a way to use a more compact encoding? I only need 4 bits per char -
that would certainly help caching. (I have indexes tuned very well,
already).

On Mon, Jul 20, 2009 at 2:02 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:

> On Monday 20 July 2009 04:46:53 Robert James wrote:
> > I'm storing a lot of words in a database. What's the fastest format for
> > finding them? I'm going to be doing a lot of WHERE w LIKE 'marsh%' and
> > WHERE w IN ('m', 'ma'). All characters are lowercase a-z, no
> punctuation,
> > no other alphabets. By default I'm using varchar in utf-8 encoding, but
> > was wondering if I could specificy something else (perhaps 7bit ascii,
> > perhaps lowercase only) that would speed things up even further.
>
> If your data is only lowercase a-z, as you say, then the binary
> representation
> will be the same in all server-side encodings, because they are all
> supersets
> of ASCII.
>
>

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Robert James 2009-07-20 13:25:48 Re: Can Postgres use an INDEX over an OR?
Previous Message Tim Landscheidt 2009-07-20 13:18:46 XMLPARSE() evaluated multiple times?