Received: from server.beierfeld.kabeljournal.de (pD95089F2.dip.t-dialin.net [217.80.137.242]) by postgresql.org (Postfix) with SMTP id 332A7475908 for ; Fri, 26 Apr 2002 03:06:17 -0400 (EDT) Received: (qmail 22546 invoked from network); 26 Apr 2002 07:06:16 -0000 Received: from station158.beierfeld.kabeljournal.de (HELO km3.de) (192.168.128.158) by server.beierfeld.kabeljournal.de with SMTP; 26 Apr 2002 07:06:16 -0000 Message-ID: <3CC8FD41.DDE7B82E@km3.de> Date: Fri, 26 Apr 2002 09:09:53 +0200 From: Andre Schubert X-Mailer: Mozilla 4.77 [de] (X11; U; Linux 2.2.19-6.2.12 i586) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Use of indexes Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200204/318 X-Sequence-Number: 7582 Hi all, i have a litte problem using indexes with datatypes int and int8. i have a table test: id1 int, id2 int8 if have to indexes: index_test_1: --------+--------- id1 | integer btree index_test_2: --------+-------- id2 | bigint btree If i do any explains i got the following: db_nmkm3=# explain select * from test where id1=1; Index Scan using index_test_1 on test (cost=0.00..3.01 rows=1 width=12) db_nmkm3=# explain select * from test where id2=1; Seq Scan on test (cost=0.00..20.55 rows=1 width=12) db_nmkm3=# explain select * from test where id2=1::int8; Index Scan using index_test_2 on test (cost=0.00..3.01 rows=1 width=12) Can somebody explain me whats wrong with me or my indexes? thanks in advance