Re: count * performance issue - Mailing list pgsql-performance

From A. Kretschmer
Subject Re: count * performance issue
Date
Msg-id 20080306071814.GG21084@a-kretschmer.de
Whole thread Raw
In response to Re: count * performance issue  ("sathiya psql" <sathiya.psql@gmail.com>)
List pgsql-performance
am  Thu, dem 06.03.2008, um 12:36:48 +0530 mailte sathiya psql folgendes:
>
>                                                           QUERY PLAN
>
------------------------------------------------------------------------------------------------------------------------------
>  Aggregate  (cost=205756.95..205756.95 rows=1 width=0) (actual time=
> 114675.042..114675.042 rows=1 loops=1)
>    ->  Seq Scan on call_log  (cost=0.00..193224.16 rows=5013112 width=0)
> (actual time=11.754..91429.594 rows=5061619 loops=1)
>          Filter: (call_id > 0)
>  Total runtime: 114699.797 ms
> (4 rows)

'call_id > 0' are your where-condition? An INDEX can't help, all rows
with call_id > 0 are in the result, and i guess, that's all records in
the table.


>
>
> it is now taking 114 seconds, i think because of load in my system.... any way
> will you explain., what is this COST, actual time and other stuffs....


08:16 < akretschmer> ??explain
08:16 < rtfm_please> For information about explain
08:16 < rtfm_please> see http://explain-analyze.info
08:16 < rtfm_please> or http://www.depesz.com/index.php/2007/08/06/better-explain-analyze/
08:16 < rtfm_please> or http://www.postgresql.org/docs/current/static/sql-explain.html

and

http://redivi.com/~bob/oscon2005_pgsql_pdf/OSCON_Explaining_Explain_Public.pdf


Read this to learn more about explain.


Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

pgsql-performance by date:

Previous
From: "sathiya psql"
Date:
Subject: Re: oid...any optimizations
Next
From: Theo Kramer
Date:
Subject: Re: oid...any optimizations