Overview
\


---\-
SQL Performance Analyzer는 변경에 따른 위험관리 방안의 향상을 위해서 소개되는 신기능이다.

Database Replay는 실제로 캡처된 정보에 대해서만 그 초점을 맞추고 있음.
다음과 같은 변경 작업이 SQL에 미치는 영향을 파악하기 어려움.
초기화 파라미터 변경
옵티마이저 통계 리프레시
데이베이스 업그레이드

변경 작업이 특정 SQL 구문 또는 전체 SQL 워크로드에 미치는 영향을 평가/비교 할 수 있다.

Database Replay 와 SQL Replay 비교
\









-\-
1. Oracle 10g에서 Oracle 11g로 업그레이드한 후의 영향을 자동으로 시뮬레이션 할 수 있다.
2. Oracle 11g의 주요 업그레이드와 중요 패치 업그레이드 등 여러가지 상황에 대해 잠재적인 위험요소를 점검할 수 있다.
3. SQL 성능 통계에 대한 비교도 가능하다.

일반적인 데이터베이스 환경 변경사항
\- Database upgrades
\- Implementation of tuning recommendations
\- Schema changes
\- Statistics gathering
\- Database parameter changes
\- OS/ hardware changes

|Database Replay|SQL Replay|
|동일한 Application을 서로 다른 Database 시스템에 그대로 재연
 Database변경이 Application 수행에 어떤 변화가 발생하는지 테스트|SQL
Performance Analyzer을 통해 SQL 실행계획의 구조에 어떤 영향을 미치는지 테스트|

문제가 파악 후
SQL Tuning Advisor (STA) 를 사용하여 본래 실행계획으로 환원시키거나 추가 튜닝을 통해서 문제를 해결함.

SQL Performance Analyzer 테스트 단계
0. 환경설정
1. SQL 튜닝 집합에 준하는 SQL Performance Analyzer 작업 생성
2. 초기 환경에서 SQL Tuning Set 재생
3 .변경된 환경에서 SQL Tuning Set 재생
4 .단계 2와 단계 3 비교
5 .비교 보고서 보기

\




















---\-
0. 환경설정
  
&nbsp;&nbsp; sqlplus / as sysdba << \! > /tmp/create_apps_user.log
&nbsp;&nbsp; grant dba to scott;
&nbsp;&nbsp; create user apps identified by apps;
&nbsp;&nbsp; grant dba to apps;
&nbsp;&nbsp; grant execute on dbms_sqltune_internal to apps;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \-\- 필요
&nbsp;&nbsp; grant create any sql profile to apps;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \-\- 필요
&nbsp;&nbsp; grant select on scott.lu_pg_featurevalue_15 to apps;
&nbsp;&nbsp; grant select on scott.lu_elementrange_rel to apps;

&nbsp;&nbsp;&nbsp; demo_app.sql
&nbsp;&nbsp;&nbsp; \




















---\-
&nbsp;&nbsp;&nbsp; Connect sh/sh
&nbsp;&nbsp;&nbsp; select /\* CONTROL_QUERY11 \*/ sum(QUANTITY_SOLD) from sales where PROMO_ID = 33;
&nbsp;&nbsp;&nbsp; select /\* CONTROL_QUERY12 \*/ sum(QUANTITY_SOLD) from sales where PROMO_ID = 350;
&nbsp;&nbsp;&nbsp; select /\* CONTROL_QUERY13 \*/ sum(QUANTITY_SOLD) from sales where PROMO_ID = 351;
&nbsp;&nbsp;&nbsp; select /\* CONTROL_QUERY14 \*/ sum(QUANTITY_SOLD) from sales where PROMO_ID = 534;
&nbsp;&nbsp;&nbsp; select /\* CONTROL_QUERY15 \*/ sum(QUANTITY_SOLD) from sales where PROMO_ID = 999;
&nbsp;&nbsp;&nbsp; select /\* CONTROL_QUERY21 \*/ sum(QUANTITY_SOLD) from sales where channel_id = 2;
&nbsp;&nbsp;&nbsp; select /\* CONTROL_QUERY22 \*/ sum(QUANTITY_SOLD) from sales where channel_id = 3;
&nbsp;&nbsp;&nbsp; select /\* CONTROL_QUERY23 \*/ sum(QUANTITY_SOLD) from sales where channel_id = 4;
&nbsp;&nbsp;&nbsp; select /\* CONTROL_QUERY24 \*/ sum(QUANTITY_SOLD) from sales where channel_id = 5;
&nbsp;&nbsp;&nbsp; select /\* CONTROL_QUERY25 \*/ sum(QUANTITY_SOLD) from sales where channel_id = 9;
&nbsp;&nbsp;&nbsp; \


















