Question:
I have dynamic sampling enabled, and I have a SQL statement that is
changing execution plans frequently, and it is against our change
control rules that require all SQL to be tested prior to being placed
into production. How do I disable dynamic sampling?
Answer:
Oracle dynamic sampling is not for everyone, and it can be especially
problematic because it will cause instability in SQL statements, as
they change execution plans as the data changes. I disable
dynamic sample for all OLTP databases that have one-and only one,
optimal execution plan, usually using a highly selective index.
Remember, “If it ain’t broke, don’t fix it”.
See these important
notes on
disabling dynamic sampling.