Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Analyze /LMT Question .....
Hi,
> You do not *need* to recompile everything, but procedures etc. referencing
> tables for which you've re-collected statistics or rebuilt indexes will be
> invalidated, automatically.
Erm.. what is this? I can't agree with that. It would be quite nonsense to recompile hundreds or thousands objects after every analyze in some apps.
DDL on an object invalidates it's dependent objects. I don't think any object can be dependent on an index for example. And analyze isn't DDL.
See below,
Tanel.
SQL> desc a;
Name Null? Type ----------------------------------------- -------- ------------------------ ---- I NUMBER
SQL> create or replace procedure p
as
v number;
begin
select i into v from a where rownum < 2;
end;
/
2 3 4 5 6 7
Procedure created.
SQL> select status from user_objects where object_name = 'P';
STATUS
Table analyzed.
SQL> select status from user_objects where object_name = 'P';
STATUS
Index altered.
SQL> select status from user_objects where object_name = 'P';
STATUS
Table altered.
SQL> select status from user_objects where object_name = 'P';
STATUS