Re: general table stats, ideas ?

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Mark Roberts" <mailing_lists(at)pandapocket(dot)com>
Cc: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: general table stats, ideas ?
Date: 2008-10-08 03:02:42
Message-ID: dcc563d10810072002j82ffad0ub6b4368d9b2f7dbd@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Oct 7, 2008 at 11:27 AM, Mark Roberts
<mailing_lists(at)pandapocket(dot)com> wrote:
>
>
>> My problem is, I need to benchmark set of tables, where - we can
>> assume - schema of each table is unknown, and we have no assumption on
>> any fields being present there. (altho, if there is no other way to do
>> it, we could assume id bigint not null default nextval('someseq'));
>> basically, I need to know when certain row was selected (read), and
>> when it was updated/created (insert). For that I need two fields. And
>> although former could be done, and I more or less know how to do it (I
>> think it can be done with rule, and default = now()) - I have yet to
>> find a way on how to do the same thing for select.
>
> So basically you've got a slony replicated database that you want to
> check (on a row by row level) when something gets read/inserted/deleted?
>
> It seems like you would want to add three fields to each table:
> last_read_time, last_update_time, and original_insert_time

If you need to keep track of all updates, past and present, then a
logging table of some kind would be needed, and a trigger to update it
possibly. Or some kind of time travel setup.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2008-10-08 04:59:46 Re: question
Previous Message Scott Marlowe 2008-10-08 02:04:21 Re: ERROR: column "datpath" does not exist