Sequences vs statistics

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux