Statistics Collection Enhancements

on Monday, June 30, 2008

Pending Statistics

In previous database versions, new optimizer statistics were automatically published when they were gathered. In 11g this is still the default action, but you now have the option of keeping the newly gathered statistics in a pending state until you choose to publish them.

The DBMS_STATS.GET_PREFS function allows you to check 'PUBLISH' attribute to see if statistics are automatically published. The default value of TRUE means they are automatically published, while FALSE indicates they are held in a pending state.


SQL> SELECT DBMS_STATS.get_prefs('PUBLISH') FROM dual;
DBMS_STATS.GET_PREFS('PUBLISH')
-------------------------------------------
TRUE

1 row selected.

The 'PUBLISH' attribute is reset using the DBMS_STATS.SET_TABLE_PREFS procedure.

-- New statistics for SCOTT.EMP are kept in a pending state.
EXEC DBMS_STATS.set_table_prefs('SCOTT', 'EMP', 'PUBLISH', 'false');

-- New statistics for SCOTT.EMP are published immediately.
EXEC DBMS_STATS.set_table_prefs('SCOTT', 'EMP', 'PUBLISH', 'true');

Pending statistics are visible using the
[DBAALLUSER]_TAB_PENDING_STATS and
[DBAALLUSER]_IND_PENDING_STATS views.

The DBMS_STATS package allows you to publish or delete pending statistics, as show below.

-- Publish all pending statistics.
EXEC DBMS_STATS.publish_pending_stats(NULL, NULL);

-- Publish pending statistics for a specific object.
EXEC DBMS_STATS.publish_pending_stats('SCOTT','EMP');

-- Delete pending statistics for a specific object.
EXEC DBMS_STATS.delete_pending_stats('SCOTT','EMP');

The optimizer is capable of using pending statistics if the OPTIMIZER_PENDING_STATISTICS initialization parameter, which defaults to FALSE, is set to TRUE. Setting this parameter to TRUE at session level allows you to test the impact of pending statistics before publishing them.

ALTER SESSION SET OPTIMIZER_PENDING_STATISTICS=TRUE;

Pending statistics can be transfered between database by exporting this using the DBMS_STATS.EXPORT_PENDING_STATS procedure.

Extended Statistics

Multi-Column StatisticsIndividual column statistics are fine for working out the selectivity of a specific column in a where clause, but when the where clause includes multiple columns from the same table, the individual column statistics provide no indication of the relationship between the columns. This makes working out the selectivity of the column group very difficult.

Oracle uses workload analysis to generate column groups, but they can also be manipulated manually using the DBMS_STATS package. The CREATE_EXTENDED_STATS procedure is use to explicitly create multi-column statistics.

-- Create a columnn group based on EMP(JOB,DEPTNO).
DECLARE
l_cg_name VARCHAR2(30);
BEGIN
l_cg_name := DBMS_STATS.create_extended_stats(ownname => 'SCOTT',
tabname => 'EMP',
extension => '(JOB,DEPTNO)');
END;
/

PL/SQL procedure successfully completed.

The column group name is returned using the SHOW_EXTENDED_STATS_NAME function.

-- Display the name of the columnn group.
SELECT DBMS_STATS.show_extended_stats_name(ownname => 'SCOTT',
tabname => 'EMP',
extension =>'(JOB,DEPTNO)')AS cg_name
FROM dual;

CG_NAME
------------------------------
SYS_STU3VG629OEYG6FN0EKTGV_HQ6

1 row selected.

Manually created column groups can be deleted using the DROP_EXTENDED_STATS procedure.

-- Drop the columnn group.
BEGIN
dbms_stats.drop_extended_stats(ownname => 'SCOTT',
tabname => 'EMP',
extension => '(JOB,DEPTNO)');
END;
/

PL/SQL procedure successfully completed.

Setting the METHOD_OPT parameter to "FOR ALL COLUMNS SIZE AUTO" allows the GATHER_% procedures to gather statistics on all existing column groups for the specified object.

BEGIN
DBMS_STATS.gather_table_stats(
'SCOTT',
'EMP',
method_opt => 'for all columns size auto');
END;
/

Alternatively, set the METHOD_OPT parameter to "FOR COLUMNS (column-list)" and the group will automatically be created during the statistics gathering.

