Home » SQL & PL/SQL » SQL & PL/SQL » Package of Analyze Partitions (Oracle 11R2)
Package of Analyze Partitions [message #624734] Thu, 25 September 2014 01:46 Go to next message
loupstr
Messages: 2
Registered: September 2014
Location: ankara
Junior Member
I know and using dbms_stats.gather_table_stats. But, it does not automatically. Now, I cant see that table analysis automatically. I want to write a new package. Because, This package system will work in the background. This package will automatically analyze the new partitions inserted or there is a change in the partitions will automatic update.
Re: Package of Analyze Partitions [message #624736 is a reply to message #624734] Thu, 25 September 2014 01:52 Go to previous messageGo to next message
John Watson
Messages: 8931
Registered: January 2010
Location: Global Village
Senior Member
Welcome to the forum. Please read our OraFAQ Forum Guide and please read How to use [code] tags and make your code easier to read

You say Quote:
I want to write a new package
so please do! If you have problems, post questions here and perhaps someone will assist.
Re: Package of Analyze Partitions [message #624739 is a reply to message #624734] Thu, 25 September 2014 02:04 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
But, it does not automatically.


Explain this point in details. What do you mean? How do you see it?...

Re: Package of Analyze Partitions [message #624741 is a reply to message #624736] Thu, 25 September 2014 02:08 Go to previous messageGo to next message
loupstr
Messages: 2
Registered: September 2014
Location: ankara
Junior Member
Yes, I have problem. This problem is can not analyze partitions of table. I want to write a new package. This package system will work in the background. This package will automatically analyze the new partitions inserted or there is a change in the partitions will automatic update. ok ??
Re: Package of Analyze Partitions [message #624742 is a reply to message #624741] Thu, 25 September 2014 02:09 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
This problem is can not analyze partitions of table.


Michel Cadot
Explain this point in details. What do you mean? How do you see it?.
Re: Package of Analyze Partitions [message #624747 is a reply to message #624741] Thu, 25 September 2014 04:18 Go to previous messageGo to next message
John Watson
Messages: 8931
Registered: January 2010
Location: Global Village
Senior Member
I do not know what you want to do. Is this a task you have been given? If so, provide the specification. If it is all your own idea, you have to explain.

Saying "can not analyze partitions of table" does not help, because you CAN analyze partitions of a table. For example, if you set the INCREMENTAL preference only new or changed partitions will be analyzed.
Re: Package of Analyze Partitions [message #624873 is a reply to message #624747] Fri, 26 September 2014 16:12 Go to previous message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
What is your database version? If you are on version 10 or 11 - there should already be scheduled jobs that automatatically check the "Staleness" of your tables and will gather stats if 10% of the data in the table has changed. If you need this threshold to be lower - say 5% - then change the STALE_PERCENT of the table using the DBMS_STATS.SET_TABLE_PREFS procedure. For example:
BEGIN
   dbms_stats.set_table_prefs('TABLE_OWNER','YOUR_TABLE_NAME','STALE_PERCENT','5');
END;


Craig...
Previous Topic: Question about v$version
Next Topic: PLS-00306: wrong number or types of arguments in call to 'PR_4552'
Goto Forum:
  


Current Time: Fri Apr 26 06:15:08 CDT 2024