by default the job runs once every 24 hours.
When you see LAST_ANALYZED being days, weeks, or months in the past do not be alarmed.
If/when the data in a table does not change, then the statistics do not need to change.
Oracle collects new statistics when enough of the data (about 10%) has changed.

Like above statement for DBMS_STATS job, is there a automatic job that runs every day to compile invalid objects
for schema or we need to compile it manually ?

Thanks,
Suhas]]>suhasdba2013-07-10T06:18:57-00:00Re: Query on invalid objectshttp://www.orafaq.com/forum/./mv/msg/188541/589690/#msg_589690
You can:
1/ just create one using utl_recomp package.
2/ forget about it, why do you want to compile invalid objects?

Following would compile all of the invalid objects owned by your schema:-

exec dbms_utility.compile_schema( '<YOUR SCHEMA NAME IN UPPER>')

If you still find objects as invalid, then you have errors in those objects.

Invalid objects will get valid as and when they are executed or accessed. However, if you still want to do it manually(don't know why someone would do that, seems pointless to me) you need to do as stated above.]]>Lalit Kumar B2013-07-10T13:48:31-00:00Re: Query on invalid objectshttp://www.orafaq.com/forum/./mv/msg/188541/590006/#msg_590006
Quote:

As it has been explained, it is useless, the invalid objects are recompiled at first access and so make valid... if this is possible.
More, it is better to NOT revalidate objects as their invalidation means something has been modified in their environment, something which should NOT happen out of application upgrade. So invalid objects are a sign that something wrong has happen in the database and needs investigation.