1 / 11

11g NEW FEATURES By VIJAY

11g NEW FEATURES By VIJAY. AGENDA. RESULT CACHE INVISIBLE INDEXES READ ONLY TABLES DDL WAIT OPTION ADDING COLUMN TO A TABLE WITH DEFAULT VALUE. VIRTUAL COLUMNS. RESULT CACHE. SQL Query Results

Télécharger la présentation

11g NEW FEATURES By VIJAY

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 11g NEW FEATURES By VIJAY

  2. AGENDA RESULT CACHE INVISIBLE INDEXES READ ONLY TABLES DDL WAIT OPTION ADDING COLUMN TO A TABLE WITH DEFAULT VALUE. VIRTUAL COLUMNS

  3. RESULT CACHE SQL Query Results Query result cache is used to store the results of SQL queries for re-use in subsequent executions PL/SQL Function Results provides a simple way to boost the performance of PL/SQL functions by saving the results of function calls for specific combinations of input parameters in the SGA. These results can be reused by any session calling the same function with the same parameters

  4. ADVANTAGES Access Large Amount of DataReturn Few RowsExecute Somewhat FrequentlyBased on Slowly Changing DataDISADVANTAGESWill Not Work With Temporary tables, SYS or SYSTEM tables Sequences (NEXTVAL or CURRVAL)Date/Time Functions – SYSDATE, CURRENT_DATE, SYS_TIMESTAMP, CURRENT_TIMESTAMP, etcQuery must retrieve the most current committed state of the dataNo Active Transaction Against Objects in Current Session

  5. System Views • V$RESULT_CACHE_STATISTICS • How well is the cache doing? • Monitor CREATES vs. FINDS • V$RESULT_CACHE_MEMORY • Memory components and statistics • V$RESULT_CACHE_OBJECTS • Objects that are in the cache along with attributes • V$RESULT_CACHE_DEPENDENCY • Dependencies of the results in cache

  6. VISIBLE AND INVISIBLE INDEXES • TEST THE REMOVAL OF INDEX BEFORE DROPPING IT. PARAMETER OPTIMIZER_USE_INVISIBLE_INDEXES=TRUE

  7. READ ONLY TABLES • USED TO RESTRICT DML OPERATIONS • WE CAN MAKE TABLE READ ONLY IN DIFFERENT WAYS PRIOR TO ORACLE 11G THEY ARE: • CREATE A TRIGGER WHICH RAISES AN EXCEPTION • CREATE A MATERIALIZED VIEW • Create a check constraint with disable validate • RELATED VIEW: • USER_TABLES

  8. DDL WAIT OPTION DDL commands require exclusive locks on internal structures. If these locks are not available the commands return with an "ORA-00054: resource busy" error message. This can be especially frustrating when trying to modify objects that are accessed frequently. To get round this Oracle 11g includes the DDL_LOCK_TIMEOUT parameter, which can be set at instance or session level using the ALTER SYSTEM and ALTER SESSION commands respectively.The DDL_LOCK_TIMEOUT parameter indicates the number of seconds a DDL command should wait for the locks to become available before throwing the resource busy error message. The default value is zero.

  9. ADDING COLUMN WITH DEFAULT VALUE if there are some millions of records in the table and updating millions of rows will not only take a very long time, it will also fill up the undo segments, generate a large amount of redo, and create massive performance overhead. SQL> alter table product add Item_code varchar2(20) default ‘AAAAA’ not null; The above statement will not issue an update to all the existing records of the table. When a user selects the column for an existing record, Oracle gets the fact about the default value from the data dictionary and returns it to the user.So there is not storage involved , no redo and undo generation and no performance overhead.

  10. VIRTUAL COLUMN • virtual columns, allow you to create table columns which are purely expression-based and aren't stored on disk Limitations • Virtual columns are not supported under external, object, cluster, temporary, or index organized tables. • You can’t create virtual column as a user-defined type ,large object or RAW. • All columns in column expression must be of same table. • The columsn expression the AS clause cannot refer to another virtual column. • You can’t update a virtual column by using it in SET clause of an UPDATE statement

  11. Thank You

More Related