BEGIN
DBMS_STATS.gather_table_stats(
'SCOTT',
'EMP',
method_opt => 'for columns (job,mgr)');
END;
/

The [DBAALLUSER]_STAT_EXTENSIONS views display information about the multi-column statistics.

COLUMN extension FORMAT A30

SELECT extension_name, extension
FROM dba_stat_extensions
WHERE table_name = 'EMP';

EXTENSION_NAME EXTENSION
------------------------------ ------------------------------
SYS_STU3VG629OEYG6FN0EKTGV_HQ6 ("JOB","DEPTNO")
SYS_STULPA1A#B6YL4KQ59DQO3OADQ ("JOB","MGR")

2 rows selected.

COLUMN col_group FORMAT A30

SELECT e.extension col_group,
t.num_distinct,
t.histogram
FROM dba_stat_extensions e
JOIN dba_tab_col_statistics t
ON e.extension_name=t.column_name
AND t.table_name = 'EMP';

COL_GROUP NUM_DISTINCT HISTOGRAM
------------------------------ ------------ ---------------
("JOB","DEPTNO") 9 FREQUENCY
("JOB","MGR") 8 FREQUENCY

2 rows selected.

Expression Statistics

The optimizer has no idea what the affect of applying a function to column has on the selectivity of the column. Using a similar method to multi-column statistics, we can gather expression statistics to provide more information.

Expression statistics can be created explicitly using the CREATE_EXTENDED_STATS procedure, or implicitly by specifying the expression in the METHOD_OPT parameter of the GATHER_% procedures when gathering statistics.

DECLARE
l_cg_name VARCHAR2(30);
BEGIN
-- Explicitly created.
l_cg_name := DBMS_STATS.create_extended_stats(ownname => 'SCOTT',
tabname => 'EMP',
extension => '(LOWER(ENAME))');
-- Implicitly created.
DBMS_STATS.gather_table_stats(
'SCOTT',
'EMP',
method_opt => 'for columns (upper(ename))');
END;
/

Setting the METHOD_OPT parameter to "FOR ALL COLUMNS SIZE AUTO" allows the GATHER_% procedures to gather existing expression statistics.

BEGIN
DBMS_STATS.gather_table_stats(
'SCOTT',
'EMP',
method_opt => 'for all columns size auto');
END;
/

The [DBAALLUSER]_STAT_EXTENSIONS views display information about the expression statistics, as well as the multi-column statistics.

COLUMN extension FORMAT A30

SELECT extension_name, extension
FROM dba_stat_extensions
WHERE table_name = 'EMP';

EXTENSION_NAME EXTENSION
------------------------------ ------------------------------
SYS_STU3VG629OEYG6FN0EKTGV_HQ6 ("JOB","DEPTNO")
SYS_STULPA1A#B6YL4KQ59DQO3OADQ ("JOB","MGR")
SYS_STU2JLSDWQAFJHQST7$QK81_YB (LOWER("ENAME"))
SYS_STUOK75YSL165W#_X8GUYL0A1X (UPPER("ENAME"))

4 rows selected.

SQL>

COLUMN col_group FORMAT A30


SELECT e.extension col_group,
t.num_distinct,
t.histogram
FROM dba_stat_extensions e
JOIN dba_tab_col_statistics t ON e.extension_name=t.column_name
AND t.table_name = 'EMP';

COL_GROUP NUM_DISTINCT HISTOGRAM
------------------------------ ------------ ---------------
("JOB","DEPTNO") 9 NONE
("JOB","MGR") 8 NONE
(LOWER("ENAME")) 14 NONE
(UPPER("ENAME")) 14 NONE

4 rows selected.

Expression statistics are dropped using the DROP_EXTENDED_STATS procedure.

-- Drop the columnn group.
BEGIN
dbms_stats.drop_extended_stats(ownname => 'SCOTT',
tabname => 'EMP',
extension => '(UPPER(ENAME))');
END;
/
PL/SQL procedure successfully completed.

Enhanced Statistics Collection for Partitioned Objects

Oracle 11g includes improvements to statistics collection for partitioned objects so untouched partitions are not rescanned. This significantly increases the speed of statistics collection on large tables where some of the partitions contain static data. Where partition exchange load (PEL) is used to add data to the a table, only the newly added partition must be scanned to update the global statistics.

