pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Difference between is true and = 't' in boolean feild. & bitmap indexes
2+ messages / 2 participants
[nested] [flat]

* Difference between is true and = 't' in boolean feild. & bitmap indexes
@ 2002-08-17 05:32 Rajesh Kumar Mallah. <mallah@trade-india.com>
  2002-08-17 11:21 ` Re: Difference between is true and = 't' in boolean feild. & bitmap Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Rajesh Kumar Mallah. @ 2002-08-17 05:32 UTC (permalink / raw)
  To: 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.





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Difference between is true and = 't' in boolean feild. & bitmap
  2002-08-17 05:32 Difference between is true and = 't' in boolean feild. & bitmap indexes Rajesh Kumar Mallah. <mallah@trade-india.com>
@ 2002-08-17 11:21 ` Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Bruce Momjian @ 2002-08-17 11:21 UTC (permalink / raw)
  To: Rajesh Kumar Mallah. <mallah@trade-india.com>; +Cc: pgsql-sql

Rajesh Kumar Mallah. wrote:
> 
> 
> 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' ".

Not sure.

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

We have discussed them and see a few uses for them.  See the TODO list
under Performance and there is a link to some emails discussing it.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2002-08-17 11:21 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-08-17 05:32 Difference between is true and = 't' in boolean feild. & bitmap indexes Rajesh Kumar Mallah. <mallah@trade-india.com>
2002-08-17 11:21 ` Re: Difference between is true and = 't' in boolean feild. & bitmap Bruce Momjian <pgman@candle.pha.pa.us>

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