On Wed, 9 Apr 2008, Pavan Deolasee wrote:
 I have a table with 17 columns and it has almost
 530000 records and doing just a

 SELECT * FROM table

Well, PK won't help you here because you are selecting all rows
from the table and that seq scan is the right thing for that.

Yes. Like he said. Basically, you're asking the database to fetch all half a million rows. That's going to take some time, whatever hardware you have. The PK is completely irrelevant, because the query doesn't refer to it at all. To be honest, three seconds sounds pretty reasonable for that sort of query.

Matthew

--
There once was a limerick .sig
that really was not very big
It was going quite fine
Till it reached the fourth line

--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

Reply via email to