From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Andy Dale <andy(dot)dale(at)gmail(dot)com> |
Cc: | Richard Huxton <dev(at)archonet(dot)com>, Scott Marlowe <smarlowe(at)g2switchworks(dot)com>, Brad Nicholson <bnichols(at)ca(dot)afilias(dot)info>, pgsql general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Recording insert, updates, and deletes |
Date: | 2007-01-11 10:50:17 |
Message-ID: | 20070111105017.GC5836@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Jan 11, 2007 at 11:46:17AM +0100, Andy Dale wrote:
> If the stats collector is 'lossy ' i will not be able to use it, can anyone
> confirm that it is ? So maybe my best option is to write a simple trigger
> that just increments a counter (value in a separate table) after an
> insert/update/delete and then add this trigger to each table i want to
> record the stats for. Would this new approach work (i.e. be "lossless") ?
Yes, the stats collector is designed so that if the server is very
busy, it sacrifices accuracy for speed. It's designed to be minimal
impact so that it can be turned on without slowing down your system.
You on the other hand want accuracy over speed, and so the stats
collector is not what you want. Some triggers will do it fine.
Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
From | Date | Subject | |
---|---|---|---|
Next Message | han.holl | 2007-01-11 10:58:34 | Optimize expresiions. |
Previous Message | Andy Dale | 2007-01-11 10:46:17 | Re: Recording insert, updates, and deletes |