Re: Spd 19c adaptive statistics

  • From: Moustafa Ahmed <moustafa_dba@xxxxxxxxxxx>
  • To: Mladen Gogala <gogala.mladen@xxxxxxxxx>
  • Date: Wed, 6 Jan 2021 00:53:54 +0000

My understanding is sql ppm directives are not sql/sql_id based rather 
expression based..
A spd can be used by more than one sql..

On Jan 5, 2021, at 7:36 PM, Mladen Gogala <gogala.mladen@xxxxxxxxx> wrote:



Of course you can do that. You should joing DBA_HIST_SQL_PLAN and 
DBA_SQL_PLAN_DIRECTIVES. Have you tried that?

Regards

On 1/5/21 7:26 PM, Moustafa Ahmed wrote:
Still my question is


I know I can tell from dbms_xplan cutsor note section but is there a bulk way 
to check history on dba_hist_xxx views to expose the note section and see if it 
was ever used?
 And I’m not able to find the answer there..

On Jan 5, 2021, at 7:06 PM, Mladen Gogala 
<gogala.mladen@xxxxxxxxx><mailto:gogala.mladen@xxxxxxxxx> wrote:



Tim Hall to the rescue:

https://oracle-base.com/articles/12c/sql-plan-directives-12cr1

There is also a good article in DBA hell:

http://dbaparadise.com/2018/03/what-are-sql-plan-directives/

And my favorite is Lodovico Caldera:

http://www.ludovicocaldara.net/dba/sql-plan-directives-problem/

Finally, there is a little known and infrequently visited site at 
https://support.oracle.com:

How to Identify Specific SQL Plan Directives In Use For A SQL Statement (Doc ID 
2390551.1)

Happy New Year


On 1/5/21 6:32 PM, Moustafa Ahmed wrote:

I know I can tell from dbms_xplan cutsor note section but is there a bulk way 
to check history on dba_hist_xxx views to expose the note section and see if it 
was ever used?


--
Mladen Gogala
Database Consultant
http://mgogala.byethost5.com

--
Mladen Gogala
Database Consultant
http://mgogala.byethost5.com

Other related posts: