DBMS_STATS and stored procedures to recompile or not? [message #258003] |
Thu, 09 August 2007 15:40  |
tobyc
Messages: 9 Registered: March 2007
|
Junior Member |
|
|
While working with a fellow DBA (sybase/sqlserver dba) he explained that every time statistics are collected that he must run a script to recompile the stored procedures in his sybase database.
That made me wonder if the same were true for Oracle.
In Oracle the stored procedure doesn't have a stored execution plan, either the sql is in the cache of it isn't. If it is not in the cache and stats are gathered then the next time each sql within the proc gets parsed then the new stats are used for the Optimizer to choose the best execution plan.
If the sql is already in the cache then who cares, it is in cache and is returned at the fastest possible rate. Is my understanding of this correct or not?
Thanks
|
|
|
|