Difference between is true and = 't' in boolean feild. & bitmap indexes

From: "Rajesh Kumar Mallah(dot)" <mallah(at)trade-india(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Difference between is true and = 't' in boolean feild. & bitmap indexes
Date: 2002-08-17 05:32:58
Message-ID: 200208171102.58808.mallah@trade-india.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Bruce Momjian 2002-08-17 11:21:20 Re: Difference between is true and = 't' in boolean feild. & bitmap
Previous Message Janning Vygen 2002-08-16 16:49:33 Re: Results from EXECUTE