---\-

1. SQL 튜닝 집합에 준하는 SQL Performance Analyzer 작업 생성
2. 초기 환경에서 SQL Tuning Set 재생
3 .변경된 환경에서 SQL Tuning Set 재생
4 .단계 2와 단계 3 비교
5 .비교 보고서 보기

결론

SPA는 데이터베이스에서 변경 작업을 수행하는 경우라면 어떠한 상황에서든 그 유용하다.
개별 SQL 구문의 실행 결과를 확인할 수 없는 Database Replay와 달리
특정 SQL 구문 또는 전체 애플리케이션 SQL 워크로드의 실행 결과를 비교하고 분석할 수 있습니다.
결과적으로 관리자는 변경 이전/이후의 장점과 단점을 비교하여 최적의 대안을 얻어낼 수 있다.
SPA는 관리자로 하여금 정확한 측정 결과를 바탕으로 결정을 내릴 수 있게 도와준다.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

참고 DBMS_SQLPA 팩키지
\






-\-

&nbsp; \






\- create_analysis_task - sql text format \


---\-
&nbsp; \-\- NAME:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; create_analysis_task - CRATE an ANALYSIS TASK in order to process
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and analyzer perfromance of a single SQL statement (sql text format)
&nbsp; \-\-
&nbsp; \-\- DESCRIPTION
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; This function is called to prepare the analysis of a single statement
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; given its text. The function mainly creates an advisor task and sets
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; its parameters.
&nbsp; \-\-
&nbsp; \-\- PARAMETERS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; sql_text&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IN) - text of a SQL statement
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; bind_list&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IN) - a set of bind values
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; parsing_schema (IN) - the username for who the statement will be tuned
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; task_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IN) - optional analysis task name
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; description&nbsp;&nbsp;&nbsp; (IN) - maximum of 256 SQL analysis description
&nbsp; \-\-
&nbsp; \-\- RETURNS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; SQL analysis task unique name
&nbsp; \-\-
&nbsp; \-\- EXCEPTIONS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; To be done
&nbsp; \


















\-

&nbsp; FUNCTION create_analysis_task(

&nbsp;&nbsp;&nbsp; sql_text&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN CLOB,
&nbsp;&nbsp;&nbsp; bind_list&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN sql_binds := NULL,
&nbsp;&nbsp;&nbsp; parsing_schema IN VARCHAR2&nbsp; := NULL,
&nbsp;&nbsp;&nbsp; task_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2&nbsp; := NULL,
&nbsp;&nbsp;&nbsp; description&nbsp;&nbsp;&nbsp; IN VARCHAR2&nbsp; := NULL)

&nbsp; RETURN VARCHAR2;

&nbsp; \





---\- create_analysis_task - sql_id format \



--\-
&nbsp; \-\- NAME:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; create_analysis_task - sql_id format
&nbsp; \-\-
&nbsp; \-\- DESCRIPTION
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; This function is called to prepare the analysis of a single statement
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; from the cursor cache given its identifier. The function mainly
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; creates an advisor task and sets its parameters.
&nbsp; \-\-
&nbsp; \-\- PARAMETERS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; sql_id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IN) - identifier of the statement
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; plan_hash_value (IN) - hash value of the sql execution plan
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; task_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IN) - optional analysis task name
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; description&nbsp;&nbsp;&nbsp;&nbsp; (IN) - maximum of 256 SQL analysis description
&nbsp; \-\-
&nbsp; \-\- RETURNS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; SQL analysis task unique name
&nbsp; \-\-
&nbsp; \-\- EXCEPTIONS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; To be done
&nbsp; \


















