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.
In response to
- for help! at 2003-04-15 09:44:44 from linweidong
pgsql-performance by date
|Next:||From: Tom Lane||Date: 2003-04-15 17:26:23|
|Subject: Re: Do Views offer any performance advantage? |
|Previous:||From: Richard Huxton||Date: 2003-04-15 16:29:45|
|Subject: Re: [PERFORM] Yet Another (Simple) Case of Index not used|