Received: from mail-relay.trade-india.com (unknown [203.196.129.235]) by postgresql.org (Postfix) with SMTP id 93ABD47594B for ; Fri, 19 Apr 2002 07:07:30 -0400 (EDT) Received: (qmail 2634 invoked from network); 19 Apr 2002 11:12:27 -0000 Received: from system11.trade-india-local.com (HELO trade-india.com) (192.168.0.11) by ptil-236-129-del.primus-india.net with SMTP; 19 Apr 2002 11:12:27 -0000 Message-ID: <3CBFFB30.C9F29632@trade-india.com> Date: Fri, 19 Apr 2002 16:40:40 +0530 From: Rajesh Kumar Mallah X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686) X-Accept-Language: en MIME-Version: 1.0 To: PostgResql SQL Mailing List Subject: how to get index scan at work? Content-Type: multipart/alternative; boundary="------------DAB72C44731EC6F8A6EE938A" X-Archive-Number: 200204/243 X-Sequence-Number: 7507 --------------DAB72C44731EC6F8A6EE938A Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi folks, can any one help me with this. tradein_clients=> explain SELECT email_id from email_bank where lower(email) = 'mallah@grex.org' ; NOTICE: QUERY PLAN: Seq Scan on email_bank (cost=0.00..25223.02 rows=9385 width=4) EXPLAIN tradein_clients=> explain SELECT email_id from email_bank where email = 'mallah@grex.org' ; NOTICE: QUERY PLAN: Index Scan using email_bank_email_key on email_bank (cost=0.00..4.83 rows=1 width=4) EXPLAIN i want to query the data in case insensetive manner , but if i put lower(email) index is not being used any workarounds?? regds Mallah. --------------DAB72C44731EC6F8A6EE938A Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Hi folks,

can any one help me with this.

tradein_clients=> explain SELECT   email_id from email_bank where lower(email) = 'mallah@grex.org' ;
NOTICE:  QUERY PLAN:

Seq Scan on email_bank  (cost=0.00..25223.02 rows=9385 width=4)

EXPLAIN
tradein_clients=> explain SELECT   email_id from email_bank where email = 'mallah@grex.org' ;
NOTICE:  QUERY PLAN:

Index Scan using email_bank_email_key on email_bank  (cost=0.00..4.83 rows=1 width=4)

EXPLAIN

i want to query the data in case insensetive manner , but if i put lower(email)
index is not being used  any workarounds??
 

regds
Mallah.
 
 
  --------------DAB72C44731EC6F8A6EE938A--