Hello,
I am studying the 12c material and have a question about Statistics Feedback (or Cardinality Feedback).
Reading about the Statistics Feedback i understand that the actual number of rows are written to a Plan Directive
- During the first execution of a SQL statement, the optimizer generates an execution plan.
- After the first execution, the optimizer disables monitoring for statistics feedback.
- If the query executes again, then the optimizer uses the corrected cardinality estimates instead of its usual estimates.
Source: http://docs.oracle.com/database/121/TGSQL/tgsql_optcncpt.htm#TGSQL94983
But what happens if the data becomes skewed in the next hours and the plan should better not be used?
When or how will the plan become invalid and will the optimizer hard parse a new plan?
Is anybody able to explain this to me?
Thank you in advance.
Regards,
Harry