Re: Help on my database performance

From: Manfred Koizar <mkoi-pg(at)aon(dot)at>
To: "Jianshuo Niu" <jniu(at)wc-group(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Help on my database performance
Date: 2003-07-31 21:32:04
Message-ID: b12jiv0luk1a6lrivegfeab0k3rumbt00t@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, 31 Jul 2003 16:08:11 -0400, "Jianshuo Niu" <jniu(at)wc-group(dot)com>
wrote:
>explain analyze select count(*) from tfd_catalog ;
>NOTICE: QUERY PLAN:
>
>Aggregate (cost=15986.02..15986.02 rows=1 width=0)
> (actual time=1089.99..1089.99 rows=1 loops=1)
> -> Seq Scan on tfd_catalog (cost=0.00..15582.82 rows=161282 width=0)
> (actual time=0.11..833.41 rows=161282 loops=1)
>Total runtime: 1090.51 msec

>Could you tell me what does "Aggregate (cost=15986.02..15986.02 rows=1
>width=0) (actual time=1089.99..1089.99 rows=1 loops=1)" mean? It does not
>show in my previous report.

In your first post you did
SELECT productid FROM tfd_catalog;

now you did
SELECT count(*) FROM tfd_catalog;

count() is an aggregate function which in your case takes 161282 rows
as input and produces a single row as output. The "actual" part of
the "Aggregate" line tells you that the first resulting row is
generated 1089.99 milliseconds after query start and the last row (not
surprisingly) at the same time. The "cost" part contains the
planner's estimations for these values.

Servus
Manfred

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Medora Schauer 2003-07-31 21:32:16 Re: Odd performance results
Previous Message Ron Johnson 2003-07-31 21:21:38 Re: EXTERNAL storage and substring on long strings