Automated Database Maintenance Task Management (ADMTM)

on Sunday, June 29, 2008

Introduction

Oracle 11g includes three automated database maintenance tasks:
  • Automatic Optimizer Statistics Collection
    Gathers stale or missing statistics for all schema objects. The task name is 'auto optimizer stats collection'.
  • Automatic Segment Advisor
    Identifies segments that could be reorganized to save space
    . The task name is 'auto space advisor'.

  • Automatic SQL Tuning Advisor
    Identifies and attempts to tune high load SQL
    . The task name is 'sql tuning advisor'.

These tasks run during maintenance windows scheduled to open over night. Configuration of the maintenance tasks, their schedules and resource usage is possible using Enterprise Manager or PL/SQL APIs.

The "Automated Maintenance Tasks" screen displays the maintenance window for each task (Server > Automated Maintenance Tasks (link under Scheduler section)). Click the "Configure" button to navigate to the configuration screens.


Basic Task Configuration

The "Automated Maintenance Tasks Configuration" screen is the stating point for all maintenance task configuration.

The "Global Status" switch allows you to turn enable or disable all automated tasks for all maintenance windows.




The DISABLE and ENABLE procedures of the DBMS_AUTO_TASK_ADMIN package achieve the same result if they are called with no parameters.


EXEC DBMS_AUTO_TASK_ADMIN.disable;
EXEC DBMS_AUTO_TASK_ADMIN.enable;


The "Task Settings" section allows you to enable or disable individual tasks from all maintenance windows.




This can be done using the DBMS_AUTO_TASK_ADMIN package by specifying the task name in the CLIENT_NAME parameter of the DISABLE and ENABLE procedures.


BEGIN
DBMS_AUTO_TASK_ADMIN.disable(
client_name => 'auto space advisor',
operation => NULL,
window_name => NULL);
END;/

BEGIN
DBMS_AUTO_TASK_ADMIN.enable(
client_name => 'auto space advisor',
operation => NULL, window_name => NULL);
END;
/

The "Maintenance Window Group Assignment" section provides the most granular level of control. It allows tasks to be removed or added to individual maintenance windows.


This can be done using the DBMS_AUTO_TASK_ADMIN package by specifying the CLIENT_NAME and WINDOW_NAME parameters of the DISABLE and ENABLE procedures.


BEGIN
DBMS_AUTO_TASK_ADMIN.disable(
client_name => 'auto optimizer stats collection',
operation => NULL,
window_name => 'MONDAY_WINDOW');

DBMS_AUTO_TASK_ADMIN.disable(
client_name => 'auto space advisor',
operation => NULL,
window_name => 'MONDAY_WINDOW');

DBMS_AUTO_TASK_ADMIN.disable(
client_name => 'sql tuning advisor',
operation => NULL,
window_name => 'MONDAY_WINDOW');
END;
/


Task Parameter Configuration

The "Task Settings" section of the "Automated Maintenance Tasks Configuration" screen includes two "Configure" buttons.



The "Configure" button next to the "Optimizer Statistics Gathering" task takes you to the "Global Statistics Gathering Options" screen.



With the exception of the history retention, these settings can all be altered with the SET_GLOBAL_PREFS procedure in the DBMS_STATS package.


EXEC DBMS_STATS.alter_stats_history_retention(90);
EXEC DBMS_STATS.set_global_prefs('estimate_percent', '5');


The "Configure" button next to the "Automatic SQL Tuning" task takes you to the "Automatic SQL Tuning Settings" screen.



These settings can all be altered with the SET_TUNING_TASK_PARAMETER procedure in the DBMS_SQLTUNE package.

BEGIN

DBMS_SQLTUNE.set_tuning_task_parameter
('SYS_AUTO_SQL_TUNING_TASK','LOCAL_TIME_LIMIT', 1200);

DBMS_SQLTUNE.set_tuning_task_parameter
('SYS_AUTO_SQL_TUNING_TASK','ACCEPT_SQL_PROFILES', 'FALSE');

DBMS_SQLTUNE.set_tuning_task_parameter
('SYS_AUTO_SQL_TUNING_TASK','MAX_SQL_PROFILES_PER_EXEC', 20);

