Query not using plan baseline
Hello experts,
Recently we identified one query which takes an hour to complete in production and 2-3 mins in a reporting db instance which gets refreshed every night.So I thought to migrate the plan from reporting to non-prod instance for testing purpose.Unfortunately that did not work.Please find the steps I followed
1.Create SQL tunning set
EXEC dbms_sqltune.create_sqlset('a4xnhf9jzgyjm_cisrptp');
DECLARE 
 cur sys_refcursor; 
BEGIN 
 open cur for 
 select value(p) from table(dbms_sqltune.select_cursor_cache('sql_id = ''a4xnhf9jzgyjm''')) p; 
 dbms_sqltune.load_sqlset('a4xnhf9jzgyjm_cisrptp', cur);