More and more resources are used in companies to manage data. Most companies buy more and more storage systems because of poor resource utilization. Starting with Oracle 11g, Oracle has introduced Information Lifecycle Management (ILM) which can use different kinds of storage with varying performances in order to increase cost savings. In Oracle 12c, ILM now allows the automation of the data movement to different storage tiers and the compression at segment level. The idea behind ILM is that when a data is recent it is often accessed, but when the data is old it is not very much accessed. The old data can be moved to a low cost storage, and the most recent data may use high performance storage.

Storage types

Four types of storage tiers can be used:

ilm1

Source: Oracle Documentation 

  • High performance storage tier to be used by the frequently accessed data.
  • Low cost storage tier to manage the old data rarely accessed.
  • Online archive storage tier to manager data seldom accessed, which can be low cost storage tier.
  • Offline archive storage tier to manage data removed from the database which can be stored on a tape.

The central advantages of the online archive storage tier are:

  • Data are always online with faster access in comparison to tape.
  • The storage cost is low.
  • The application can be used to access the data immediately – no need to restore from a tape.

Information Lifecycle Management (ILM) allows us to use policies at the row, segment, and table level with “create” and “alter” SQL statements.
The syntax of the ILM clause is:

ILM_clause := ILM {[ADD | DELETE | DELETE_ALL | ENABLE_ALL | DISABLE_ALL] policy_name POLICY_CLAUSE} | ILM_tracking_clause

These ILM policies help us moving data between different tiers of storage. And a new feature has appeared in the Oracle 12c version: The ILM policies now allow to fix the compression level for each storage tier.

The syntax of the compression_clause is:

compression_clause := { COMPRESS FOR { OLTP [INPLACE] | QUERY {LOW | HIGH} } | ARCHIVE {LOW | HIGH}}}

The ILM storage tiering policies are only available at the segment level.

The syntax of the tiering_clause is:

tiering_clause := TIER TO tablespace_name

The ILM tracking clause syntax is:

ILM_tracking_clause ::= ILM {ENABLE | DISABLE} ACTIVITY TRACKING ILM_activity_clauseILM_activity_clause ::= { SEGMENT ACCESS | (WRITE TIME | CREATE TIME | READ TIME)}

Segment level compression tiering

As already explained, ILM in Oracle 12c allows the automation of the data movement to different storage tiers and the compression at segment level. Thus, we can also define compression policies for each storage tier and decide when the data will be moved.

Let’s create a table and enable activity tracking:

 ilm2

The compression policy is created:

ilm3

Let’s define a storage policy:

ilm4

You can also disable the activity tracking:

ilm5

You can see in this last example how data is compressed after some delay of inactivity and how it is automatically moved to a low cost storage tier.

Row level compression tiering

We can use row level compression in combination with segment level compression.
For example, we can compress the rows of the table trade for OLTP after 1 month of no modification by running the following SQL statement:

ilm6

With the combination of the row level compression and segment level compression, the DBA has really an efficient way to know where his data is and how it is managed. In fact, because of the data volume reduction, the performance will become better and the size of the rman backups will also decrease.

Conclusion

The new ILM features – row and segment level compression tiering – allow a better control of the data in the database. These features are very interesting for automatically managing the database storage, optimizing its performance, and reducing the storage cost.