DBMS_SQLTUNE.set_tuning_task_parameter
('SYS_AUTO_SQL_TUNING_TASK','MAX_AUTO_SQL_PROFILES', 10000);

END;
/

Maintenance Window Configuration

The maintenance windows are defined using the Oracle Scheduler. Oracle provide a separate active maintenance window for each day, with all windows collected into a window group called "MAINTENANCE_WINDOW_GROUP". Clicking the "Edit Window Group" button on the "Automated Maintenance Tasks Configuration" screen allows you to view and modify the window group.



The whole window group can be enabled or disabled using this screen, or using the ENABLE and DISABLE procedures in the DBMS_SCHEDULER package.

BEGIN
DBMS_SCHEDULER.disable(
name => 'SYS.MAINTENANCE_WINDOW_GROUP',
force => TRUE);
DBMS_SCHEDULER.enable(
name => 'SYS.MAINTENANCE_WINDOW_GROUP');
END;
/

Clicking on the window name on this screen, or in the "Automated Maintenance Tasks Configuration" screen, takes you to the "View Windows" screen, which gives you a summary of the window configuration.



Click the "Edit" button alter the window definition.



These configuration changes can be performed using the SET_ATTRIBUTE procedure of the DBMS_SCHEDULER package.

BEGIN
DBMS_SCHEDULER.disable(name => 'SYS.MONDAY_WINDOW', force => TRUE);

DBMS_SCHEDULER.set_attribute(
name => 'SYS.MONDAY_WINDOW',
attribute => 'DURATION',
value => numtodsinterval(180, 'minute'));

DBMS_SCHEDULER.enable(name=>'SYS.MONDAY_WINDOW');
END;
/


If you wish to create additional maintenance windows, make sure they are assigned to the "MAINTENANCE_WINDOW_GROUP" window group.

Resource Plan Configuration

The "Edit Window" screen includes "View Resource Plan" and "Create Resource Plan" buttons. These buttons take you to the resource manager maintenance screens. All maintenance windows are assigned to the "DEFAULT_MAINTENANCE_PLAN" resource plan by default.



If necessary, you can edit this plan, or create a new plan.



If you create a new resource plan, you need assign it to the relevant maintenance windows in the "Edit Window" screen, or using the DBMS_SCHEDULER package.

BEGIN
DBMS_SCHEDULER.disable(name => 'SYS.MONDAY_WINDOW', force => TRUE);

DBMS_SCHEDULER.set_attribute(
name => 'SYS.MONDAY_WINDOW',
attribute => 'RESOURCE_PLAN',
value => 'MY_NEW_PLAN');

DBMS_SCHEDULER.enable(name=>'SYS.MONDAY_WINDOW');
END;
/


Relevant Views

The following views display information related to the automated database maintenance tasks:

  • DBA_AUTOTASK_CLIENT_JOB
  • DBA_AUTOTASK_CLIENT
  • DBA_AUTOTASK_JOB_HISTORY
  • DBA_AUTOTASK_WINDOW_CLIENTS
  • DBA_AUTOTASK_CLIENT_HISTORY

Oracle 11g Features

on Thursday, June 26, 2008

DBA Features

Interval partitioning for tables

This is a new 11g partitioning scheme that automatically creates time-based partitions as new data is added. This is a marvelous one ! You can now partition by date, one partition per month for example, with automatic partition creation.

New load balancing utilities

There are several new load balancing utilities in 11g (first introduced in 10gr2):

Web server load balancing

The web cache component includes Apache extension to load-balance transactions to the least-highly-loaded Oracle HTTP server (OHS).

RAC instance load balancing

Staring in Oracle 10g release 2, Oracle JDBC and ODP.NET provide connection pool load balancing facilities through integration with the new load balancing advisory tool. This replaces the more-cumbersome listener-based load balancing technique.

Automated Storage Load balancing

Automatic Storage Management (SAM) now enables a single storage pool to be shared by multiple databases for optimal load balancing. Shared disk storage resources can alternatively be assigned to individual databases and easily moved from one database to another as processing requirements change.

Data Guard Load Balancing

Oracle Data Guard allows for load balancing between standby databases.

Listener Load Balancing

If advanced features such as load balancing and automatic failover are desired, there are optional sections of the listener.ora file that must be present.

New table Data Type simple_integer

