TWP Oracle Database in Memory Advisor
TWP Oracle Database in Memory Advisor
TWP Oracle Database in Memory Advisor
June, 2016
Disclaimer
The following is intended to outline our general product direction. It is intended for information purposes
only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code,
or functionality, and should not be relied upon in making purchasing decisions. The development, release,
and timing of any features or functionality described for Oracles products remains at the sole discretion
of Oracle.
DBA_IMA_TASK_INFORMATION ............................................... 34
USER_IMA_BENEFIT_COST ..................................................... 35
USER_IMA_RECOMMENDATIONS ........................................... 35
USER_IMA_RECOMMENDATION_FILES .................................. 36
USER_IMA_RECOMMENDATION_LINES.................................. 36
USER_IMA_TASK_INFORMATION ............................................ 36
Appendix 3: AWR Augment Tables ................................................. 37
Appendix 4: Advisor Parameters ..................................................... 39
Intended Audience
Readers are assumed to have hands-on experience with Oracle Database technologies from
the perspective of a DBA or performance specialist.
Introduction
Oracle Database 12.1.0.2 introduced Oracle Database In-Memory allowing a single database
to efficiently support mixed analytic and transactional workloads. An Oracle Database
configured with Database In-Memory delivers optimal performance for transactions while
simultaneously supporting real-time analytics and reporting. This is possible due to a unique
"dual-format" architecture that enables data to be maintained in both the existing Oracle row
format, for OLTP operations, and a new purely in-memory column format, optimized for
analytical processing. In-Memory also enables both datamarts and data warehouses to provide
more ad-hoc analytics, giving end-users the ability to ask multiple business driving queries in
the same time it takes to run just one now.
For complete details about Oracle Database In-Memory, see the Oracle Database In-Memory
whitepaper and the Oracle Database In-Memory Page on oracle.com.
This paper discusses the Oracle Database In-Memory Advisor.
workload and makes specific recommendations regarding how to size Oracle Database InMemory and which objects would render the greatest benefit to your system when placed InMemory.
Elimination of user I/O waits, cluster transfer waits, buffer cache latch waits, etc.
The Advisor produces a recommendation report optimized for the In-Memory size you specify. If you omit the
In-Memory size, it defaults to the largest In-Memory size recommended by the Advisor based on its analysis.
Independent of the In-Memory size you specify, the top of the report lists a number of In-Memory sizes with
estimated performance benefits. With this information, you may choose a different In-Memory size. The rest of
the report shows recommendations optimized for the In-Memory size you choose.
It is not necessary to run the Advisor again to optimize for a different In-Memory size. Just generate a second
report specifying your revised In-Memory size, and the second report will provide recommendations optimized for
the revised In-Memory size. This can be done any number of times without re-running the Advisor from scratch,
saving a significant amount of time.
Once you have generated a report optimized for your chosen In-Memory size, the next section of the report lists
the SQL statements with the highest estimated performance benefit from the specified In-Memory size
optimization. Next in the report is a list of the objects which are recommended to be placed in the In-Memory
column store along with a recommended compression type for each object.
Along with the report, the Advisor also produces a SQLPLUS script to modify the recommended objects to place
them In-Memory with the recommended compression types.
This output is described in more detail in the Advisor Output section below.
Installation Process
It is recommended to log in as SYS to install the Advisor. When installing as a different user, the installation
process will cite any missing privileges. In addition, when installing the Advisor as a user other than SYS on
Oracle Database 12.1and1 and above, the installation process will describe additional required actions and
implications.
The Advisor can be installed into either a multitenant database or non-multitenant database. If installing into a
multitenant database, the Advisor can be installed in the root, CDB$ROOT, or in a pluggable database (PDB).
When installing the Advisor into a pluggable database (PDB), or a non-multitenant database, the installation
procedure will create a user IMADVISOR to contain the Advisor objects. When installing into the root of a
multitenant database, the CDB$ROOT, a user named C##IMADVISOR will be created.
The following procedure shows the installation from a non-multitenant database. The installation in a PDB would
be similar. If connected to the CDB$ROOT of a multitenant database, the prompts below would reflect the
C##IMADVISOR username.
To install the Advisor on your database (user entries are shown in bold and highlighted in yellow):
$ unzip imadvisor.zip
$ sqlplus sys/<password> as sysdba
SQL*Plus: Release 12.1.0.2.0 Production
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing
options
SQL> @instimadv
Welcome to the Oracle Database In-Memory Advisor (DBMS_INMEMORY_ADVISOR)
installation.
DBMS_INMEMORY_ADVISOR uses Active Session History (ASH), Automatic Workload
Repository (AWR) and optionally SQL Tuning Sets (STS) to determine which
errors.
errors.
errors.
errors.
All done!
DBMS_INMEMORY_ADVISOR installation successful.
Users who will use the DBMS_INMEMORY_ADVISOR package must be granted
the ADVISOR privilege.
This script creates and runs an In-Memory Advisor task that analyzes
your workload to determine an optimal In-Memory configuration.
If you have not yet created any tasks, the following list of existing tasks along with the explanation of creating
new tasks vs. using existing tasks will be omitted.
NOTE: You may specify one of your existing tasks if you wish to optimize for
a different In-Memory size.
Using an existing, executed task is faster than a new task since a new task
requires statistics gathering and analysis.
But if you wish to analyze a different workload or use a different statistics
capture window or add a SQLSET, you must specify a new task.
The following is a list of your existing tasks:
TASK_NAME
-----------------------------my_task1
my_task2
DATE_CREATED
-------------------2016-MAR-09 15:08:09
2016-MAR-09 15:09:20
If you specify an existing Advisor task name, all of the following information and prompts are omitted up to the
point where the performance benefit / cost estimates are presented after statistics gathering and analysis see
below.
Advisor task name specified: my_task3
New Advisor task will be named: my_task3...
The following prompt will be omitted if you have not imported any augmented AWR workloads.
By default, the Advisor runs against a live workload on this database.
This database also has imported, augmented AWR workloads.
Press ENTER or respond NO to run against a live workload.
Respond YES to run against an augmented AWR workload.
The following prompt for a PDB name is omitted unless you are running against a live workload on a CDB
root or an augmented AWR workload captured from a CDB root.
Enter value for pdb_name: CDB1_PDB1
CDB1_PDB1
The following prompt for a RAC instance number is omitted unless you are running against a live workload on
a multi-instance RAC or an augmented AWR workload captured from a multi-instance RAC.
Choose one of the following instance numbers for this workload:
INSTANCE_NUMBER DEFAULT_INSTANCE
--------------- ---------------1
*
2
Enter value for instance_number: 2
The In-Memory Advisor will analyze the workload from instance number 2.
Unless you initially specify an existing Advisor task name, the following In-Memory size description and
prompt is presented regardless of your previous choices.
The In-Memory Advisor optimizes the In-Memory configuration for a specific
In-Memory size that you choose.
After analysis, the In-Memory Advisor can provide you a list of performance
benefit estimates for a range of In-Memory sizes. You may then choose the
In-Memory size for which you wish to optimize.
If you already know the specific In-Memory size you wish, please enter
the value now. Format: nnnnnnn[KB|MB|GB|TB]
Or press <ENTER> to get performance estimates first.
Enter value for inmemory_size: <ENTER>
The In-Memory Advisor will display performance benefit estimates after
analysis.
Enter begin time for report:
------------
If you specify an existing Advisor task name at the start of this script, it will immediately go to this section with
the performance benefit / cost estimates.
If you specify an In-Memory size prior to statistics gathering and analysis, the following performance / cost
estimates are omitted .
The In-Memory Advisor estimates the following performance benefits:
________________________________________________________________________
|
|
|
ESTIMATED
ESTIMATED
|
|
ANALYTICS
ANALYTICS
|
|
PROCESSING
PROCESSING
|
|
PERCENTAGE
TIME
PERFORMANCE
|
|
IN-MEMORY OF MAXIMUM
REDUCTION
IMPROVEMENT
|
|
SIZE
SGA SIZE
(SECONDS)*
FACTOR*
|
|
--------- ---------- ---------------- ----------|
|
16.73GB
1673
653954
7.8X
|
|
15.89GB
1589
26394
1.0X
|
|
15.06GB
1506
26394
1.0X
|
|
14.22GB
1422
26394
1.0X
|
|
13.38GB
1338
26394
1.0X
|
|
12.55GB
1255
26394
1.0X
|
|
11.71GB
1171
26394
1.0X
|
|
10.87GB
1087
26394
1.0X
|
|
10.04GB
1004
26394
1.0X
|
|
9.201GB
920
26394
1.0X
|
|
8.364GB
836
26394
1.0X
|
|
7.528GB
753
26394
1.0X
|
|
6.692GB
669
26394
1.0X
|
|
5.855GB
586
26394
1.0X
|
|
5.019GB
502
26394
1.0X
|
|
4.182GB
418
26394
1.0X
|
|
3.346GB
335
26394
1.0X
|
|
2.509GB
251
26394
1.0X
|
|
1.673GB
167
26394
1.0X
|
|
856.5MB
84
26394
1.0X
|
|
|
| *Estimates: The In-Memory Advisor's estimates are useful for making |
| In-Memory decisions. But they are not precise. Due to performance |
| variations caused by workload diversity, the Advisor's performance |
| estimates are conservatively limited to no more than 10.0X
|
| faster.
|
|
|
|______________________________________________________________________|
Choose the In-Memory size you wish for optimization (default= 16.73GB):
Enter value for inmemory_size: <ENTER>
The In-Memory Advisor is optimizing for an In-Memory size of 16.73GB...
(You can re-run this task with this script and specify a different an InMemory size. Re-running a task to optimize for a different In-Memory size is
faster than creating and running a new task from scratch.)
Fetching recommendation files for task: my_task3
Placing recommendation files in: the current working directory
Fetched file: imadvisor_mytask3.html
Purpose:
recommendation report primary html page
Fetched file: imadvisor_tpch.sql
Purpose:
recommendation DDL sqlplus script
In the example above, the output files are listed as the generated report and the generated DDL script. The
contents of the output are described in the next section.
10
Advisor Output
The Advisor produces its output with the
DBMS_INMEMORY_ADVISOR.GENERATE_RECOMMENDATIONS procedure. That procedure
produces the following output:
imadvisor_TASKNAME.html
The Advisor summary report is called imadvisor_taskname.html where taskname is the name of the
task you gave the Advisor.
This report has several sections.
At the top is a summary of the Total Database Time analyzed in the report, and which percentage of that Database
Time can be ascribed to Analytics Processing.
The section labeled In-Memory sizes contains a table giving possible In-Memory sizes and the estimated benefit
from each of those In-Memory sizes. Based on this information, you may wish to generate another report with a
different In-Memory size. You can choose to optimize for any In-Memory you choose it need not be included
in the list.
Below this section there is a table summarizing the performance benefit of the SQL statements with the highest
estimated performance improvements with the optimization for the In-Memory size you specified. Click the All
SQL Statements link at the bottom of this table to view the estimated SQL performance benefits of all SQL
statements. (The Advisor omits this link when the number of SQL statements is 10 or less.)
Below this section there is a table summarizing the recommendations of the top objects to place in memory with
their recommended compression type and estimated benefit with the optimization for the In-Memory size you
specified. Click the All Objects link at the bottom of this table to view all recommended objects. (The Advisor
omits this link when the number of objects is 10 or less.) Click the Rationale Summary link to view a rationale
summary for the recommendations.
Finally, at the bottom of the report there is a table of information about the database for which the Advisor
optimized and a table describing the Advisors analysis methods. Click the DDL Script link to view DDL script
that will implement the recommendations (see file imadvisor_TASKNAME.sql ).
imadvisor_TASKNAME.sql
In addition to the html report, a script file is generated that contains the SQL which can be run on the target
database to modify the objects recommended to be placed In-Memory along with the recommended compression
types. If you wish, you can modify the DDL to fine tune non-default parameters. However, Oracle recommends
you do not remove or add objects or change the recommended compression types as these have been optimized
11
for the In-Memory size you specified. Changing the list of recommended objects or the recommended
compression types can be less than optimal. For an optimal In-Memory configuration for a different In-Memory
size, generate another Advisor report specifying the In-Memory size you wish.
12
CREATE_TASK Procedure
CREATE_TASK creates a DBMS_INMEMORY_ADVISOR task.
Syntax:
PROCEDURE create_task (
task_name
IN VARCHAR2,
task_desc
IN VARCHAR2
dbid
IN NUMBER
instance_number
IN NUMBER
pdb_name
IN VARCHAR2
:= NULL,
:= NULL,
:= NULL,
:= NULL);
Parameters:
PARAMETER
task_name
DESCRIPTION
task_desc
dbid
instance_number
13
pdb_name
The name of the PDB for which you desire in-memory recommendations.
This parameter only applies to a multi-tenant (CDB) database.
When executing this procedure against a workload in the current database
(using the default DBID):
If you are executing from within a CDB root, you must specify a
pdb_name and it must match one of the PDBs contained in the
current multi-tenant database.
Example:
EXEC dbms_inmemory_advisor.create_task ('MYTASK');
14
ADD_SQLSET Procedure
ADD_SQLSET adds a captured SQL Tuning Set to the specified task. Since ADD_STATISTICS captures the
SQL workload from the Automatic Workload Repository (AWR), addition of any SQL tuning sets is optional.
However, the AWR SQL workload contains only the hottest SQL statements (those that use the greatest amount
of resources). Therefore, a number of SQL statements may be omitted from the AWR SQL workload. Addition
of SQL Tuning Sets helps produce more accurate results when the AWR SQL workload is missing a large
percentage of the of the SQL workload. This is most likely to happen with a large number of distinct SQL
statements or with ad hoc queries.
After you have executed ADD_STATISTICS, you can call ASH_SQL_COVERAGE_PCT to determine if you
need to start over and add SQL tuning sets with broader SQL workload coverage.
Syntax:
PROCEDURE add_sqlset (
task_name
IN VARCHAR2,
sqlset_name
IN VARCHAR2,
sqlset_owner
IN VARCHAR2 := NULL);
Parameters:
PARAMETER
DESCRIPTION
task_name
sqlset_name
sqlset_owner
Usage Notes:
1.
2.
3.
Example:
EXEC dbms_inmemory_advisor.add_sqlset ('MYTASK', 'MYSQLSET', USER);
15
ADD_STATISTICS Procedure
ADD_ STATISTICS adds ASH and AWR and other statistics from the specified capture window to the specified
task. With a live workload (as opposed to an imported, augmented AWR workload), ADD_STATISTICS also
adds live ASH and other statistics for the specified capture window to the specified task. One statistic window
must be added prior to use of DBMS_INMEMORY_ADVISOR . EXECUTE_TASK.
Syntax:
PROCEDURE add_statistics (
task_name
IN VARCHAR2,
capture_window_start IN TIMESTAMP := NULL,
capture_window_end IN TIMESTAMP := NULL);
Parameters:
PARAMETER
DESCRIPTION
task_name
capture_window_start
The starting date and time for the capture window of ASH and AWR statistics to
be added to the task. By default or if you specify NULL, the window starts with
the oldest statistics available.
capture_window_end
The ending date and time for the capture window of ASH and AWR statistics to be
added to the task. By default or if you specify NULL, the window ends with
the newest statistics available.
Usage Notes:
1. Procedure CREATE_TASK must be executed prior to executing this procedure.
2. Execution of procedure ADD_SQLSET is optional. If ADD_SQLSET is to be executed, it must be
done prior to ADD_STATISTICS.
3. Statistics must be added once using either ADD_STATISTICS or ADD_HIST_STATISTICS prior to
executing EXECUTE_TASK. ADD_STATISTICS uses timestamps to define the capture window.
ADD_HIST_STATISTICS uses AWR snapshot identifiers to define the capture window.
4. A large capture window provides the Advisor with more data, which can result in more accurate
recommendations. However, more data takes more time to process. With a very large capture window,
the Advisor may run for a very long time.
Example:
EXEC dbms_inmemory_advisor.add_statistics ('MYTASK', SYSTIMESTAMP-60, SYSTIMESTAMP);
16
ADD_HIST_STATISTICS Procedure
ADD_ HIST_STATISTICS adds ASH and AWR and other statistics from the specified capture window to the
specified task. One statistic window must be added prior to use of DBMS_INMEMORY_ADVISOR .
EXECUTE_TASK.
Syntax:
PROCEDURE add_hist_statistics (
task_name
IN VARCHAR2,
start_snap_id
IN NUMBER := NULL,
end_snap_id
IN NUMBER := NULL);
Parameters:
PARAMETER
DESCRIPTION
task_name
start _snap_id
The starting AWR snapshot identifier for the capture window of ASH and AWR
statistics to be added to the task. By default or if you specify NULL, the window
starts with the oldest statistics available.
end_snap_id
The ending AWR snapshot identifier for the capture window of ASH and AWR
statistics to be added to the task. By default or if you specify NULL, the window
ends with the newest statistics available.
Usage Notes:
1. Procedure CREATE_TASK must be executed prior to executing this procedure.
2. Execution of procedure ADD_SQLSET is optional. If ADD_SQLSET is to be executed, it must be
done prior to ADD_HIST_STATISTICS.
3. Statistics must be added once using either ADD_STATISTICS or ADD_HIST_STATISTICS prior to
executing EXECUTE_TASK. ADD_STATISTICS uses timestamps to define the capture window.
ADD_HIST_STATISTICS uses AWR snapshot identifiers to define the capture window.
4. AWR snapshot identifiers and association time information are available in DBA_HIST_SNAPSHOT.
5. A large capture window provides the Advisor with more data, which can result in more accurate
recommendations. However, more data takes more time to process. With a very large capture window,
the Advisor may run for a very long time.
Example:
EXEC dbms_inmemory_advisor.add_hist_statistics ('MYTASK', 177, 282);
17
ASH_SQL_COVERAGE_PCT Function
ASH_SQL_COVERAGE_PCT returns the percentage (0-100) of ASH samples that are covered by SQL statistics.
If less than 50%, you may wish to start over with more SQL statistics by adding SQL tuning sets. If you have
already added SQL tuning sets, you may wish to do so again using longer capture windows..
Syntax:
FUNCTION ash_sql_coverage_pct (
task_name IN VARCHAR2) RETURN NUMBER;
Parameters:
PARAMETER
task_name
DESCRIPTION
Return value:
18
EXECUTE_TASK Procedure
EXECUTE_TASK analyzes the available data and statistics that have been added to the specified task.
Syntax:
PROCEDURE execute_task (
task_name
IN VARCHAR2);
Parameters:
PARAMETER
DESCRIPTION
task_name
Usage Notes:
Procedure CREATE_TASK and ADD_STATISTICS must be executed prior to executing this procedure
Example:
EXEC dbms_inmemory_advisor.execute_task ('MYTASK');
19
GENERATE_RECOMMENDATIONS Procedure
Generates a number of output files based upon the analysis of the specified task:
1.
2.
Syntax:
PROCEDURE generate_recommendations (
task_name
IN VARCHAR2,
directory_name
IN VARCHAR2 := DATA_PUMP_DIR,
inmemory_size
IN NUMBER := NULL,
single_page_report IN BOOLEAN := FALSE);
Parameters:
PARAMETER
DESCRIPTION
task_name
directory_name
The name of the Oracle directory object that is to be used for placement of the
recommendation files. An Oracle directory object defines a portal from the
database to a directory on the database server host.
The default is DATA_PUMP_DIR.
If you specify NULL, the recommendations are not placed in database server files.
However, the recommendations are always stored in the In-Memory Advisors
task data. See below for instructions on how to use the
imadvisor_fetch_recommendations.sql script to transfer the recommendations
from the In-Memory Advisors task data to files in a client directory.
inmemory_size
The size to be used for in-memory storage in bytes. The Oracle Database InMemory Advisor uses a default size as the largest recommended In-Memory size.
The top page of the generated report contains information to help you choose the
most suitable in-memory size. You can therefore first generate the report using
the default in-memory size. If you then decide to use a different in-memory size,
you can call GENERATE_RECOMMENDATIONS again, specifying the inmemory size you wish.
single_page_report
If set to TRUE, the report will be generated as a single html file. By default, the
report will be generated as multiple html files to which the top html page connects
via html links. Regardless of a single page or multiple html pages, the name of
the html file to open with your browser is imadvisor_task-name.html, where taskname is the name of your Advisor task.
20
Usage Notes:
1.
2.
You can either place the recommendation files in a database server directory using the
directory_name parameter or you can fetch the recommendations into the current working directory
on the client using the imadvisor_fetch_recommendations.sql script after executing
GENERATE_RECOMMENDATIONS. To do the latter, you must have write privileges on the
clients current working directory.
3.
Example 1:
-- Place the recommendations in the current working directory on the
-- client.
EXEC dbms_inmemory_advisor.generate_recommendations
('MYTASK', NULL, 50000000000);
@imadvisor_fetch_recommendations
Enter value for task_name: MYTASK
HOST firefox imadvisor_MYTASK.html
@imadvisor_MYTASK.sql
Example 2:
------
CREATE DIRECTORY
my_directory
/scratch/my_oracle_dir/;
EXEC dbms_inmemory_advisor.generate_recommendations
('MYTASK', my_directory, 50000000000);
HOST firefox /net/orasvr/scratch/my_oracle_dir/imadvisor_MYTASK.html
@/net/orasvr/scratch/my_oracle_dir/imadvisor_MYTASK.sql
21
DROP_TASK Procedure
DROP_TASK drops a DBMS_INMEMORY_ADVISOR task.
Syntax:
PROCEDURE drop_task (
task_name
IN VARCHAR2,
force
IN BOOLEAN := FALSE);
Parameters:
PARAMETER
task_name
DESCRIPTION
force
By default, drop_task will not drop an active task. However, if a task hangs or if
the database is shut down while the task is running, the task can be left an active
state. To drop a task in this state, specify FORCE=>TRUE.
Example:
EXEC dbms_inmemory_advisor.drop_task ('MYTASK');
22
SET_PARAMETER Procedure
Sets an Advisor parameter. The available parameters are described in Appendix 4.
Syntax:
PROCEDURE set_parameter (
parameter_name
IN VARCHAR2,
parameter_value
IN NUMBER,
task_name
IN VARCHAR2 := NULL);
Parameters:
PARAMETER
DESCRIPTION
parameter_name
parameter_value
task_name
Usage Notes:
1.
Example:
DBMS_INMEMORY_ADVISOR.SET_PARAMETER
('INMEMORY_READ_PERF_FACTOR', 15.0); -- set for all tasks
DBMS_INMEMORY_ADVISOR.SET_PARAMETER
('INMEMORY_CPU_PERF_FACTOR', 3.0, 'my_task'); -- set for my_task only
23
GET_PARAMETER Function
Returns an Advisor parameter value. The available parameters are described in Appendix 4.
Syntax:
FUNCTION get_parameter (
parameter_name
IN VARCHAR2,
task_name
IN VARCHAR2 := NULL);
Parameters:
PARAMETER
DESCRIPTION
parameter_name
The name of the parameter for which the current setting is to be obtained.
task_name
Example:
irpf := DBMS_INMEMORY_ADVISOR.GET_PARAMETER
('INMEMORY_READ_PERF_FACTOR'); -- obtain default value for all tasks
icpf := DBMS_INMEMORY_ADVISOR.SET_PARAMETER
('INMEMORY_CPU_PERF_FACTOR', my_task); -- obtain value from my_task
24
RESET_PARAMETERS Procedure
Resets all Oracle Database In-Memory Advisor parameters to their original default settings.
Syntax:
PROCEDURE reset_parameters (
task_name
IN VARCHAR2 := NULL);
Parameters:
PARAMETER
DESCRIPTION
task_name
Name of the task for which the parameter settings are to be reset.
If you omit task_name or specify it as NULL, the default parameter settings will be
reset for all Oracle Database In-Memory Advisor tasks that have not had taskspecific parameter settings.
Usage Notes:
1.
Example:
DBMS_INMEMORY_ADVISOR.RESET_PARAMETERS
('my_task'); -- reset for my_task
DBMS_INMEMORY_ADVISOR.RESET_PARAMETERS(); -- reset for all tasks
25
dbms_inmemory_advisor.generate_recommendations ('my_task');
END;
/
DEFINE task_name='my_task';
@imadvisor_fetch_recommendations.sql
HOST firefox imadvisor_my_task.html
@imadvisor_my_task.sql
PROMPT All done!
26
Column Name
Description
Data Type
augment_schema
VARCHAR2(128)
augment_date
DATE
augment_enabled
To disable an augment:
UPDATE <augment_schema> .
imadvisor_awr_augment SET augment_enabled =
N;
COMMIT;
UPDATE <augment_schema> .
27
VARCHAR2(30)
imadvisor_awr_augment_buildnum
NUMBER
awr_loaded
VARCHAR2(1)
VARCHAR2(1)
NUMBER
db_name
VARCHAR2(30)
db_created
DATE
instance_number
NUMBER
instance_name
VARCHAR2(30)
instance_version
VARCHAR2(30)
instance
VARCHAR2(80)
28
_version_banner
compatible
_version
VARCHAR2(30)
VARCHAR2(1024)
sga_max_size
NUMBER
inmemory_size
NUMBER
inmemory
_unused_space
NUMBER
ash_sample
_interval
NUMBER
ash_diskfilter
_ratio
NUMBER
db_supports
_inmemory
VARCHAR2(1)
29
VARCHAR2(1)
DBA_IMA_BENEFIT_COST
View dba_ima_benefit_cost shows the estimated performances improvements for a list of In-Memory
sizes:
Column Name
Description
Data Type
owner
VARCHAR2(30)
task_name
VARCHAR2(30)
inmemory_size_bytes
NUMBER
inmemory_size
VARCHAR2(10)
is_user_specified_size
VARCHAR2(1)
VARCHAR2(1)
incremental steps of the largest recommended InMemory size. N indicates is not one of the 5%
incremental steps.
Both the is_user_specified_size and the
is_incremental_step_size columns can be Y. But
only one of these columns can be N.
pct_max_recommended_imsize
NUMBER
pct_sga_max_size
NUMBER
30
setting.
est_reduced_analytics_secs
NUMBER
est_perf_improvement_factor
VARCHAR2(1000)
DBA_IMA_RECOMMENDATIONS
Column Name
Description
Data Type
task_id
NUMBER
task_owner
VARCHAR2(30)
task_name
VARCHAR2(30)
object_id
NUMBER
table_owner
VARCHAR2(128)
table_name
VARCHAR2(128)
table_partitioning_level
VARCHAR2(10)
VARCHAR2(128)
subpartition_name
The name of the subpartition which is the InMemory placement candidate. NULL if the
candidate is a full partition or a full table.
VARCHAR2(128)
partition_type
VARCHAR2(10)
subpartition_type
VARCHAR2(10)
31
tables.
non_im_dbtime_secs
NUMBER
uncompressed_bytes
NUMBER
compression_type
NUMBER
8192: COMP_INMEMORY_NOCOMPRESS
16384: COMP_INMEMORY_DML
32768: COMP_INMEMORY_QUERY_LOW
65536: COMP_INMEMORY_QUERY_HIGH
131072: COMP_INMEMORY_CAPACITY_LOW
262144: COMP_INMEMORY_CAPACITY_HIGH
Each candidate object is considered with each InMemory compression type.
est_compression_factor
NUMBER
COMP_FACTOR_NOCOMPRESS, default=1
COMP_FACTOR_DML, default=3
COMP_FACTOR_QUERY_LOW, default=4
COMP_FACTOR_QUERY_HIGH, default=6
COMP_FACTOR_CAPACITY_LOW, default=8
COMP_FACTOR_CAPACITY_HIGH, default=10
est_compressed_bytes
NUMBER
est_reduced_dbtime_secs
NUMBER
est_reduced_dbtime_pct
NUMBER
recommended_with_im_size_gte
NUMBER
32
recommended_with_im_size_lt
NUMBER
rationale
VARCHAR2(4000)
rank
NUMBER
status
VARCHAR2(8)
DBA_IMA_RECOMMENDATION_FILES
Column Name
Description
Data Type
owner
VARCHAR2(30)
task_name
VARCHAR2(30)
file_name
VARCHAR2(100)
file_contents
CLOB
DBA_IMA_RECOMMENDATION_LINES
Column Name
Description
Data Type
owner
VARCHAR2(30)
task_name
VARCHAR2(30)
file_name
VARCHAR2(100)
33
file_line_number
NUMBER
file_line
VARCHAR2(4000)
DBA_IMA_TASK_INFORMATION
Column Name
Description
Data Type
owner
VARCHAR2(30)
task_name
VARCHAR2(30)
description
VARCHAR2(4000)
dbid
NUMBER
instance_number
NUMBER
pdb_name
VARCHAR2(128)
state
VARCHAR2(30)
The last public interface that was run with this task:
create_task
add_sqlset
add_statistics
add_hist_statistics
ash_sql_coverage_pct
execute_task
generate_recommendations
34
VARCHAR2(30)
stats_added
CHAR(1)
sqlset_added
CHAR(1)
executed
CHAR(1)
report_generated
CHAR(1)
date_created
This column shows the date and time this task was
created.
DATE
date_modified
DATE
statistics_window_start
TIMESTAMP(3)
statistics_window_end
TIMESTAMP(3)
total_dbtime_secs
NUMBER
total_analytics_secs
NUMBER
USER_IMA_BENEFIT_COST
This view is the same as DBA_IMA_BENEFIT_COST except it only shows tasks owned by the current user and
it does not include the OWNER column.
USER_IMA_RECOMMENDATIONS
This view is the same as DBA_IMA_RECOMMENDATIONS except it only shows tasks owned by the current
user and it does not include the TASK_OWNER column.
35
USER_IMA_RECOMMENDATION_FILES
This view is the same as DBA_IMA_RECOMMENDATION_FILES except it only shows tasks owned by the
current user and it does not include the OWNER column.
USER_IMA_RECOMMENDATION_LINES
This view is the same as DBA_IMA_RECOMMENDATION_LINES except it only shows tasks owned by the
current user and it does not include the OWNER column.
USER_IMA_TASK_INFORMATION
This view is the same as DBA_IMA_TASK_INFORMATION except it only shows tasks owned by the current
user and it does not include the OWNER column.
36
Database 12.1
cdb_objects (owner, object_name, subobject_name, object_type, object_id, data_object_id, temporary, con_id)
cdb_sqlset (owner, name, id, created, last_modified, statement_count, con_dbid,con_id)
cdb_sqlset_plans (sqlset_id, sql_id, force_matching_signature, plan_hash_value, id, cardinality, operation, options,
object_instance, object_owner, object_name, object_type, optimizer, con_dbid, con_id)
cdb_tables (owner, table_name, blocks, avg_row_len, num_rows, empty_blocks, compression, compress_for,
con_id)
cdb_part_tables (owner, table_name, partitioning_type, subpartitioning_type, partition_count,
def_subpartition_count, def_compression, def_compress_for, con_id)
cdb_tab_partitions (table_owner, table_name, partition_name, avg_row_len, num_rows, blocks, composite,
subpartition_count, empty_blocks, compression, compress_for, con_id)
cdb_tab_subpartitions (table_owner, table_name, partition_name, subpartition_name, avg_row_len, num_rows,
blocks, empty_blocks, compression, compress_for, con_id
dba_users (user_id, username, con_id)
cdb|dba}_sqlset (
'||clone_column ('cdb_sqlset', 'con_id', 'NUMBER')||',
37
38
Parameter Name
Description
Default
Value
INMEMORY_READ_PERF_FACTOR
10.0
0.9
2.0
1.05
39
65536
40
41
June, 2016
Author: Jack Raitto, Kurt Engeleiter
Contributing Authors:
This document is provided for information purposes only, and the contents hereof are subject to change without notice. This document
is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in law,
including implied warranties and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any liability
Oracle Corporation
with respect to this document, and no contractual obligations are formed either directly or indirectly by this document. This document
World Headquarters
may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without our prior written
permission.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Worldwide Inquiries:
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and
Phone: +1.650.506.7000
are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are
Fax: +1.650.506.7200
trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group. 0113
oracle.com
42