\-

&nbsp; FUNCTION create_analysis_task(

&nbsp;&nbsp;&nbsp; sql_id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2,
&nbsp;&nbsp;&nbsp; plan_hash_value IN NUMBER&nbsp;&nbsp; := NULL,
&nbsp;&nbsp;&nbsp; task_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2 := NULL,
&nbsp;&nbsp;&nbsp; description&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2 := NULL)

&nbsp; RETURN VARCHAR2;

&nbsp; \




-\- create_analysis_task - workload repository format \

---\-
&nbsp; \-\- NAME:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; create_analysis_task - workload repository format
&nbsp; \-\-
&nbsp; \-\- DESCRIPTION
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; This function is called to prepare the analysis of a single statement
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; from the workload repository given a range of snapshot identifiers.
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; The function mainly creates an advisor task and sets its parameters.
&nbsp; \-\-
&nbsp; \-\- PARAMETERS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; begin_snap&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IN) - begin snapshot identifier
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; end_snap&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IN) - end snapshot identifier
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; sql_id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IN) - identifier of the statement
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; plan_hash_value (IN) - plan hash value
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; task_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IN) - optional analysis task name
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; description&nbsp;&nbsp;&nbsp;&nbsp; (IN) - maximum of 256 SQL analysis description
&nbsp; \-\-
&nbsp; \-\- RETURNS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; SQL analysis task unique name
&nbsp; \-\-
&nbsp; \-\- EXCEPTIONS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; To be done
&nbsp; \


















\-

&nbsp; FUNCTION create_analysis_task(

&nbsp;&nbsp;&nbsp; begin_snap&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN NUMBER,
&nbsp;&nbsp;&nbsp; end_snap&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN NUMBER,
&nbsp;&nbsp;&nbsp; sql_id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2,
&nbsp;&nbsp;&nbsp; plan_hash_value IN NUMBER&nbsp;&nbsp; := NULL,
&nbsp;&nbsp;&nbsp; task_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2 := NULL,
&nbsp;&nbsp;&nbsp; description&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2 := NULL)

&nbsp; RETURN VARCHAR2;

&nbsp; \






-\- create_analysis_task - sqlset format \



\-
&nbsp; \-\- NAME:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; create_analysis_task - sqlset format
&nbsp; \-\-
&nbsp; \-\- DESCRIPTION:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; This function is called to prepare the analysis of a sql tuning set.
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; The function mainly creates an advisor task and sets its parameters.
&nbsp; \-\-
&nbsp; \-\- PARAMETERS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; sqlset_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IN) - sqlset name
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; basic_filter&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IN) - SQL predicate to filter the SQL from the STS
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; order_by&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IN) - an order-by clause on the selected SQL
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; top_sql&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IN) - top N SQL after filtering and ranking
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; task_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IN) - optional analysis task name
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IN) - maximum of 256 SQL analysis description
&nbsp; \-\-
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; sqlset_owner&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IN) - the owner of the sqlset, or null for current
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; schema owner
&nbsp; \-\-
&nbsp; \-\- RETURNS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; SQL analysis task unique name
&nbsp; \-\-
&nbsp; \-\- EXCEPTIONS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; To be done
&nbsp; \


















\-