A new 11g datatype dubbed simple_integer is introduced. The simple_integer data type is always NOT NULL, wraps instead of overflows and is faster than PLS_INTEGER.

Improved table/index compression

Segment compression now works for all DML, not just direct-path loads, so you can create tables compressed and use them for regular OLTP work. Also supports column add/drop.

Faster DML triggers

DML triggers are up to 25% faster. This especially impacts row level triggers doing updates against other tables (think Audit trigger).

Improved NFS data file management

Kevin Closson has some great notes on Oracle 11g improvement in Networked Attached Storage (NAS). �I�ve already blogged that 11g might have an Oracle-provided NFS client. Why is this? It�s because Oracle knows full well that taking dozens of commodity servers and saddling them up with multi-protocol connectivity is a mess.

Server-side connection pooling

In 11g server-side connection pooling, an additional layer to the shared server, to enable faster [actually to bypass] session creation. Server-side connection pooling allows multiple Oracle clients to share a server-side pool of sessions (USERIDs must match). Clients can connect and disconnect (think PHP applications) at will without the cost of creating a new server session - shared server removes the process creation cost but not the session creation cost.

RMAN UNDO bypass

Rman backup can bypass undo. Undo tablespaces are getting huge, but contain lots of useless information. Now rman can bypass those types of tablespace. Great for exporting a tablespace from backup.

Capture/replay database workloads

Sounds appealing. You can capture the workload in prod and apply it in development.

Scalability Enhancements

The features in 11g focused on scalability and performance can be grouped into four areas:
Scalable execution, scalable storage, scalable availability and scalable management.

Scalable execution

Scalable execution consists of a number of features, the first of which is query results caching; this feature automatically caches the results of an SQL query as opposed to the data blocks normally cached by the buffer cache, and works both client (OCI) and server side - this was described as �buffer cache taken to the next level. The DBA sets the size of the results cache and turns the feature on at a table level with the command alter table DEPT cache results, the per-process cache is shared across multiple session and at the client level, is available with all 11g OCI-based clients.

Virtual columns

