Re: Are piped columns indexable

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "Mark Steben" <msteben(at)autorevenue(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Are piped columns indexable
Date: 2008-03-12 20:55:26
Message-ID: b42b73150803121355j439b91a7p7789e93255ed5d52@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, Mar 12, 2008 at 4:38 PM, Mark Steben <msteben(at)autorevenue(dot)com> wrote:
> Given table t with columns a, b, c, d
>
> And index on t using btree (a,b)
>
> Is this indexable:
>
> Select * from t where a || b = '124cab' (or whatever)
>
> Assume a and b are defined as char(3)
> I have tried various op classes and so far have just gotten sequential scans

create index t_idx on t((a || b));

:-)

merlin

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Craig Ringer 2008-03-13 03:37:53 Repeated execution of identical subqueries
Previous Message Mark Steben 2008-03-12 20:38:14 Are piped columns indexable