From: | Fabio Pardi <f(dot)pardi(at)portavita(dot)eu> |
---|---|
To: | Frantz Song <frantz(dot)song(at)gmail(dot)com>, "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org> |
Subject: | Re: How to find the table which is not used in recent 3 month? |
Date: | 2018-12-31 14:01:39 |
Message-ID: | e673369c-defb-d136-330e-9af50cb79d02@portavita.eu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi Frantz,
please keep the list posted.
If you need also to track the reads, then I would follow Prince Pathria's suggestion about pg_stat_statements.
There are indeed also alternatives, but much depends on the setup, the workload, the real final goal..
good luck,
fabio pardi
On 31/12/2018 14:31, Frantz Song wrote:
> Hi Fabio,
>
> thank you!
>
> How about "read"?
> because i need also need clean the insert task if the table no one read.
>
>
> Fabio Pardi <f(dot)pardi(at)portavita(dot)eu <mailto:f(dot)pardi(at)portavita(dot)eu>> 于2018年12月31日周一 下午5:22写道:
>
> Hi Frantz,
>
>
> If 'used' means 'written', then I think it might be an idea to look at the youngest 'xmin' in the table, to know when it was last modified together with keeping a log of what xmin is associated to each day.
>
>
> regards,
>
> fabio pardi
>
>
>
> On 31/12/2018 07:30, Frantz Song wrote:
>> Dear all,
>>
>> I'm use postgresql 9.6, it have 800+tables and some of them is not frequently used.
>> How to find the table which is not used in recent 3 month?
>>
>> Thanks!
>>
>> --
>> P Help save trees...please don't print this e-mail/ unless you really need to./
>
>
>
> --
> P Help save trees...please don't print this e-mail/ unless you really need to./
From | Date | Subject | |
---|---|---|---|
Next Message | rajan | 2019-01-02 09:56:21 | Is there any way that one of the Postgres Background/Utility process may go down? |
Previous Message | Fabio Pardi | 2018-12-31 13:22:07 | Re: How to find the table which is not used in recent 3 month? |