Thursday, March 2, 2017

Top 10 Awesome New features of Oracle 12c



1. Invisible Columns ( Reference purpose ):-

We can have columns created as Invisible; which will not be shown when we do SELECT * FROM ..
These columns can be used to save some data for reference purpose.  No need of separate custom table to secure any data from visibility - Good one.


2. Easy Database Archiving :-

Need to keep full data in a table, as well as to keep performance when data grow?   Prior to 12c, the options are partitions and purging.
  
In 12c, we have amazing option of marking old records as INACTIVE, so that those records will not be considered for fetching, parsing and data scan. No need of backup, history and purging process for performance issues. 


3.Temporary UNDO or Staging UNDO  :-

Prior to 12C, undo records generated by TEMP Table space is stored in the undo table space. With Temp undo feature in 12C, temp undo records can be stored in temporary table instead of UNDO TS. The benefit is ... reduced undo table space and reduced redo log space used. 



4. Online migration of tables ( now partitioned tables also )

Prior to 12c, only non-partition tables can be migrated from one table space to other table space.  From 12c on-wards, we can migrate  any partition or sub partition of the table can be migrated from one table space to other table space.  ( only if the ONLINE clause is specified for the partition )


5. More than one Indexes for a single column  ( Switch option )

Prior to 12c, only one index can be created for a column.  Going forward, we can create multiple indexes ( For Example:  Binary tree  as well as Bit map ).  But only one index can be in active mode at a time. Indexes can be switched to use any one of them in a needy basis. 


6. Auto Increment Primary Key - ( Similar to Sequence )

From 12c, we can now create a column with 'Generated as Identity' clause. This is equivalent to creating a separate sequence and doing a sequence.nextval for each row.   No need to create new object -SEQUENCE just for incremental purpose.  I love this feature most. 


7. Recover a table is easy though RMAN  ( Good one )

Prior to 12c, if we had to restore a particular table, we had to do all sorts of things like restoring a tablespace and or do Export and Import. The new restore command in RMAN simplifies this task. We can simply restore/recover a table.  Lovely feature.


8. Masking Data for specific users ( REDACTION )

REDACTION is nothing but masking.  We can now mask a field/column of a table for a specific schema/user. When we do SELECT * FROM.. it will show that particular column as masked. 

From Sql Developer we can do this by going to the table:  <TableName> ->Right click on Security Policy->click on New->click on Redaction Policy->Enter <ColumnName>


9. Inline Procedure and Function  ( Great feature among all )

The in line feature is extended in Oracle 12C. In addition to Views, we can now have PL/SQL Procedures and Functions as in line code. 

The query can be written as if it is calling a real stored procedure, but however the functions do not actually exist in the database. 

We will not be able to find them in ALL_OBJECTS. I personally feel this will be a very good feature for the PLSQL developers to explore as there is no code that needs to be compiled and manage separately.


10  Top 'N'  Select and Fetch option ( Long pending feature )

I mentioned this feature as Long pending feature, because we have this already in Non-Oracle DBs.

In 12c, we have new SQL syntax to simplify fetching the first few rows. The new sql syntax "Fetch First X Rows only" can be used. No need of inline views, order by etc., and etc.,  Big relief for SQL writers. 


Hope this is useful. If yes, kindly share.

Sathish Chandran

4 comments:

  1. Hi Sathish,
    Awesome information...Thanks for Sharing

    Thanks & Regards,
    Sushant

    ReplyDelete
  2. Hi Sathish,

    Really helpful it is. Thanks for sharing!


    Regards
    Liti

    ReplyDelete
  3. Hi sathish,very good info.
    Could you explain these features in detail.so that we will get more knowledge on 12c.
    Thank you very much.

    ReplyDelete