From: | Roland Roberts <roland(at)astrofoto(dot)org> |
---|---|
To: | "Ilker Egilmez" <ilker(at)gate5(dot)de> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: problem: index on number not honoured |
Date: | 2001-11-15 16:26:41 |
Message-ID: | m2k7wsgfum.fsf@tycho.rlent.pnet |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-sql |
>>>>> "Ilker" == Ilker Egilmez <ilker(at)gate5(dot)de> writes:
Ilker> an index on a table column of any number type only gets honoured if you
Ilker> query it like a string, e.g.
Ilker> create table t1 ( n int2 ) ;
Ilker> create index t1n on t1 (n) ;
Ilker> explain select * from t1 where n = 1 ;
Ilker> -- Seq Scan on t1 (cost=0.00..22.50 rows=10 width=2)
Ilker> explain select * from t1 where n = '1' ;
Ilker> -- Index Scan using t1n on t1 (cost=0.00..8.14 rows=10 width=2)
Two questions: have you run vacuum analyze on the table? have you
submitted a bug report?
roland
--
PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD RL Enterprises
roland(at)rlenter(dot)com 76-15 113th Street, Apt 3B
roland(at)astrofoto(dot)org Forest Hills, NY 11375
From | Date | Subject | |
---|---|---|---|
Next Message | Zeugswetter Andreas SB SD | 2001-11-15 16:29:50 | Re: [HACKERS] Open Items (was: RE: [HACKERS] Beta going well) |
Previous Message | Bruce Momjian | 2001-11-15 16:26:13 | Re: [HACKERS] Open Items (was: RE: [HACKERS] Beta going well) |
From | Date | Subject | |
---|---|---|---|
Next Message | Bryan White | 2001-11-15 16:37:55 | How to best grab a chunk of Ids from a sequence |
Previous Message | Roland Roberts | 2001-11-15 16:24:47 | Re: Is this a bug? |