pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: A. Kretschmer <andreas.kretschmer@schollglas.com>
To: pgsql-performance@postgresql.org
Subject: Re: count * performance issue
Date: Thu, 6 Mar 2008 08:18:15 +0100
Message-ID: <20080306071814.GG21084@a-kretschmer.de> (raw)
In-Reply-To: <f966c2ee0803052306h5e5481bdk489b2c01d0ab930b@mail.gmail.com>
References: <f966c2ee0803052142l6a105678jfe2da92a0d9371@mail.gmail.com>
	<f966c2ee0803052143k4570d771o6c300647d3b987d@mail.gmail.com>
	<20080306060829.GA21084@a-kretschmer.de>
	<bf54be870803052215y5bb56235k5ea05ada1d701022@mail.gmail.com>
	<47CF8EA6.8070503@mark.mielke.cc>
	<20080306063643.GB21084@a-kretschmer.de>
	<f966c2ee0803052247n783dae24i9058d148bd17385e@mail.gmail.com>
	<20080306065750.GD21084@a-kretschmer.de>
	<f966c2ee0803052306h5e5481bdk489b2c01d0ab930b@mail.gmail.com>

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



view thread (62+ messages)  latest in thread

Message-ID: <20080306071814.GG21084@a-kretschmer.de>
Permalink:  ../20080306071814.GG21084@a-kretschmer.de/
Also on:    postgresql.org/message-id/20080306071814.GG21084@a-kretschmer.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: andreas.kretschmer@schollglas.com
  Subject: Re: count * performance issue
  In-Reply-To: <20080306071814.GG21084@a-kretschmer.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox