Unix Technical Forum

script for statistics gather DBMS_STATS

This is a discussion on script for statistics gather DBMS_STATS within the Oracle Database forums, part of the Database Server Software category; --> hi, sometimes i launch dbms_stats.gather_schema.... for perform CBO of my oracle 9i DB. After that, i verify the number ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-26-2008, 04:45 AM
Andrea
 
Posts: n/a
Default script for statistics gather DBMS_STATS

hi,
sometimes i launch dbms_stats.gather_schema.... for perform CBO of my
oracle 9i DB.
After that, i verify the number of rows, avg. row length and number of
blocks of each table from user_tables. But this is very slow and
expensive, because i must to read data for single table.

I would like to know if there is some sql script for retrive summary
information of all table statistics.

thanks!

bye
andrew

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-26-2008, 04:45 AM
hpuxrac
 
Posts: n/a
Default Re: script for statistics gather DBMS_STATS

On Mar 23, 8:39 am, "Andrea" <netsecur...@tiscali.it> wrote:
> hi,
> sometimes i launch dbms_stats.gather_schema.... for perform CBO of my
> oracle 9i DB.
> After that, i verify the number of rows, avg. row length and number of
> blocks of each table from user_tables. But this is very slow and
> expensive, because i must to read data for single table.
>
> I would like to know if there is some sql script for retrive summary
> information of all table statistics.
>
> thanks!
>
> bye
> andrew


Why exactly are you attempting to verify by querying user tables the
results of a dbms_stats operation?


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-26-2008, 04:45 AM
Andrea
 
Posts: n/a
Default Re: script for statistics gather DBMS_STATS

On 23 Mar, 14:33, "hpuxrac" <johnbhur...@sbcglobal.net> wrote:
> On Mar 23, 8:39 am, "Andrea" <netsecur...@tiscali.it> wrote:
>
> > hi,
> > sometimes i launch dbms_stats.gather_schema.... for perform CBO of my
> > oracle 9i DB.
> > After that, i verify the number of rows, avg. row length and number of
> > blocks of each table from user_tables. But this is very slow and
> > expensive, because i must to read data for single table.

>
> > I would like to know if there is some sql script for retrive summary
> > information of all table statistics.

>
> > thanks!

>
> > bye
> > andrew

>
> Why exactly are you attempting to verify by querying user tables the
> results of a dbms_stats operation?



select
initial_extent,NUM_ROWS,AVG_ROW_LEN,blocks,CHAIN_C NT,last_analyzed
from user_tables ...

i need this values for verify chianed rows:

(chain_cnt/num_rows) > 0.1



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-26-2008, 04:45 AM
DA Morgan
 
Posts: n/a
Default Re: script for statistics gather DBMS_STATS

Andrea wrote:
> On 23 Mar, 14:33, "hpuxrac" <johnbhur...@sbcglobal.net> wrote:
>> On Mar 23, 8:39 am, "Andrea" <netsecur...@tiscali.it> wrote:
>>
>>> hi,
>>> sometimes i launch dbms_stats.gather_schema.... for perform CBO of my
>>> oracle 9i DB.
>>> After that, i verify the number of rows, avg. row length and number of
>>> blocks of each table from user_tables. But this is very slow and
>>> expensive, because i must to read data for single table.
>>> I would like to know if there is some sql script for retrive summary
>>> information of all table statistics.
>>> thanks!
>>> bye
>>> andrew

>> Why exactly are you attempting to verify by querying user tables the
>> results of a dbms_stats operation?

>
>
> select
> initial_extent,NUM_ROWS,AVG_ROW_LEN,blocks,CHAIN_C NT,last_analyzed
> from user_tables ...
>
> i need this values for verify chianed rows:
>
> (chain_cnt/num_rows) > 0.1


No you don't.

@?/rdbms/admin/utlchn1.sql
ANALYZE TABLE online_media LIST CHAINED ROWS INTO chained_rows;

for heap tables and for IOT's look up dbms_iot in Morgan's library
at www.psoug.org.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-26-2008, 04:47 AM
Andrea
 
Posts: n/a
Default Re: script for statistics gather DBMS_STATS

On 23 Mar, 17:53, DA Morgan <damor...@psoug.org> wrote:
> Andrea wrote:
> > On 23 Mar, 14:33, "hpuxrac" <johnbhur...@sbcglobal.net> wrote:
> >> On Mar 23, 8:39 am, "Andrea" <netsecur...@tiscali.it> wrote:

>
> >>> hi,
> >>> sometimes i launch dbms_stats.gather_schema.... for perform CBO of my
> >>> oracle 9i DB.
> >>> After that, i verify the number of rows, avg. row length and number of
> >>> blocks of each table from user_tables. But this is very slow and
> >>> expensive, because i must to read data for single table.
> >>> I would like to know if there is some sql script for retrive summary
> >>> information of all table statistics.
> >>> thanks!
> >>> bye
> >>> andrew
> >> Why exactly are you attempting to verify by querying user tables the
> >> results of a dbms_stats operation?

>
> > select
> > initial_extent,NUM_ROWS,AVG_ROW_LEN,blocks,CHAIN_C NT,last_analyzed
> > from user_tables ...

>
> > i need this values for verify chianed rows:

>
> > (chain_cnt/num_rows) > 0.1

>
> No you don't.
>
> @?/rdbms/admin/utlchn1.sql
> ANALYZE TABLE online_media LIST CHAINED ROWS INTO chained_rows;
>
> for heap tables and for IOT's look up dbms_iot in Morgan's library
> atwww.psoug.org.
> --


thanks very much.

i can't launch /rdbms/admin/utlchn1.sql because it shows me that my
db isn't compatible 8.1.0.
However, tha table is created launched /rdbms/admin/utlchain.sql ...

which differents there are for this two script ??

thanks a lot



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:44 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com