Project

General

Profile

Feature #4890

new report(s)

Added by Darcy Buskermolen over 18 years ago. Updated about 17 years ago.

Status:
In Progress
Priority:
Normal
Assignee:
Aurynn Shaw
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:

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.

#1

Updated by Devrim Gunduz about 18 years ago

  • Status changed from New to In Progress
#2

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.

#3

Updated by Devrim Gunduz about 18 years ago

SELECT pg_relation_size(oid),reltuples, oid FROM pg_class ;

Are you looking for this?

#4

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?

#5

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');

#6

Updated by Darcy Buskermolen about 18 years ago

As for a name for the rereport How does "Relation Size" sound ?

#7

Updated by Devrim Gunduz about 18 years ago

Status:
  • Scripts are written.
  • Installer installs relation size related issues.
  • RRDs working
  • RRDs are being updated via a cron job
TODO
  • Need to create a relationsize.php that collects all graphs, like pggraph.php
  • Make this script show up in index.php
#8

Updated by Devrim Gunduz over 17 years ago

  • Status changed from In Progress to New

Aurynn, is this done in new pggraph?

#9

Updated by Aurynn Shaw over 17 years ago

No; Darcy, are you wanting this in the new pggraph?

#10

Updated by Darcy Buskermolen over 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)

#11

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?

#12

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.

Also available in: Atom PDF