From: | AI Rumman <rummandba(at)gmail(dot)com> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org |
Subject: | index is not using |
Date: | 2010-02-09 07:43:56 |
Message-ID: | 2a7905441002082343g1dd0c8ebg5a27f7d44ec9fdb1@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-performance |
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.
explain select * from leadaddress where
regexp_replace(phone,'[^0-9]*','','g') like '%2159438606';
QUERY
PLAN
--------------------------------------------------------------------------------------------------------
Seq Scan on leadaddress (cost=100000000.00..100009699.81 rows=1 width=97)
Filter: (regexp_replace((phone)::text, '[^0-9]*'::text, ''::text,
'g'::text) ~~ '%2159438606'::text)
Could anyone please tell me why? I analyzed the table after index creation.
From | Date | Subject | |
---|---|---|---|
Next Message | Guillaume Lelarge | 2010-02-09 07:49:29 | Re: vacuumdb ERROR: out of memory |
Previous Message | A. Kretschmer | 2010-02-09 06:11:27 | Re: How do I drop a CONSTRAINT TRIGGER? |
From | Date | Subject | |
---|---|---|---|
Next Message | AI Rumman | 2010-02-09 07:55:49 | index is not using? |
Previous Message | david | 2010-02-09 04:35:05 | Re: Linux I/O tuning: CFQ vs. deadline |