Re: EXPLAIN detail

From: "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com>
To: "Luigi N(dot) Puleio" <npuleio(at)rocketmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: EXPLAIN detail
Date: 2008-04-09 10:04:06
Message-ID: 2e78013d0804090304l611044d6q4a71a927ec199b65@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, Apr 9, 2008 at 3:21 PM, Luigi N. Puleio <npuleio(at)rocketmail(dot)com> wrote:
> Hello everyone!!
>
> I have a table with 17 columns and it has almost
> 530000 records and doing just a
>
> SELECT * FROM table
>
> with the EXPLAIN ANALYZE I get:
>
> Seq Scan on table (cost=0.00...19452.95 rows=529395
> width=170) (actual time=0.155...2194.294 rows=529395
> loops=1)
> total runtime=3679.039 ms
>
> and this table has a PK...
> Do you think is too much time for a simple select?...
>

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.
Without knowing your hardware its difficult to judge if
the time taken is more or not. Anyways, I don't think there is much
tweaking you can do for such a query except making sure that
your table is not bloated with dead tuples.

Thanks,
Pavan

--
Pavan Deolasee
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Craig Ringer 2008-04-09 10:28:36 Re: EXPLAIN detail
Previous Message Luigi N. Puleio 2008-04-09 09:51:50 EXPLAIN detail