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

From A. Kretschmer
Subject Re: count * performance issue
Date
Msg-id 20080306065750.GD21084@a-kretschmer.de
Whole thread Raw
In response to count * performance issue  ("sathiya psql" <sathiya.psql@gmail.com>)
Responses Re: count * performance issue  ("sathiya psql" <sathiya.psql@gmail.com>)
Re: count * performance issue  (Mark Mielke <mark@mark.mielke.cc>)
List pgsql-performance
am  Thu, dem 06.03.2008, um 12:17:55 +0530 mailte sathiya psql folgendes:
> TRIGGER i can use if i want the count of the whole table, but i require for
> some of the rows with WHERE condition....
>
> so how to do that ???

Okay, in this case a TRIGGER are a bad idea. You can use an INDEX on
this row. Can you show us the output for a EXPLAIN ANALYSE SELECT
count(*) from <your_table> WHERE <your_row> = ... ?


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: "A. Kretschmer"
Date:
Subject: Re: count * performance issue
Next
From: "sathiya psql"
Date:
Subject: oid...any optimizations