Oracle 11g virtual table columns are columns that are actually functions (create table t1 (c1 number, c2 number, c3 as (c1+c2) virtual), and similarly, virtual indexes that are based on functions REF partitioning, allowing you to partition a table based on the partition scheme of another. Allows you to partition an order_items table based off of the order_date column in an orders table. Source: Source:

A super object-oriented DDL keyword

This is used with OO Oracle when instantiating a derivative type (overloading), to refer to the superclass from whence the class was derived.

Oracle 11g XML data storage

Starting in 11g, you can store XML either as a CLOB or a binary data type, adding flexibility. Oracle11g will support query mechanisms for XML including XQuery and SQL XML, emerging standards for querying XML data stored inside tables.

Data Guard supports Flashback Standby.

New Trigger features

A new type of compound trigger will have sections for BEFORE, ROW and AFTER processing, very helpful for avoiding errors, and maintaining states between each section.

Partitioning

Partitioning by logical object and automated partition creation.

LOB

New high-performance LOB features.

Automatic Diagnostic Repository (ADR)

When critical errors are detected, they automatically create an incident. Information relating to the incident is automatically captured, the DBA is notified and certain health checks are run automatically. This information can be packaged to be sent to Oracle support.

Incident Packaging Service (IPS)

This wraps up all information about an incident, requests further tests and information if necessary, and allows you to send the whole package to Oracle Support.

Feature Based Patching

All one-off patches will be classified as to which feature they affect. This allows you to easily identify which patches are necessary for the features you are using. EM will allow you to subscribe to a feature based patching service, so EM automatically scans for available patches for the features you are using.

New Oracle11g Advisors

New 11g Oracle Streams Performance Advisor and Partitioning Advisor.

Enhanced Read only tables

Table trigger firing order

Oracle 11g PL/SQL will you to specify trigger firing order.

Oracle11g High Availability & RAC Features

Oracle continues to enhanced Real Application Clusters in Oracle11g and we see some exciting new features in RAC manageability and enhanced performance:

Oracle 11g RAC parallel upgrades

Oracle 11g promises to have a rolling upgrade features whereby RAC database can be upgraded without any downtime. Ellison first promised this feature in 2002, and it is a very challenging and complex 11g new feature.

Oracle RAC load balancing advisor

Starting in 10gr2 we see a RAC load balancing advisor utility.

ADDM for RAC

Oracle will incorporate RAC into the automatic database diagnostic monitor, for cross-node advisories.

Optimized RAC cache fusion protocols

Moves on from the general cache fusion protocols in 10g to deal with specific scenarios where the protocols could be further optimized.

Oracle 11g RAC Grid Provisioning

The Oracle grid control provisioning pack allows you to �blow-out� a RAC node without the time-consuming install, using a pre-installed �footprint�. Oracle 11g OEM has have easy server blade installs where a binary footprint is tar�ed to the server blade and configured, without a cumbersome install process.

Hot Patching

Zero downtime patch application.

Standby Snapshot

For the purpose of regression testing.

Quick Fault Resolution

Automatic capture of diagnostics (dumps) for a fault.

OEM - Enterprise Manager Oracle 11g Features

Interfaces to Applications

"Oracle says that extending Enterprise Manager's capabilities are part of the firm�s promise to seamlessly integrate the spoils of its many acquisitions - including the purchases of Siebel Systems and PeopleSoft Corp. into a single platform."

OEM Easy de-install

This will uninstall both successful and unsuccessful Oracle installs.

Database Repair Wizard

A GUI to guide beginners through the steps to diagnose and repair Oracle issues.

Better OEM Grid Tools

Another new Oracle11g feature may be improved RAC and Grid monitoring, especially on the cache fusion interconnect.

Enterprise Manager interfaces to foreign applications

Oracle says that extending Enterprise Manager's capabilities are part of the firms promise to seamlessly integrate the spoils of its many acquisitions including the purchases of Siebel Systems and PeopleSoft Corp. into a single platform.

Oracle 11g programming language support Features

PHP

Improved PHP driver for Oracle.

Compilers

Improved native Java & PL/SQL compilers.

Oracle 11g XML Enhancements

Oracle 11g will also support Content Repository API for Java Technology (JSR 170). Oracle 11g has XML duality, meaning that you can also embed XML directives inside PL/SQL and embed PL/SQL inside XML code. Oracle 11g XML will also support schema-based document Type Definitions (DTDs), to describe internal structure of the XML document.

Scalable Java

The next scalable execution feature is automatic creation of native Java code, with just one parameter for each type with an on/off value. This apparently provides a 100% performance boost for pure Java code, and a 10%-30% boost for code containing SQL.

Improved sequence management

A new features of Oracle 11g will bypass DML (sequence.nextval) and allow normal assignments on sequence values.

Intra-unit inlining

In C, you can write a macro that gets inlined when called. Now any stored procedure is eligible for inlining if Oracle thinks it will improve performance. No change to your code is required. Now you have no reason for not making everything a subroutine!

Oracle 11g PL/SQL Features

PL/SQL "continue" keyword

This will allow a C-Like continue in a loop, to bypass any "else" Boolean conditions. A nasty PL/SQL GOTO is no longer required to exit a Boolean within a loop.

Disabled state for PL/SQL

Another 11g new feature is a disabled state for PL/SQL (as opposed to enabled and invalid in dba_objects).

Easy PL/SQL Compiling

Native Compilation no longer requires a C compiler to compile your PL/SQL. Your code goes directly to a shared library.

Improved PL/SQL stored procedure invalidation mechanism

A new 11g features will be fine grained dependency tracking, reducing the number of objects which become invalid as a result of DDL.

Scalable PL/SQL

The next scalable execution feature is automatic creation of �native� PL/SQL (and Java code), with just one parameter for each type with an �on/off� value. This apparently provides a 100% performance boost for pure PL/SQL code, and a 10%-30% performance boost for code containing SQL.

Enhanced PL/SQL warnings

The 11g PL/SQL compiler will issue a warning for a when others with no raise.

Stored Procedure Named Notation

Named notation is now supported when calling a stored procedure from SQL.

Oracle 11g SQL New Features

The /*+result_cache*/ SQL hint

This suggests that the result data will be cached in the data buffers, and not the intermediate data blocks that were accessed to obtain the query results. You can cache both SQL and PL/SQL results for super-fast subsequent retrieval.

XML SQL queries

Oracle11g will support query mechanisms for XML including XQuery and SQL XML, emerging standards for querying XML data stored inside tables.

SQL Replay

Similar to the previous feature, but this only captures and applies the SQL workload, not total workload. Improved optimizer statistics collection speed - Oracle 11g has improved the dbms_stats performance, allowing for an order of magnitude faster CBO statistics creation.

SQL execution Plan Management

Oracle 11g SQL will allow you to fix execution plans (explain plan) for specific statements, regardless of statistics or database version changes.

Dynamic SQL

DBMS_SQL is here to stay. It�s faster and is being enhanced. DBMS_SQL and NDS can now accept CLOBs (no more 32k limit on NDS). A ref cursor can become a DBMS_SQL cursor and vice versa. DBMS_SQL now supprts user defined types and bulk operations.

Fully Automatic SQL Tuning

The 10g automatic tuning advisor makes tuning suggestions in the form of SQL profiles that will improve performance. You can tell 11g to automatically apply SQL profiles for statements where the suggested profile give 3-times better performance that the existing statement. The performance comparisons are done by a new administrative task during a user-specified maintenance window.

Improved SQL Access Advisor

The 11g SQL Access Advisor gives partitioning advice, including advice on the new interval partitioning. Interval partitioning is an automated version of range partitioning, where new equally-sized partitions are automatically created when needed. Both range and interval partitions can exist for a single table, and range partitioned tables can be converted to interval partitioned tables.

11g Performance tuning optimization Features

Automatic Memory Tuning

Automatic PGA tuning was introduced in Oracle 9i. Automatic SGA tuning was introduced in Oracle 10g. In 11g, all memory can be tuned automatically by setting one parameter. You literally tell Oracle how much memory it has and it determines how much to use for PGA, SGA and OS Processes. Maximum and minimum thresholds can be set.

Resource Manager

The 11g Resource Manager can manage I/O, not just CPU. You can set the priority associated with specific files, file types or ASM disk groups.

ADDM

The ADDM in 11g can give advice on the whole RAC (database level), not just at the instance level. Directives have been added to ADDM so it can ignore issues you are not concerned about. For example, if you know you need more memory and are sick of being told it, you can ask ADDM not to report those messages anymore.

Faster sorting

Starting in 10gr2 we see an improved sort algorithm, Oracle10gRw introduced a new sort algorithm which is using less memory and CPU resources. A hidden parameter _newsort_enabled = {TRUEFALSE} governs whether the new sort algorithm will be used.

AWR Baselines

The AWR baselines of 10g have been extended to allow automatic creation of baselines for use in other features. A rolling week baseline is created by default.

Adaptive Metric Baselines

Notification thresholds in 10g were based on a fixed point. In 11g, notification thresholds can be associated with a baseline, so the notification thresholds vary throughout the day in line with the baseline.

Oracle 11g security & auditing Features

Enhanced Password

Pete Finnigan notes some new Oracle 11g security features [Oracle 11g] will have case sensitive passwords and also the password algorithm has changed to SHA-1 instead of the old DES based hashing used.

Oracle SecureFiles

Replacement for LOBs that are faster than Unix files to read/write. Lots of potential benefit for OLAP analytic workspaces, as the LOBs used to hold AWs have historically been slower to write to than the old Express .db files. Securefiles are a huge improvement to BLOB data types. Faster, with compression, encryption.

Oracle 11g Audit Vault

Oracle Audit Vault is a new feature that will provide a solution to help customers address the most difficult security problems remaining today, protecting against insider threat and meeting regulatory compliance requirements.

Proxy connect for SQL*Plus

New with 10r2 proxy identification in SQL*Plus, the connect command has been enhanced to allow for a proxy, to aid applications that always connect with the same user ID:

connect sapr3[scott]/tiger

FGAC for UTL_SMTP, UTL_TCP and UTL_HTTP. You can define security on ports and URLs.

Fine Grained Dependency Tracking (FGDT)

This means that when you add a column to a table, or a cursor to a package spec, you don't invalidate objects that are dependant on them. Sweet!

Database Workload Replay

Oracle Replay allows the total database workload to be captured, transferred to a test database created from a backup or standby database, then replayed to test the affects of an upgrade or system change. Currently, they are working to a capture performance overhead of 5%, so you could conceivably capture real production workloads.

--------------------------------------------------------------------------

Please send your valuable comments at
rafi.aamiri@gmail.com