Re: EXPLAIN detail

From: Matthew <matthew(at)flymine(dot)org>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: EXPLAIN detail
Date: 2008-04-09 10:33:43
Message-ID: Pine.LNX.4.64.0804091129550.20402@aragorn.flymine.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message valgog 2008-04-09 10:44:19 Re: Performance with temporary table
Previous Message Craig Ringer 2008-04-09 10:28:36 Re: EXPLAIN detail