Feature #4890
new report(s)
Added by Darcy Buskermolen about 18 years ago. Updated about 17 years ago.
0%
Description
Create a new report that compares the relation size to the number of tuples in the relation, this can be used to help show relation bloat over time. This report(s) should contain indexes as well as tables.
Updated by Darcy Buskermolen about 18 years ago
This report should probably fetch all tables and indexes in a given database.
I think the graph should have 3 things, pg_relation_size(oid), reltubles, pg_relation_size(oid)/reltuples.
Updated by Devrim Gunduz about 18 years ago
SELECT pg_relation_size(oid),reltuples, oid FROM pg_class ;
Are you looking for this?
Updated by Devrim Gunduz about 18 years ago
... and I need a "name" for this report. We use
Index I/O
Connections
Transaction Velocity
Failed Transactions
System Virtual Memory
System I/O
System Processor
User Index Stats
User Table Transaction Types
for now. Any suggestions?
Updated by Darcy Buskermolen about 18 years ago
Not exactly, I'm not sure if rrd can show diffrent scales onthe same graph, but I was thinking of haveing 3 items ploted on the graph.
A) the number of tuples (reltuples)
B) the size in bytes of the relation (pg_relation_size())
C) the ratio of these 2 (pg_relation_size(oid)/reltuples)
So in effect we would be plotting: SELECT reltubles, pg_relation_size(oid), pg_relation_size(oid)/reltuples FROM pg_class where relkind in ('r','i');
Updated by Darcy Buskermolen about 18 years ago
As for a name for the rereport How does "Relation Size" sound ?
Updated by Devrim Gunduz about 18 years ago
- Scripts are written.
- Installer installs relation size related issues.
- RRDs working
- RRDs are being updated via a cron job
- Need to create a relationsize.php that collects all graphs, like pggraph.php
- Make this script show up in index.php
Updated by Devrim Gunduz about 17 years ago
- Status changed from In Progress to New
Aurynn, is this done in new pggraph?
Updated by Darcy Buskermolen about 17 years ago
Yes, we should be tracking realation size(s), as a matter of fact I thought I had talked about this in the email of new features requested. (maybe I missed these)
Updated by Aurynn Shaw about 17 years ago
- Status changed from New to In Progress
Give me an example query. Do you want it graphed, or just a report page?
Updated by Darcy Buskermolen about 17 years ago
I'd like it graphed so that we can see change over time. And an example query is in the ticket, but I'll recap it: SELECT reltuples, pg_relation_size(oid), pg_relation_size(oid)/reltuples FROM pg_class where relkind in ('r','i'); Though I think that without being able to have different scales on the same graph this might be very hard to track in this exact manor. It might require 3 distinct graphs.