indexes are not used

From: "dev Rp" <dev_rp(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: indexes are not used
Date: 2002-06-11 12:10:40
Message-ID: F64TwaSydQLfCiylt6E00022e8b@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
I have a table with 60,000 rows and integer as primary key. When I use
select max(userid) from users;
it is doing for sequential scan on users table, so that it is taking 40
seconds to get the result.
So I have set the sequential scan to off by using follwing option.
set enable_seqscan to 'off'.
still it is going for sequentail scan.
Postgresql is installed on Solaris 5.8 on P3 500 mhz processor having 256 mb
ram.
Is there is any other way to force to use index or do I have to tune the
database to reduce query time.

Thanks in advance.
Looking forward for an early solution
Devi

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2002-06-11 12:18:00 Re: indexes are not used
Previous Message tony 2002-06-11 06:54:05 Re: Help with data transfer please