SQL Profiles

  • From: brian.s.wisniewski@xxxxxxxxxxxx
  • To: ORACLE-L <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 27 Aug 2008 11:55:27 -0400

Anyone aware of a way to create a sql profile without running the sql 
tuning advisor?  I have 6 plans associated with the same sql stmt and I 
want to create a profile based on the execution path from today's run.

  1  select sql_id, plan_hash_value, max(timestamp) from dba_hist_sql_plan 
where
  2  sql_id = '206z4tq4j0yrp' group by  sql_id, plan_hash_value
  3* order by 3
SQL> /

SQL_ID        PLAN_HASH_VALUE MAX(TIMESTAMP)
------------- --------------- --------------------
206z4tq4j0yrp      2840312503 13-AUG-2008 04:30:14
206z4tq4j0yrp      2136351662 20-AUG-2008 04:38:25
206z4tq4j0yrp       502714015 21-AUG-2008 04:42:30
206z4tq4j0yrp         1813612 22-AUG-2008 04:40:20
206z4tq4j0yrp      3184831364 26-AUG-2008 04:25:56
206z4tq4j0yrp      3939223844 27-AUG-2008 04:29:42

6 rows selected. 

I'm just curious if there's a way to shorten the process vs creating the 
tuning task, getting it from the cursor cache, executing the tuning task, 
accepting the profile....

Thanks - Brian

-----------------------------------------
This communication is for informational purposes only. It is not
intended as an offer or solicitation for the purchase or sale of
any financial instrument or as an official confirmation of any
transaction. All market prices, data and other information are not
warranted as to completeness or accuracy and are subject to change
without notice. Any comments or statements made herein do not
necessarily reflect those of JPMorgan Chase & Co., its subsidiaries
and affiliates.

This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law. If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED. Although this transmission and any
attachments are believed to be free of any virus or other defect
that might affect any computer system into which it is received and
opened, it is the responsibility of the recipient to ensure that it
is virus free and no responsibility is accepted by JPMorgan Chase &
Co., its subsidiaries and affiliates, as applicable, for any loss
or damage arising in any way from its use. If you received this
transmission in error, please immediately contact the sender and
destroy the material in its entirety, whether in electronic or hard
copy format. Thank you.

Please refer to http://www.jpmorgan.com/pages/disclosures for
disclosures relating to UK legal entities.

Other related posts: