Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL to generate percentage growth per time period?

Re: SQL to generate percentage growth per time period?

From: DG problem <skatefree_at_gmail.com>
Date: Wed, 28 Nov 2007 16:23:18 -0800 (PST)
Message-ID: <647c8500-6164-4691-8332-99bdbc1dcab7@e6g2000prf.googlegroups.com>


On Nov 28, 2:02 pm, DA Morgan <damor..._at_psoug.org> wrote:
> DG problem wrote:
> > Just wondering what is the easiest way to show percentage growth of
> > database objects per time period.
>
> > For example, what SQL would show the weekly percentage growth of the
> > following data?
>
> > alter session set nls_date_format= 'YYYYmmdd';
> > create table t (time date,mb integer);
> > insert into t values('20071117',103442);
> > insert into t values('20071110',97592);
> > insert into t values('20071103',93446);
> > insert into t values('20071026',87648);
> > insert into t values('20071020',84191);
> > insert into t values('20071013',76495);
> > insert into t values('20071006',72294);
> > commit ;
> > select * from t order by 1 desc ;
>
> > Thanks
>
> SELECT timepoint, delta_space_usage, delta_space_alloc,
> total_space_usage, total_space_alloc
> FROM TABLE(dbms_space.object_growth_trend_swrf(USER, 'T', 'TABLE'));
> --
> Daniel A. Morgan
> Oracle Ace Director & Instructor
> University of Washington
> damor..._at_x.washington.edu (replace x with u to respond)
> Puget Sound Oracle Users Groupwww.psoug.org- Hide quoted text -
>
> - Show quoted text -

You have to pay extra for some of the 10g views, does that include the SQL you gave above as it uses AWRF?

Also, I still need to be able generate percentage change information (the above example was used for simplicity) based on the table I gave above if that is possible? Received on Wed Nov 28 2007 - 18:23:18 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US