&nbsp; FUNCTION create_analysis_task(

&nbsp;&nbsp;&nbsp; sqlset_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2 :=&nbsp; NULL,
&nbsp;&nbsp;&nbsp; basic_filter&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2 :=&nbsp; NULL,
&nbsp;&nbsp;&nbsp; order_by&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2 :=&nbsp; NULL,
&nbsp;&nbsp;&nbsp; top_sql&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN NUMBER&nbsp;&nbsp; :=&nbsp; NULL,
&nbsp;&nbsp;&nbsp; task_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2 :=&nbsp; NULL,
&nbsp;&nbsp;&nbsp; description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2 :=&nbsp; NULL,
&nbsp;&nbsp;&nbsp; sqlset_owner&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2 :=&nbsp; NULL)

&nbsp; RETURN VARCHAR2;

&nbsp; \







-\- set_analysis_task_parameter \




-\-
&nbsp; \-\- NAME:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; set_analysis_task_parameter - set sql analysis task parameter value
&nbsp; \-\-
&nbsp; \-\- DESCRIPTION:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; This procedure updates the value of a task analysis parameter
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; of type VARCHAR2. The possible analysis parameters that can be set
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; by this procedure are:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MODE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : analysis scope (comprehensive, limited)
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BASIC_FILTER&nbsp; : basic filter for sql analysis set
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PLAN_FILTER&nbsp;&nbsp; : plan filter for sql tuning set (see select_sqlset
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for possible values)
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RANK_MEASURE1 : first ranking measure for sql analysis set
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RANK_MEASURE2 : second possible ranking measure for sql analysis set
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RANK_MEASURE3 : third possible ranking measure for sql analysis set
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RESUME_FILTER : a extra filter for sts besides basic_filter
&nbsp; \-\-
&nbsp; \-\-
&nbsp; \-\- PARAMETERS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; task_name (IN) - identifier of the task to execute
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; parameter (IN) - name of the parameter to set
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; value&nbsp;&nbsp;&nbsp;&nbsp; (IN) - new value of the specified parameter
&nbsp; \-\-
&nbsp; \-\- RETURNS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; NONE
&nbsp; \-\-
&nbsp; \-\- EXCEPTIONS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; To be done
&nbsp; \


















\-

&nbsp; PROCEDURE set_analysis_task_parameter(
&nbsp;&nbsp;&nbsp; task_name IN VARCHAR2,
&nbsp;&nbsp;&nbsp; parameter IN VARCHAR2,
&nbsp;&nbsp;&nbsp; value&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2);

&nbsp; \







-\- set_analysis_task_parameter \




-\-
&nbsp; \-\- NAME:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; set_analysis_task_parameter - set sql analysis task parameter value
&nbsp; \-\-
&nbsp; \-\- DESCRIPTION:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; This procedure updates the value of a sql analysis parameter
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; of type NUMBER. The possible analysis parameters that can be set
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; by this procedure are:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DAYS_TO_EXPIRE&nbsp;&nbsp;&nbsp;&nbsp; : number of days until the task is deleted
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TIME_LIMIT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : global time out
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LOCAL_TIME_LIMIT&nbsp;&nbsp; : local time out
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SQL_LIMIT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : maximum number of sts statements to tune
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SQL_PERCENTAGE&nbsp;&nbsp;&nbsp;&nbsp; : percentage filter of sts statements
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXECUTE_COUNT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : multiple execution count to be used
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in the test execute. We intend to execute
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; them multiple times in test execute.
&nbsp; \-\-
&nbsp; \-\- PARAMETERS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; task_name (IN) - identifier of the task to execute
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; parameter (IN) - name of the parameter to set
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; value&nbsp;&nbsp;&nbsp;&nbsp; (IN) - new value of the specified parameter
&nbsp; \-\-
&nbsp; \-\- RETURNS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; NONE
&nbsp; \-\-
&nbsp; \-\- EXCEPTIONS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; To be done
&nbsp; \


















\-

&nbsp; PROCEDURE set_analysis_task_parameter(
&nbsp;&nbsp;&nbsp; task_name IN VARCHAR2,
&nbsp;&nbsp;&nbsp; parameter IN VARCHAR2,
&nbsp;&nbsp;&nbsp; value&nbsp;&nbsp;&nbsp;&nbsp; IN NUMBER);

