Re: Weeding out unused user created database objects, could I use pg_catalog?

Поиск
Список
Период
Сортировка
От Allan Kamau
Тема Re: Weeding out unused user created database objects, could I use pg_catalog?
Дата
Msg-id ab1ea6541002121121u406e556eqffb8e898d4f45780@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Weeding out unused user created database objects, could I use pg_catalog?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Fri, Feb 12, 2010 at 9:13 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Richard Huxton <dev@archonet.com> writes:
>> On 12/02/10 15:10, Allan Kamau wrote:
>>> Therefore I am looking for a solution that contains
>>> "last-accessed-time" data for these objects, especially for the
>>> functions and maybe the triggers.
>
>> Ah, sorry - misunderstood. There's not any timestamp kept. As you can
>> imagine, it would be a cost you'd have to pay every time you accessed an
>> object.
>
>> The best you can do is to turn on statement logging, parse the logs to
>> see what objects are used and then keep those and their dependencies.
>
> Or: remove some objects, run your test case, see if it succeeds.
> Repeat as needed.
>
>                        regards, tom lane
>


Thanks Richard and Tom for your suggestions, I already have statement
logging (as the application is still in development phase) in CSV
format. I will create a table of the same structure as this log file
and import the data into the DB, then perform the neccessary queries
on this table. Since I am also capturing the duration per statement I
will use the opportunity to streamline some of my queries and stored
procedures.

Allan.

В списке pgsql-general по дате отправления:

Предыдущее
От: Marcin Krol
Дата:
Сообщение: Re: db size and VACUUM ANALYZE
Следующее
От: Janet S Jacobsen
Дата:
Сообщение: "could not read block 0... " error followed by "database does not exist"