Re: Help on my database performance - Mailing list pgsql-performance

From Manfred Koizar
Subject Re: Help on my database performance
Date
Msg-id b12jiv0luk1a6lrivegfeab0k3rumbt00t@4ax.com
Whole thread Raw
In response to Re: Help on my database performance  ("Jianshuo Niu" <jniu@wc-group.com>)
List pgsql-performance
On Thu, 31 Jul 2003 16:08:11 -0400, "Jianshuo Niu" <jniu@wc-group.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

pgsql-performance by date:

Previous
From: Ron Johnson
Date:
Subject: Re: EXTERNAL storage and substring on long strings
Next
From: "Medora Schauer"
Date:
Subject: Re: Odd performance results