how to get index scan at work?

From: Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>
To: PostgResql SQL Mailing List <pgsql-sql(at)postgresql(dot)org>
Subject: how to get index scan at work?
Date: 2002-04-19 11:10:40
Message-ID: 3CBFFB30.C9F29632@trade-india.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi folks,

can any one help me with this.

tradein_clients=> explain SELECT email_id from email_bank where
lower(email) = 'mallah(at)grex(dot)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(at)grex(dot)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.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Thomas Swan 2002-04-19 11:23:27 Re: how to get index scan at work?
Previous Message Gautham S. Rao 2002-04-19 10:00:56 Re: count different values in column