In-memory Column Store and Distribute for Service Options in Oracle 12cR2 Database
Distribute for Service: A New Feature in (12cR2)
Today, we are going to understand a new feature introduced in Oracle Database 12cR2. The feature is called, Distribute for Service.
What this new feature allows you to do, is to limit the objects/tables getting populated into a in-memory column store in a RAC environment. By Default in a RAC environment, a table or an object is broken up into pieces and each piece is populated into a in-memory column store across the RAC cluster.
If you do not want to allow this, and may be you want to have the application access a specific RAC node, where this table as a whole is populated, then you can use distribute for service feature combined with service specific features of Oracle RAC environment.
Let us consider a 2-node RAC environment which has 3 services. ( IM1, IM2 & IM_ALL )
IM1 runs on only node 1
IM2 runs on only node 2
IM_ALL runs on node1 and node2
There is a global view called, "gv$im_segments", when you query this, you will be able to status of the segments present in in-memory column stores across the nodes of the cluster.
Let us consider 3 tables,
- Sales
- Customers
- Products
And alter the tables above with the commands as follows.
| Distribute For Service - 12cR2 |
Customers table has "INMEMORY PRIORTY HIGH" and we are making use of DFS to populate only on RAC node 1.
Products table has "INMEMORY PRIORITY MEDIUM" stating that it has slightly less priority than Customers table and it will be populated entirely on Rac node 2.
Sales table has a Higher Priority too but it is distributed across all the nodes of the RAC Cluster since DISTRIBUTE FOR SERVICE clause is not used. So, part of the table will be on node 1 and part of it will be populated on node 2.
Now, after the above commands are executed let us see the status of the INMEMORY column store across the RAC nodes.
| Global View of InMemory Column Stores - Across nodes of RAC Cluster |
You may observe that SALES table is distributed on RAC nodes 1 & 2.
CUSTOMERS table is populated completely only on node 1 and PRODUCT is completely populated only on node 2.
Since they are completely populated, MB_NOT_POPULATED shows "0" MB. The Column values for SALES table in the individual nodes of RAC is self-explanatory. ( as SALES is partially populated on individual nodes ).
But how can you be sure that SALES table is fully populated across multiple nodes, we have to examine another global view called "gv$IM_SEGMENTS_DETAIL".
| IM_SEGMENTS_DETAIL |
In the Next Blog, we will discuss about the following :-
How are the queries using the above tables run on the database. What are the wait events associated with them.
Thanks & Regards
Sai Marlakunta
Comments
Post a Comment