Search Postgresql Archives

index is not using

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux