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: Difference between is true and = 't' in boolean feild. & bitmap indexes
Date: Sat, 17 Aug 2002 11:02:58 +0530
Message-ID: <200208171102.58808.mallah@trade-india.com> (raw)



Any can anyone explain me why in a query of a  boolean feild "is ture" does not indexes where as = 't' does?
is "is true" not a more standard SQL than " = 't' ".

Also is there any working implementation of BITMAP INDEXES in postgresql as found in ORACLE? 

regds
mallah.


tradein_clients=> explain analyze select c.email,date(a.generated),c.expired from eyp_rfi a join users b on (a.receiver_uid = b.userid) 
join grace_mytradeindia c on (b.email = c.email) where generated_date = '2002-08-17' and c.expired is true;
NOTICE:  QUERY PLAN:

Hash Join  (cost=1948.01..2214.60 rows=14 width=67) (actual time=9.32..40.03 rows=12 loops=1)
  ->  Seq Scan on grace_mytradeindia c  (cost=0.00..246.17 rows=4051 width=26) (actual time=0.65..27.76 rows=5372 loops=1)
  ->  Hash  (cost=1947.46..1947.46 rows=218 width=41) (actual time=2.66..2.66 rows=0 loops=1)
        ->  Nested Loop  (cost=0.00..1947.46 rows=218 width=41) (actual time=0.16..2.57 rows=31 loops=1)
              ->  Index Scan using eyp_rfi_date on eyp_rfi a  (cost=0.00..677.81 rows=218 width=12) (actual time=0.09..0.57 rows=50 loops=1)
              ->  Index Scan using users_pkey on users b  (cost=0.00..5.80 rows=1 width=29) (actual time=0.03..0.03 rows=1 loops=50)
Total runtime: 40.26 msec

EXPLAIN
tradein_clients=> explain analyze select c.email,date(a.generated),c.expired from eyp_rfi a join users b on (a.receiver_uid = b.userid) 
join grace_mytradeindia c on (b.email = c.email) where generated_date = '2002-08-17' and c.expired = 't';

NOTICE:  QUERY PLAN:

Hash Join  (cost=1948.01..2144.70 rows=14 width=67) (actual time=6.26..49.92 rows=12 loops=1)
  ->  Index Scan using grace_mytradeindia_exp on grace_mytradeindia c  (cost=0.00..176.27 rows=4051 width=26) (actual time=0.03..37.53 rows=5372 loops=1)
  ->  Hash  (cost=1947.46..1947.46 rows=218 width=41) (actual time=2.15..2.15 rows=0 loops=1)
        ->  Nested Loop  (cost=0.00..1947.46 rows=218 width=41) (actual time=0.15..2.06 rows=31 loops=1)
              ->  Index Scan using eyp_rfi_date on eyp_rfi a  (cost=0.00..677.81 rows=218 width=12) (actual time=0.09..0.48 rows=50 loops=1)
              ->  Index Scan using users_pkey on users b  (cost=0.00..5.80 rows=1 width=29) (actual time=0.02..0.03 rows=1 loops=50)
Total runtime: 50.16 msec

EXPLAIN
tradein_clients=>


-- 
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 (2+ messages)  latest in thread

Message-ID: <200208171102.58808.mallah@trade-india.com>
Permalink:  ../200208171102.58808.mallah@trade-india.com/
Also on:    postgresql.org/message-id/200208171102.58808.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: Difference between is true and = 't' in boolean feild. & bitmap indexes
  In-Reply-To: <200208171102.58808.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