Sequences vs statistics

Поиск
Список
Период
Сортировка
От Herbey Eric Zepeda
Тема Sequences vs statistics
Дата
Msg-id CAE7DxbZ4oXo7S4g_QpYNX3U1WhD2hQBXVqa6HZPa6oud8OvwFw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Sequences vs statistics
Список pgsql-admin
Hi, I'm in the process of deciding whether to use.

-1 sequence per table containing the number of rows
-Using the collected statistics and functions like pg_relation_size

This is my use case:

I have several hundred tables in one database that I would like to 
constantly monitor as far as size or number of records.

When a certain threshold is met, I will not allow any further inserts
into that table.
The threshold-met-event can be approximate.

How will I affect the performance of the server if I chose to query 
for the system statistics data say, every 5 seconds as opposed to
just reading the latest_value of a sequence that gets updated every time
a row is added to its corresponding table?

Thank you



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: displaying UTC time in local time
Следующее
От: David Johnston
Дата:
Сообщение: Re: Sequences vs statistics