Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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

pgsql-performance by date

Next:From: Guillaume LelargeDate: 2010-02-09 09:34:04
Subject: Re: index is not using
Previous:From: AI RummanDate: 2010-02-09 07:55:49
Subject: index is not using?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group