dbTalk Databases Forums  

DBMS_STATS runs for hours and creates no stats

comp.databases.oracle.server comp.databases.oracle.server


Discuss DBMS_STATS runs for hours and creates no stats in the comp.databases.oracle.server forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dan
 
Posts: n/a

Default DBMS_STATS runs for hours and creates no stats - 07-30-2010 , 09:58 AM






I'm running into an occasional issue with my stats gathering in Oracle
10.2. I run the following commands:

DEFINE SCHEMA = "IBXREF1"
EXEC DBMS_STATS.GATHER_TABLE_STATS(ownname=> '&SCHEMA', tabname=>
'HOUSEHOLD_DATA', estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE);

This is a large table, 135G, and the stats gathering runs for 5-6
hours on our server. It completes as normal with no errors, but when
you look at the table afterward there are no stats for it. The
USER_TABLE.LAST_ANALYZED is blank.

This command is from a script that I run every month, and most months
are fine, so it's not a syntax thing. This just seems to happen once
every 2 or 3 months on one of my tables.

Any ideas why this is happening and what I can do to fix it?

Dan

Reply With Quote
  #2  
Old   
ddf
 
Posts: n/a

Default Re: DBMS_STATS runs for hours and creates no stats - 07-30-2010 , 10:26 AM






On Jul 30, 10:58*am, Dan <daniel.oster... (AT) visaer (DOT) com> wrote:
Quote:
I'm running into an occasional issue with my stats gathering in Oracle
10.2. *I run the following commands:

DEFINE SCHEMA = "IBXREF1"
EXEC DBMS_STATS.GATHER_TABLE_STATS(ownname=> '&SCHEMA', tabname=
'HOUSEHOLD_DATA', estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE);

This is a large table, 135G, and the stats gathering runs for 5-6
hours on our server. *It completes as normal with no errors, but when
you look at the table afterward there are no stats for it. *The
USER_TABLE.LAST_ANALYZED is blank.

This command is from a script that I run every month, and most months
are fine, so it's not a syntax thing. *This just seems to happen once
every 2 or 3 months on one of my tables.

Any ideas why this is happening and what I can do to fix it?

Dan
10.2 doesn't say much as to which patch level the database is on;
report the version to at least 4 numbers (10.2.0.1, 10.2.0.4, as
examples). You have checked My Oracle Support for this behaviour?
Have you looked in the alert log for messages and/or errors? Any
trace files generated at the time the statistics are being gathered?

Please provide as much information as possible to assist those
attempting to help you.


David Fitzjarrell

Reply With Quote
  #3  
Old   
Dan
 
Posts: n/a

Default Re: DBMS_STATS runs for hours and creates no stats - 07-30-2010 , 10:44 AM



On Jul 30, 11:26*am, ddf <orat... (AT) msn (DOT) com> wrote:
Quote:
On Jul 30, 10:58*am, Dan <daniel.oster... (AT) visaer (DOT) com> wrote:





I'm running into an occasional issue with my stats gathering in Oracle
10.2. *I run the following commands:

DEFINE SCHEMA = "IBXREF1"
EXEC DBMS_STATS.GATHER_TABLE_STATS(ownname=> '&SCHEMA', tabname=
'HOUSEHOLD_DATA', estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE);

This is a large table, 135G, and the stats gathering runs for 5-6
hours on our server. *It completes as normal with no errors, but when
you look at the table afterward there are no stats for it. *The
USER_TABLE.LAST_ANALYZED is blank.

This command is from a script that I run every month, and most months
are fine, so it's not a syntax thing. *This just seems to happen once
every 2 or 3 months on one of my tables.

Any ideas why this is happening and what I can do to fix it?

Dan

10.2 doesn't say much as to which patch level the database is on;
report the version to at least 4 numbers (10.2.0.1, 10.2.0.4, as
examples). *You have checked My Oracle Support for this behaviour?
Have you looked in the alert log for messages and/or errors? *Any
trace files generated at the time the statistics are being gathered?

Please provide as much information as possible to assist those
attempting to help you.

David Fitzjarrell- Hide quoted text -

- Show quoted text -
David,

I'm on version 10.2.0.3.0. I've looked at logs and nothing shows an
error. The command itself didn't show an error so I'd be surprised if
a log showed an error.

Dan

Reply With Quote
  #4  
Old   
Steve Howard
 
Posts: n/a

Default Re: DBMS_STATS runs for hours and creates no stats - 08-04-2010 , 02:41 PM



On Jul 30, 11:44*am, Dan <daniel.oster... (AT) visaer (DOT) com> wrote:
Quote:
On Jul 30, 11:26*am, ddf <orat... (AT) msn (DOT) com> wrote:



On Jul 30, 10:58*am, Dan <daniel.oster... (AT) visaer (DOT) com> wrote:

I'm running into an occasional issue with my stats gathering in Oracle
10.2. *I run the following commands:

DEFINE SCHEMA = "IBXREF1"
EXEC DBMS_STATS.GATHER_TABLE_STATS(ownname=> '&SCHEMA', tabname=
'HOUSEHOLD_DATA', estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE);

This is a large table, 135G, and the stats gathering runs for 5-6
hours on our server. *It completes as normal with no errors, but when
you look at the table afterward there are no stats for it. *The
USER_TABLE.LAST_ANALYZED is blank.

This command is from a script that I run every month, and most months
are fine, so it's not a syntax thing. *This just seems to happen once
every 2 or 3 months on one of my tables.

Any ideas why this is happening and what I can do to fix it?

Dan

10.2 doesn't say much as to which patch level the database is on;
report the version to at least 4 numbers (10.2.0.1, 10.2.0.4, as
examples). *You have checked My Oracle Support for this behaviour?
Have you looked in the alert log for messages and/or errors? *Any
trace files generated at the time the statistics are being gathered?

Please provide as much information as possible to assist those
attempting to help you.

David Fitzjarrell- Hide quoted text -

- Show quoted text -

David,

I'm on version 10.2.0.3.0. *I've looked at logs and nothing shows an
error. *The command itself didn't show an error so I'd be surprised if
a log showed an error.

Dan
I would exec
dbms_monitor.session_trace_enable(binds=>true),wai ts=>false) in your
session from which you are running the stats gathering.

If you have legal access to the AWR views, I would also find your
session_id in the dba_hist_active_sess_history view, as that may
provide some past clues for problems. Query for action =
'GATHER_STATS_JOB' during the problem window. If that isn't set (it
may be set by the stock scheduler job that ships with the database),
query for program like 'sqlplus%', or whatever program you used to run
the gathering.

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.