Reduce Intelligent Cube Size By Finding Intelligent Cube Objects Which Are Not In Use
If the i-cubes can potentially be reduced in size an audit can be performed on the cube objects to see which cube objects are not being used by any of the view reports, documents, or dossiers.
The below are examples for a few of the common metadata database platforms.
NOTE: To perform this audit, queries are run against the MicroStrategy metadata database. Ensure a metadata backup is taken prior to performing the below actions.
Steps:
1) Identify the object ID of the Intelligent cube to be audited by checking the objects Property window
2) Identify the object ID of the project this cube exists within by opening the Project Configuration
Sample Cube ID = CFAF1E9B4D53990698C42E87C7AF2EB5
Sample Project ID = B7CA92F04B9FAE8D941C3E9B7E0CD754
3) Run the below SQL against the metadata database by replacing the Cube ID and Project ID within the respective location.
The following is the syntax for a MySQL metadata:
select a13.OBJECT_NAME, a13.OBJECT_ID, a13.OBJECT_TYPE, a13.PROJECT_ID, a13.PARENT_ID from DSSMDOBJINFO a13 where Object_ID in (SELECT a12.DEPN_OBJID as Object_ID FROM DSSMDOBJDEPN a12 where a12.object_id = ('CFAF1E9B4D53990698C42E87C7AF2EB5') and a12.DEPN_OBJID not in (SELECT distinct a11.DEPN_OBJID FROM DSSMDOBJDEPN a11 where object_id in (SELECT OBJECT_ID FROM DSSMDOBJDEPN where depn_objid = ('CFAF1E9B4D53990698C42E87C7AF2EB5')))) and a13.PROJECT_ID = 'B7CA92F04B9FAE8D941C3E9B7E0CD754';
4) Review the results returned to quickly identify which attributes/metrics within the cube are not being used.

