Re: for help! - Mailing list pgsql-performance

From scott.marlowe
Subject Re: for help!
Date
Msg-id Pine.LNX.4.33.0304151032440.18680-100000@css120.ihs.com
Whole thread Raw
In response to for help!  (linweidong <wdlin@sis.sh.cn>)
Responses Re: for help!
List pgsql-performance
On Tue, 15 Apr 2003, linweidong wrote:

> Under this condition, I want get some useful suggestion from you. How to
> optimize the database?  How to improve the Count(*)? Because we  want to get
> the number of records in the recordset  we got.

Well, you can always use the trick of putting an on insert / delete
trigger on the table that maintains a single row table with the current
count.  That way, whenever a row is added or removed, the count is
updated.  this will slow down inserts and deletes a little, but TANSTAAFL.


pgsql-performance by date:

Previous
From: Richard Huxton
Date:
Subject: Re: [GENERAL] Yet Another (Simple) Case of Index not used
Next
From: Tom Lane
Date:
Subject: Re: Do Views offer any performance advantage?