pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rajesh Kumar Mallah. <mallah@trade-india.com>
To: pgsql-sql@postgresql.org
Subject: getting ILIKE or  ~*  to use indexes....
Date: Sat, 10 Aug 2002 11:43:54 +0530
Message-ID: <200208101143.54041.mallah@trade-india.com> (raw)

Hi folks,

can anyone tell me or point me to the right thread.

I want my query to use indexes for company name searches but its not happening unless
is use '=' which does not server the purpose.

eg

tradein_clients=# explain SELECT co_name  FROM unified_data  where co_name  ilike '%rajesh%' ;
NOTICE:  QUERY PLAN:
Seq Scan on unified_data  (cost=0.00..19293.00 rows=1 width=25)
EXPLAIN
tradein_clients=# explain SELECT co_name  FROM unified_data  where co_name  = 'rajesh' ;
NOTICE:  QUERY PLAN:
Index Scan using unified_data_co_name_key on unified_data  (cost=0.00..6.26 rows=1 width=25)
EXPLAIN
tradein_clients=#


Regards
mallah.


-- 
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)

Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.





view thread (3+ messages)  latest in thread

Message-ID: <200208101143.54041.mallah@trade-india.com>
Permalink:  ../200208101143.54041.mallah@trade-india.com/
Also on:    postgresql.org/message-id/200208101143.54041.mallah@trade-india.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mallah@trade-india.com
  Subject: Re: getting ILIKE or  ~*  to use indexes....
  In-Reply-To: <200208101143.54041.mallah@trade-india.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox