Recently i was asked a question on how can I load a SQL with its plan hash value in SQL Plan Baseline ? Because sometimes it becomes important when you have multiple child cursors and you would just like to load just one child cursor plan as 1 or 2 child cursors might not have a good plan. So the best strategy is to load the best plan. Here is how to do it
1 declare
2 a pls_integer;
3 begin
4 a := dbms_spm.load_plans_from_cursor_cache(
5 sql_id=>'1026nxs7ff5c8',plan_hash_value=>2949544139);
6* end;
7 /
PL/SQL procedure successfully completed.
_________________________________________________________________________________
No comments:
Post a Comment