&nbsp; \






--\- set_analysis_default_parameter \




-\-
&nbsp; \-\- NAME:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; set_analysis_default_parameter - set sql analysis task parameter
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default value
&nbsp; \-\-
&nbsp; \-\- DESCRIPTION:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; This procedure is called to update the DEFAULT value of an analyzer
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; parameter of type VARCHAR2.
&nbsp; \-\-
&nbsp; \-\- PARAMETERS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; parameter (IN) - name of the parameter to set
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; value&nbsp;&nbsp;&nbsp;&nbsp; (IN) - new value of the specified parameter
&nbsp; \-\-
&nbsp; \-\- RETURNS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; NONE
&nbsp; \-\-
&nbsp; \-\- EXCEPTIONS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; To be done
&nbsp; \


















\-

&nbsp; PROCEDURE set_analysis_default_parameter(
&nbsp;&nbsp;&nbsp; parameter IN VARCHAR2,
&nbsp;&nbsp;&nbsp; value&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2);

&nbsp; \






---\- set_analysis_default_parameter \




\-
&nbsp; \-\- NAME:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; set_analysis_default_parameter - set sql analysis task parameter
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default value
&nbsp; \-\-
&nbsp; \-\- DESCRIPTION:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; This procedure is called to update the default value of an analyzer
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; parameter of type NUMBER.
&nbsp; \-\-
&nbsp; \-\- PARAMETERS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; parameter (IN) - name of the parameter to set
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; value&nbsp;&nbsp;&nbsp;&nbsp; (IN) - new value of the specified parameter
&nbsp; \-\-
&nbsp; \-\- RETURNS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; NONE
&nbsp; \-\-
&nbsp; \-\- EXCEPTIONS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; To be done
&nbsp; \


















\-

&nbsp; PROCEDURE set_analysis_default_parameter(
&nbsp;&nbsp;&nbsp; parameter IN VARCHAR2,
&nbsp;&nbsp;&nbsp; value&nbsp;&nbsp;&nbsp;&nbsp; IN NUMBER);

&nbsp; \








\- execute_analysis_task \





\-
&nbsp; \-\- NAME:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; execute_analysis_task - execute a sql analysis task
&nbsp; \-\-
&nbsp; \-\- DESCRIPTION:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; This procedure is called to execute a previously created analysis task
&nbsp; \-\-
&nbsp; \-\- PARAMETERS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; task_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IN) - identifier of the task to execute
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; execution_type&nbsp;&nbsp;&nbsp;&nbsp; (IN) - type of the action to perform. Possible
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; values are: [TEST] EXECUTE (default),
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXPLAIN [PLAN],
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COMPARE [PERFORMANCE]
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If NULL it will default to the value of
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the DEFAULT_EXECUTION_TYPE parameter.
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; execution_name&nbsp;&nbsp;&nbsp;&nbsp; (IN) - A name to qualify and identify an execution.
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If not specified, it be generated by
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the advisor and returned by function.
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; execution_params&nbsp;&nbsp; (IN) - List of parameters (name, value) for
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the specified execution.
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Note that execution parameters are real
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; task parameters that have effect only on
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the execution they specified for.
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'buffer_gets * 10')
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; execution_desc&nbsp;&nbsp;&nbsp;&nbsp; (IN) - A 256-length string
&nbsp; \-\-
&nbsp; \-\- RETURNS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; The function version returns the name of the new execution
&nbsp; \


















\-
&nbsp; \-\- function flavor

&nbsp; FUNCTION execute_analysis_task(

&nbsp;&nbsp;&nbsp; task_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2,
&nbsp;&nbsp;&nbsp; execution_type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; := 'test execute',
&nbsp;&nbsp;&nbsp; execution_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; := NULL,
&nbsp;&nbsp;&nbsp; execution_params&nbsp;&nbsp;&nbsp; IN dbms_advisor.argList := NULL,
&nbsp;&nbsp;&nbsp; execution_desc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; := NULL)

