On Tue, Oct 26, 2004 at 06:12:36PM +0200, Jos van Roosmalen wrote:
>
> CREATE TABLE TESTTABLE (ATTR1 INT8,ATTR2 INT4,ATTR3 TIMESTAMP);
> CREATE UNIQUE INDEX TESTINDEX ON TESTTABLE(ATTR1,ATTR2,ATTR3);
> EXPLAIN SELECT * FROM TESTTABLE WHERE ATTR1=1 AND ATTR2=2 AND
> ATTR3='2004-01-01';
try:
explain select * from testtable where attr1=1::int8 and attr2=2
and attr3='2004-01-01';
Or change the int8 to bigint.
Isn't this in some FAQ yet?
It will not do an index scan if the types don't match.
Kurt