pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rajesh Kumar Mallah <mallah@trade-india.com>
To: PostgResql SQL Mailing List <pgsql-sql@postgresql.org>
Subject: how to get index scan at work?
Date: Fri, 19 Apr 2002 16:40:40 +0530
Message-ID: <3CBFFB30.C9F29632@trade-india.com> (raw)

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.

view thread (4+ messages)  latest in thread

Message-ID: <3CBFFB30.C9F29632@trade-india.com>
Permalink:  ../3CBFFB30.C9F29632@trade-india.com/
Also on:    postgresql.org/message-id/3CBFFB30.C9F29632@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: how to get index scan at work?
  In-Reply-To: <3CBFFB30.C9F29632@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