&nbsp; RETURN VARCHAR2;

&nbsp; \-\- procedure flavor
&nbsp; PROCEDURE execute_analysis_task(

&nbsp;&nbsp;&nbsp; task_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2,
&nbsp;&nbsp;&nbsp; execution_type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; := 'test execute',
&nbsp;&nbsp;&nbsp; execution_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; := NULL,
&nbsp;&nbsp;&nbsp; execution_params&nbsp;&nbsp;&nbsp; IN dbms_advisor.argList := NULL,
&nbsp;&nbsp;&nbsp; execution_desc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; := NULL);

&nbsp; \








\- interrupt_analysis_task \




--\-
&nbsp; \-\- NAME:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; interrupt_analysis_task - interrupt a sql analysis task
&nbsp; \-\-
&nbsp; \-\- DESCRIPTION:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; This procedure interrupts the currently executing analysis task.
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; The task will end its operations as it would at a normal exit
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; so that the user will be able to access the intermediate results at
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; this point.
&nbsp; \-\-
&nbsp; \-\- PARAMETERS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; task_name (IN) - identifier of the task to execute
&nbsp; \


















\-

&nbsp; procedure interrupt_analysis_task(task_name IN VARCHAR2);

&nbsp; \








\- cancel_analysis_task \





-\-
&nbsp; \-\- NAME:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; cancel_analysis_task - cancel a sql analysis task
&nbsp; \-\-
&nbsp; \-\- DESCRIPTION:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; This procedure is called to cancel the currently executing analysis
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; task. All intermediate result data will be removed from the task.
&nbsp; \-\-
&nbsp; \-\- PARAMETERS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; task_name (IN) - identifier of the task to execute
&nbsp; \

















---\-

&nbsp; PROCEDURE cancel_analysis_task(task_name IN VARCHAR2);

&nbsp; \








\- reset_analysis_task \





-\-
&nbsp; \-\- NAME:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; reset_analysis_task - reset a sql analysis task
&nbsp; \-\-
&nbsp; \-\- DESCRIPTION:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; This procedure resets an analysis task to its initial state.
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; All intermediate result data will be deleted.&nbsp; Call this procedure on
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; a task that is not currently executing.
&nbsp; \-\-
&nbsp; \-\- PARAMETERS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; task_name (IN) - identifier of the task to reset
&nbsp; \


















\-

&nbsp; PROCEDURE reset_analysis_task(task_name IN VARCHAR2);

&nbsp; \








--\- drop_analysis_task \





-\-
&nbsp; \-\- NAME:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; drop_analysis_task - drop a sql analysis task
&nbsp; \-\-
&nbsp; \-\- DESCRIPTION:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; This procedure is called to drop a SQL analysis task.
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; The task and All its result data will be deleted.
&nbsp; \-\-
&nbsp; \-\- PARAMETERS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; task_name (IN) - identifier of the task to execute
&nbsp; \


















\-

&nbsp; PROCEDURE drop_analysis_task(task_name IN VARCHAR2);

&nbsp; \








\- resume_analysis_task \





-\-
&nbsp; \-\- NAME:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; resume_analysis_task - resume a sql analysis task
&nbsp; \-\-
&nbsp; \-\- DESCRIPTION:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; This procedure resumes a previously interrupted task execution.
&nbsp; \-\-
&nbsp; \-\- PARAMETERS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; task_name&nbsp;&nbsp;&nbsp; (IN) - identifier of the task to execute
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; basic_filter (IN) - a SQL predicate to filter the SQL from a STS.
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Note that this filter will be applied in
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; conjunction with the basic filter
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (i.e., parameter basic_filter) specified
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when calling create_analysis_task.
&nbsp; \-\- RETURNS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; NONE
&nbsp; \-\-
&nbsp; \-\- EXCEPTIONS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; To be done
&nbsp; \


















\-

