Received: from gate2.ilhadamagia.com.br ([200.196.31.226]) by hub.org (8.10.1/8.10.1) with ESMTP id e8KHSYs19729 for ; Wed, 20 Sep 2000 13:28:35 -0400 (EDT) Received: from k1.com.br (localhost.ilhadamagia.com.br [127.0.0.1]) by gate2.ilhadamagia.com.br (8.9.3/8.9.3) with ESMTP id OAA10064 for ; Wed, 20 Sep 2000 14:29:00 -0300 (BRT) (envelope-from lenzi@k1.com.br) Message-ID: <39C8F3DB.78D055E7@k1.com.br> Date: Wed, 20 Sep 2000 14:28:59 -0300 From: User Lenzi X-Mailer: Mozilla 4.73 [en] (X11; I; FreeBSD 4.1-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql Subject: sql query not using indexes Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200009/154 Hello, I am using last version of postgresql, 7.0.2 on a FreeBSD or Linux box I create a table: create table teste ( login text, datein datetime); create index teste1 on teste (login); if I start a query: explain select * from teste where login = 'xxx' results: Index Scan using teste1 on teste (cost=0.00..97.88 rows=25 ) however a query: explain select * from teste where login > 'AAA' results: Seq Scan on teste .... On a machine running version 6.5 both queries results index scan. this results that the version 6.5 is faster than version 7.0.2 on this kind of query. Any explanation??? Please???