|
> 在不做统计更新的计划下,这种执行计划的变更有没办法人为优化后的执行计划(主要是执行路径)?
I think you missed a word in this sentence. We have to guess what you mean. If you mean, you want the actually used plan to change without gathering stats, then as others have said, it's not worth it. The best solution is as you did: gather stats, and (if the plan hasn't changed), run a DDL to force re-parse. Relying on dynamic sampling is not a good idea and should only be used temporarily.
> In fact, we should flush shared pool
Most of the time, the whole database is not dedicated to one application. Flushing shared pool has too much impact. Even if the database runs this app only, unless too many SQLs need to be re-parsed, flushing shared pool is still not as good as pinpointing at only the bad SQLs.
Beginning with 10.2.0.4, there's a way to purge a specific cursor, further minimizing impact.
Yong Huang |
|