&nbsp; PROCEDURE resume_analysis_task(
&nbsp;&nbsp;&nbsp; task_name&nbsp;&nbsp;&nbsp; IN VARCHAR2,
&nbsp;&nbsp;&nbsp; basic_filter IN VARCHAR2 := NULL);

&nbsp; \








--\- report_analysis_task \




---\-
&nbsp; \-\- NAME:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; report_analysis_task - report a SQL analysis task
&nbsp; \-\-
&nbsp; \-\- DESCRIPTION:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; This procedure is called to display the results of a analysis task.
&nbsp; \-\-
&nbsp; \-\- PARAMETERS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; task_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IN) - name of the task to report.
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IN) - type of the report.
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Possible values are: TEXT (default), HTML, XML.
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; level&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IN) - format of the recommendations. Possible values:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BASIC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - currently, same as typical
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TYPICAL(default)\- SQL with perf. changes+errors
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ALL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - details of all SQL
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IMPROVED&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - only improved SQL
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; REGRESSED&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - only regressed SQL
&nbsp; \--&nbsp;&n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;&nbsp;&nbsp;&nbsp; - SQL with errors only
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; section&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IN) - particular section in the report.
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Possible values are:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SUMMARY (default) - workload summary only
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ALL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - summary + details on SQL
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; object_id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IN) - identifier of the advisor framework object that
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; represents a given SQL in a tuning set (STS).
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; top_sql&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IN) - number of statements in a STS for which the
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; report is generated.
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; execution_name (IN) - name of the task execution to use. If NULL, the
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; report will be generated for the last task
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; execution.
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; task_owner&nbsp;&nbsp;&nbsp;&nbsp; (IN) - owner of the relevant analysis task.
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Defaults to the current schema owner.
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; order_by&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (IN) - how to sort SQL statements in the report
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (summary and body). Possible values are:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + NULL (default) : order by impact on workload
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + workload_impact: same as null
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + sql_impact&nbsp;&nbsp;&nbsp;&nbsp; : order by change impact on SQL
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + metric_delta/change_diff: order by change
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; difference in SQL perfomance in terms
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; of the Comparison Metric.
&nbsp; \-\- RETURNS
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; A clob containing the desired report.
&nbsp; \-\-
&nbsp; \-\- NOTE:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; So far order_by can be used only one report is generated for
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; a comparison and not for a single test execute or explain plan.
&nbsp; \


















\-

&nbsp; FUNCTION report_analysis_task(

&nbsp;&nbsp;&nbsp; task_name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2,
&nbsp;&nbsp;&nbsp; type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2 := 'text',
&nbsp;&nbsp;&nbsp; level&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2 := 'typical',
&nbsp;&nbsp;&nbsp; section&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2 := 'summary',
&nbsp;&nbsp;&nbsp; object_id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN NUMBER&nbsp;&nbsp; := NULL,
&nbsp;&nbsp;&nbsp; top_sql&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN NUMBER&nbsp;&nbsp; := 100,
&nbsp;&nbsp;&nbsp; execution_name IN VARCHAR2 := NULL,
&nbsp;&nbsp;&nbsp; task_owner&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2 := NULL,
&nbsp;&nbsp;&nbsp; order_by&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN VARCHAR2 := NULL)

&nbsp; RETURN clob;

&nbsp; \




















\-
&nbsp; \-\- NAME:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; get_sess_optimizer_env - get session optimizer env
&nbsp; \-\-
&nbsp; \-\- DESCRIPTION:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; This function is a callout function to get the compilation
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; environment from the session for a remote SPA trial. The CE
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; itself is returned in its compact linear representation as a
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; RAW data type.
&nbsp; \-\-
&nbsp; \-\- PARAMETERS:
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; NONE
&nbsp; \-\-
&nbsp; \-\- RETURNS
&nbsp; \--&nbsp;&nbsp;&nbsp;&nbsp; A raw containing the compilation environment
&nbsp; \-\-
&nbsp; \


















\-

&nbsp; FUNCTION get_sess_optimizer_env
&nbsp; RETURN RAW;

찾아보기&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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