From these results it can be determined that the Month attribute is not being used within any of the view Reports, Documents, Dossiers that reference this Intelligent Cube. At this point, the Month attribute can be removed from the cube to reduce the publication time and size of the Intelligent Cube within memory.
Other metadata database platforms:
SQL Server:
select a13.OBJECT_NAME, dbo.fn_UniqueIdentifierToCharMSTR(a13.OBJECT_ID) as OBJECT_ID, a13.OBJECT_TYPE as OBJECT_TYPE, dbo.fn_UniqueIdentifierToCharMSTR(a13.PROJECT_ID) as PROJECT_ID, dbo.fn_UniqueIdentifierToCharMSTR(a13.PARENT_ID) as PARENT_FOLDER from dbo.DSSMDOBJINFO as a13 where Object_ID in (SELECT a12.DEPN_OBJID as Object_ID FROM dbo.DSSMDOBJDEPN as a12 where a12.object_id = dbo.fn_CharToUniqueIdentifier('CFAF1E9B4D53990698C42E87C7AF2EB5') and a12.DEPN_OBJID not in (SELECT distinct a11.DEPN_OBJID FROM dbo.DSSMDOBJDEPN as a11 where object_id in (SELECT OBJECT_ID FROM dbo.DSSMDOBJDEPN where depn_objid = dbo.fn_CharToUniqueIdentifier('CFAF1E9B4D53990698C42E87C7AF2EB5')))) and a13.project_id= dbo.fn_CharToUniqueIdentifier('B7CA92F04B9FAE8D941C3E9B7E0CD754');
Oracle:
select a13.OBJECT_NAME, a13.OBJECT_ID, a13.OBJECT_TYPE, a13.PROJECT_ID, a13.PARENT_ID from DSSMDOBJINFO a13 where Object_ID in (SELECT a12.DEPN_OBJID as Object_ID FROM DSSMDOBJDEPN a12 where a12.object_id = ('CFAF1E9B4D53990698C42E87C7AF2EB5') and a12.DEPN_OBJID not in (SELECT distinct a11.DEPN_OBJID FROM DSSMDOBJDEPN a11 where object_id in (SELECT OBJECT_ID FROM DSSMDOBJDEPN where depn_objid = ('CFAF1E9B4D53990698C42E87C7AF2EB5')))) and a13.PROJECT_ID = 'B7CA92F04B9FAE8D941C3E9B7E0CD754';
NOTE: To perform this audit, queries are run against the MicroStrategy metadata database. Ensure a metadata backup is taken prior to performing the below actions.
Steps:
1) Identify the object ID of the Intelligent cube to be audited by checking the objects Property window
2) Identify the object ID of the project this cube exists within by opening the Project Configuration
Sample Cube ID = CFAF1E9B4D53990698C42E87C7AF2EB5
Sample Project ID = B7CA92F04B9FAE8D941C3E9B7E0CD754
3) Run the below SQL against the metadata database by replacing the Cube ID and Project ID within the respective location.
The following is the syntax for a MySQL metadata:
select a13.OBJECT_NAME, a13.OBJECT_ID, a13.OBJECT_TYPE, a13.PROJECT_ID, a13.PARENT_ID from DSSMDOBJINFO a13 where Object_ID in (SELECT a12.DEPN_OBJID as Object_ID FROM DSSMDOBJDEPN a12 where a12.object_id = ('CFAF1E9B4D53990698C42E87C7AF2EB5') and a12.DEPN_OBJID not in (SELECT distinct a11.DEPN_OBJID FROM DSSMDOBJDEPN a11 where object_id in (SELECT OBJECT_ID FROM DSSMDOBJDEPN where depn_objid = ('CFAF1E9B4D53990698C42E87C7AF2EB5')))) and a13.PROJECT_ID = 'B7CA92F04B9FAE8D941C3E9B7E0CD754';
4) Review the results returned to quickly identify which attributes/metrics within the cube are not being used.
From these results it can be determined that the Month attribute is not being used within any of the view Reports, Documents, Dossiers that reference this Intelligent Cube. At this point, the Month attribute can be removed from the cube to reduce the publication time and size of the Intelligent Cube within memory.
Other metadata database platforms:
SQL Server:
select a13.OBJECT_NAME, dbo.fn_UniqueIdentifierToCharMSTR(a13.OBJECT_ID) as OBJECT_ID, a13.OBJECT_TYPE as OBJECT_TYPE, dbo.fn_UniqueIdentifierToCharMSTR(a13.PROJECT_ID) as PROJECT_ID, dbo.fn_UniqueIdentifierToCharMSTR(a13.PARENT_ID) as PARENT_FOLDER from dbo.DSSMDOBJINFO as a13 where Object_ID in (SELECT a12.DEPN_OBJID as Object_ID FROM dbo.DSSMDOBJDEPN as a12 where a12.object_id = dbo.fn_CharToUniqueIdentifier('CFAF1E9B4D53990698C42E87C7AF2EB5') and a12.DEPN_OBJID not in (SELECT distinct a11.DEPN_OBJID FROM dbo.DSSMDOBJDEPN as a11 where object_id in (SELECT OBJECT_ID FROM dbo.DSSMDOBJDEPN where depn_objid = dbo.fn_CharToUniqueIdentifier('CFAF1E9B4D53990698C42E87C7AF2EB5')))) and a13.project_id= dbo.fn_CharToUniqueIdentifier('B7CA92F04B9FAE8D941C3E9B7E0CD754');
Oracle:
select a13.OBJECT_NAME, a13.OBJECT_ID, a13.OBJECT_TYPE, a13.PROJECT_ID, a13.PARENT_ID from DSSMDOBJINFO a13 where Object_ID in (SELECT a12.DEPN_OBJID as Object_ID FROM DSSMDOBJDEPN a12 where a12.object_id = ('CFAF1E9B4D53990698C42E87C7AF2EB5') and a12.DEPN_OBJID not in (SELECT distinct a11.DEPN_OBJID FROM DSSMDOBJDEPN a11 where object_id in (SELECT OBJECT_ID FROM DSSMDOBJDEPN where depn_objid = ('CFAF1E9B4D53990698C42E87C7AF2EB5')))) and a13.PROJECT_ID = 'B7CA92F04B9FAE8D941C3E9B7E0CD754';
Comments
Post a Comment