Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> DBMS_SPACE built-in
I've been taking advantage of the holiday to update many of the entries
in Morgan's Library and decided to build demos of the of the
functionality in the DBMS_SPACE package: Some documented, some
undocumented.
Found a real gem ... object_trend_growth which is a pipelined table function where each returned row describes the space usage of the object at a specific point in time.
dbms_space.object_growth_trend (
object_owner IN VARCHAR2, object_name IN VARCHAR2, object_type IN VARCHAR2, partition_name IN VARCHAR2 DEFAULT NULL, start_time IN TIMESTAMP DEFAULT NULL, end_time IN TIMESTAMP DEFAULT NULL, interval IN DSINTERVAL_UNCONSTRAINED DEFAULT NULL, skip_interpolated IN VARCHAR2 DEFAULT 'FALSE', timeout_seconds IN NUMBER DEFAULT NULL,single_datapoint_flag IN VARCHAR2 DEFAULT 'TRUE') RETURN object_growth_trend_table PIPELINED;
Return Type:
TYPE object_growth_trend_row IS RECORD (
timepoint TIMESTAMP,
space_usage NUMBER,
space_alloc NUMBER,
quality VARCHAR(20));
What I like about it most is the following from the output:
TIMEPOINT SPACE_USAGE SPACE_ALLOC QUALITY ----------------------------------- ----------- ----------- ------------ 26-NOV-05 05.18.16.383000 PM 17032 262144 PROJECTED 27-NOV-05 05.18.16.383000 PM 17032 262144 PROJECTED 28-NOV-05 05.18.16.383000 PM 17032 262144 PROJECTED 29-NOV-05 05.18.16.383000 PM 17032 262144 PROJECTED 30-NOV-05 05.18.16.383000 PM 17032 262144 PROJECTED
Yes ... it is projecting the size of a table into the future based on past usage. The output is one row per day going back 30 days.
A Thanksgiving present to any and all.
--
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Fri Nov 25 2005 - 19:25:12 CST
![]() |
![]() |