Re: index is not using?

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: AI Rumman <rummandba(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: index is not using?
Date: 2010-02-09 08:33:13
Message-ID: dcc563d11002090033h758f608di7ea512f9074fc00a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, Feb 9, 2010 at 12:55 AM, AI Rumman <rummandba(at)gmail(dot)com> wrote:
> I have created a index
> create index leadaddress_phone_idx on
> leadaddress(regexp_replace((phone)::text, '[^0-9]*'::text, ''::text,
> 'g'::text));
>
> But the index is not using.

like '%yada'

isn't capable of using an index. If it's left anchored:

like 'yada%'

it can.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Guillaume Lelarge 2010-02-09 09:34:04 Re: index is not using
Previous Message AI Rumman 2010-02-09 07:55:49 index is not using?