Skip to main content

Optimizing queries in Microstrategy using VLDB properties

Optimizing queries in  Microstrategy using VLDB properties

#vldb #vldbproperties

The table below summarizes the Query Optimizations VLDB properties. Additional details about each property, including examples where necessary, are provided in the sections following the table.

Property Description Possible Values Default Value
Determines whether the Engine calculates an aggregation function and a join in a single pass or in separate passes in the SQL.
• (default) Final pass CAN do aggregation and join lookup tables in one pass
• One additional final pass only to join lookup tables
Final pass CAN do aggregation and join lookup tables in one pass
Indicates during which pass the report filter is applied.
• Apply filter only to passes touching warehouse tables
• Apply filter to passes touching warehouse tables and last join pass, if it does a downward join from the temp table level to the template level
• Apply filter to passes touching warehouse tables and last join pass
Apply filter only to passes touching warehouse tables
Controls how the total number of rows are calculated for incremental fetch.
• Use Count(Attribute@ID) to calculate total element number (uses count distinct if necessary)
• Use ODBC cursor to calculate total element number
Use Count(Attribute@ID) to calculate total element number (uses count distinct if necessary)
For Tandem databases, the default is Use ODBC Cursor.
Determines how distinct counts of values are retrieved from partitioned tables.
• Do not select distinct elements for each partition
• Select distinct elements for each partition
Do not select distinct elements for each partition
Helps optimize custom group banding when using the Count Banding method. You can choose to use the standard method that uses the Analytical Engine or database-specific syntax, or you can choose to use case statements or temp tables.
• Treat banding as normal calculation
• Use standard case statement syntax
• Insert band range to database and join with metric value
Treat banding as normal calculation
Helps optimize custom group banding when using the Points Banding method. You can choose to use the standard method that uses the Analytical Engine or database-specific syntax, or you can choose to use case statements or temp tables.
• Treat banding as normal calculation
• Use standard case statement syntax
• Insert band range to database and join with metric value
Treat banding as normal calculation
Helps optimize custom group banding when using the Size Banding method. You can choose to use the standard method that uses the Analytical Engine or database-specific syntax, or you can choose to use case statements or temp tables.
• Treat banding as normal calculation
• Use standard case statement syntax
• Insert band range to database and join with metric value
Treat banding as normal calculation
Defines if and how Intelligent Cube data is normalized to save memory resources.
• Do not normalize Intelligent Cube data
• Normalize Intelligent Cube data in Intelligence Server
• Normalize Intelligent Cube data in database using Intermediate Table Type
• Normalize Intelligent Cube data in database using Fallback Type
• Normalize Intelligent Cube data basing on dimensions with attribute lookup filtering
• Normalize Intelligent Cube data basing on dimensions with no attribute lookup filtering
Normalize Intelligent Cube data in Intelligence Server
Defines if and how report data is normalized to save memory resources.
• Do not normalize report data
• Normalize report data in Intelligence Server
• Normalize report data in database using Intermediate Table Type
• Normalize report data in database using Fallback Table Type
• Normalize report data basing on dimensions with attribute lookup filtering
Do not normalize report data
Determines whether the sort order of attribute elements on reports considers special sort order formatting defined for attributes.
• Sort attribute elements based on the attribute ID form for each attribute
• Sort attribute elements based on the defined 'Report Sort' setting of all attribute forms for each attribute
Sort attribute elements based on the attribute ID form for each attribute
Determines level (dimension) replacement for non parent-child related attributes in the same hierarchy.
• Use relational model
• Use dimensional model
Use relational model
Enable or disable the Analytical Engine's ability to treat attributes defined on the same column with the same expression as attribute roles.
• Enable Engine Attribute Role feature
• Disable Engine Attribute Role feature
Disable Engine Attribute Role feature
Determines if metric qualifications that are included in separate passes of SQL are included in a single pass of SQL when possible.
• Enable Filter tree optimization for metric qualifications
• Disable Filter tree optimization for metric qualifications
Enable Filter tree optimization for metric qualifications
Determines whether data that is transferred between Intelligence Server and a database is performed using a single transfer of data or multiple, incremental transfers of data
• Enable Incremental Data Transfer
• Disable Incremental Data Transfer
Disable Incremental Data Transfer
Determines how many queries can be executed in parallel as part of parallel query execution support
User-defined
2
Allows you to choose how to handle prequerying the metadata partition.
• Use count(*) in prequery
• Use constant in prequery
Use count(*) in prequery
Defines which technique to use to support multiple data sources in a project.
• Use MultiSource Option to access multiple data sources
• Use database gateway support to access multiple data sources
Use MultiSource Option to access multiple data source
Defines whether OLAP functions support backwards compatibility or reflect enhancements to OLAP function logic.
• Preserve backwards compatibility with 8.1.x and earlier
• Recommended with 9.0 and later
Preserve backwards compatibility with 8.1.x and earlier
Determines whether MicroStrategy attempts to execute multiple queries in parallel to return report results faster and publish Intelligent Cubes.
• Disable parallel query execution
• Enable parallel query execution for multiple data source reports only
• Enable parallel query execution for all reports that support it
Disable parallel query execution
Determines whether reports and Intelligent Cubes include an estimate in the percent of processing time that would be saved if parallel Query execution was used to run multiple queries in parallel.
• Disable parallel query execution improvement estimate in SQL view
• Enable parallel query execution improvement estimate in SQL view
Disable parallel query execution improvement estimate in SQL view
Determines how calculation ranking is performed.
• Use ODBC ranking (MSTR 6 method)
• Analytical engine performs rank
Use ODBC ranking (MSTR 6 method).
Determines whether to keep or remove aggregations in SQL queries executed from MicroStrategy.
• Remove aggregation according to key of FROM clause
• Remove aggregation according to key of fact tables (old behavior)
Remove aggregation according to key of FROM clause
Determines whether Group By and aggregations are used for attributes with the same primary key.
• Remove aggregation and Group By when Select level is identical to From level
• Remove aggregation and Group By when Select level contains all attribute(s) in From level
Remove aggregation and Group By when Select level is identical to From level
Determines whether an optimization for outer join processing is enabled or disabled.
• Disable optimization to remove repeated tables in full outer join and left outer join passes
• Enable optimization to remove repeated tables in full outer join and left outer join passes
Enable optimization to remove repeated tables in full outer join and left outer join passes
Allows you to use set operators in sub queries to combine multiple filter qualifications. Set operators are only supported by certain database platforms and with certain sub query types.
• Disable Set Operator Optimization
• Enable Set Operator Optimization (if supported by database and [Sub Query Type])
Disable Set Operator Optimization
Determines the level by which SQL queries in reports are optimized.
• Level 0: No optimization
• Level 1: Remove Unused and Duplicate Passes
• Level 2: Level 1 + Merge Passes with Different SELECT
• Level 3: Level 2 + Merge Passes, which only hit DB Tables, with different WHERE
• Level 4: Level 2 + Merge All Passes with Different WHERE
Level 4: Level 2 + Merge All Passes with Different WHERE
Allows you to determine the type of subquery used in engine-generated SQL.
• WHERE EXISTS (SELECT * ...)
• WHERE EXISTS (SELECT col1, col2...)
• WHERE COL1 IN (SELECT s1.COL1...) falling back to EXISTS (SELECT * ...) for multiple columns IN
• WHERE (COL1, COL2...) IN (SELECT s1.COL1, s1.COL2...)
• Use Temporary Table, falling back to EXISTS (SELECT *...) for correlated subquery
• WHERE COL1 IN (SELECT s1.COL1...) falling back to EXISTS (SELECT col1, col2 ...) for multiple columns IN
• Use Temporary Table, falling back to IN (SELECT COL) for correlated subquery
Use Temporary Table, falling back to EXISTS (SELECT *...) for correlated subquery
Defines whether to attempt to improve performance of reports that use expression-based transformations.
• Always join with transformation table to perform transformation
• Use transformation formula instead of join with transformation table when possible
Use transformation formula instead of join with transformation table when possible
Determines whether the Analytical Engine should keep or remove the unrelated filter.
• Remove unrelated filter
• Keep unrelated filter
• Keep unrelated filter and put condition from unrelated attributes in one subquery group
Remove unrelated filter
Determines whether the Analytical Engine should keep or remove the unrelated filters when using nested metrics.
• Use the 8.1.x behavior:
• Use the 9.0.x behavior:
Use the 8.1.x behavior
Determines the table used for qualifications in the WHERE clause.
• Use lookup table
• Use fact table
Use fact table







Comments

Popular posts from this blog

Types of filters in Microstrategy

Types of filters in Microstrategy Below are the types of filters: 1. Attribute qualification filter These types of qualifications restrict data related to attributes on the report. a) Attribute form qualification Filters data related to a business attribute’s form(s), such as ID or description. •  For example, the attribute Customer has the forms ID, First Name, Last Name, Address, and Birth Date. An attribute form qualification might filter on the form Last Name, the operator Begins With, and the letter H. The results show a list of customers whose last names start with the letter H. b) Attribute element list qualification Filters data related to a business attribute’s elements, such as New York, Washington, and San Francisco, which are elements of the attribute City. • For example, the attribute Customer has the elements John Smith, Jane Doe, William Hill, and so on. An attribute element list qualification can filter data to display only those customer...

Apply or Pass-through functions in Microstrategy

Ap ply (Pass-Through) functions MSTR Apply functions provide access to functions or syntactic constructs that are not standard in MicroStrategy but are provided by various RDBMS systems.. Syntax common to Apply functions Apply Function Name   ("expression with placeholders", Arg1, Arg2, Arg3, …ArgN) where: Apply Function Name  – is a generic name used for the predefined pass-through functions described above expression with placeholders  – is the string describing the actual expression or syntax that the engine uses while generating the SQL and which is sent to the RDBMS. The placeholders are represented by #0, #1, and so on. "#" is a reserved character for MicroStrategy. Arg  – is an argument that replaces the parameter markers in the pattern. Arg1 replaces #0, Arg2 replaces #1, and so on. There are   five  pre-defined Apply functions to replace regular, predefined functions of the same type. For more details, cli...

Microstrategy Dossiers explained

Microstrategy  Dossiers With the release of MicroStrategy 10.9, we’ve taken a leap forward in our dashboarding capabilities by simplifying the user experience, adding storytelling, and collaboration.MSTR has  evolved dashboards to the point that they are more than dashboards - they are  interactive, collaborative analytic stories . Ultimately, it was time to go beyond dashboards, both in concept and in name, and so  the've  renamed VI dashboards to  ‘ dossiers ’.  Dossiers can be created by using the new Desktop product or Workstation or simply from the Web interface which replaces Visual Insights. All the existing visual Insights dashboards will be converted to Dossiers   With MicroStrategy 10.9, there was an active focus on making it easier to build dashboards for the widest audience of end users. To achieve this, some key new capabilities were added that make it easier to author, read, interact and collaborate on dashboards ...

Microstrategy Caches explained

Microstrategy Caches Improving Response Time: Caching A  cache is a result set that is stored on a system to improve response time in future requests.  With caching, users can retrieve results from Intelligence Server rather than re-executing queries against a database. To delete all object caches for a project 1 In Developer, log into a project. You must log in with a user account that has administrative privileges. 2 From the  Administration  menu, point to  Projects , and then select  Project Configuration . The Project Configuration Editor opens. 3 Expand  Caching , expand  Auxiliary Caches , then select  Objects . To delete all configuration object caches for a server 1 Log in to the project source. 2 From the  Administration  menu in Developer, point to  Server , and then select  Purge Server Object Caches . 4 Click  Purge Now . To purge web cache follow the steps in the link ...

Prompt-in-prompt(Nested Prompts) in Microstrategy

Prompt-in-prompt(Nested Prompts) in  Microstrategy Nested prompts allows you to create one prompt based on the other and other bases on another, nested prompts allows us to prompt the highest level(Like year) to middle level(like Quarter, then to the low level(like Month). Here you can see how to  create a 3-level deep nested prompt that will prompt the user to select a year, then a quarter within that year, then a month within that quarter. Prompt-in-prompt is a feature in which the answer to one prompt is used to define another prompt. This feature is only implemented for element list prompts . The following procedure describes how to achieve this: Create the highest level filter. This is a filter which contains a prompt on an attribute element list. Create a filter on the attribute "Year." Click "prompt on attribute element list" and click "Next" through the rest of the screens to accept the default values. Do not set any additio...

Case functions Microstrategy

Ca se functions Microstrategy Case functions return specified data in a SQL query based on the evaluation of user-defined conditions. In general, a user specifies a list of conditions and corresponding return values. Case This function evaluates multiple expressions until a condition is determined to be true, then returns a corresponding value. If all conditions are false, a default value is returned.  Case  can be used for categorizing data based on multiple conditions. This is a single-value function. Syntax Case ( Condition1 ,  ReturnValue1 ,  Condition2 , ReturnValue2 ,...,  DefaultValue ) Example Case(([Total Revenue] < 300000), 0, ([Total Revenue] < 600000), 1, 2) sum(Case (Day@DESC in (“Sat”,”Sun”), Sales, 0) {~+} Sum(Case(Category@DESC In("Books","Electronics"),Revenue,0)){~+} CaseV (case vector) CaseV  evaluates a single metric and returns different values according to the results. It can be used to perfo...

mstrio – Python and R wrappers for the MicroStrategy

mstrio – Python and R wrappers for the MicroStrategy REST APIs Connecting to MicroStrategy  Create a connection to the Intelligence Server using   Connection()   and    connect()  in Python and R, respectively. Required arguments for the   Connection()  function are the URL for the MicroStrategy REST API server, MicroStrategy Intelligence Server username and password, as well as the MicroStrategy project name. By default, the   connect()  function anticipates your MicroStrategy Intelligence Server username and password. LDAP authentication is also supported. Use the optional argument    login_mode=16    in the    connect()  function for LDAP authentication.  Extract data from cubes and reports  To extract data from MicroStrategy cubes and reports, use the   get_cube()  and   get_report()  functions. Use...

Microstrategy "Error type: Odbc error. Odbc operation attempted

 "Error type: Odbc error. Odbc operation attempted: SQLExecDirect. [HYT00:0: on SQLHANDLE] [MicroStrategy][ODBC Oracle Wire Protocol driver]Timeout expired" is shown when executing reports from Web When users are trying to execute some reports in MicroStrategy web in particular, they may receive the Error “SQL Generation Complete Index out of range” and “Timeout expired” error as shown below: Possible Causes: One possible cause is that the MicroStrategy Intelligence Server using a cached database connection that was already dropped by the RDBMS. To resolve this: Admin should delete the database connection caches and create a new DSNs in case they are sharing DSNs to connect to different databases. In addition, change the settings for the ‘Connection lifetime’ and the ‘Connection idle time out’.  Follow the steps below to perform the mentioned changes and verify the report after each step and some of the settings require i-server r...

Update the data on an Intelligent Cube without having to republish the entire cube in MicroStrategy

Update the data on an Intelligent Cube without having to republish the entire cube in MicroStrategy MicroStrategy has introduced a feature known as, Incremental Refresh Options, which allow Intelligent Cubes to be updated based on one or more attributes, by setting up incremental refresh settings to update the Intelligent Cube with only new data. This can reduce the time and system resources necessary to update the Intelligent Cube periodically versus a full republish. For example, if a user has an Intelligent Cube that contains weekly sales data, the user may want this Intelligent Cube to be updated at the end of every week with the sales data for that week. By setting up incremental refresh settings, he can make it so that only data for one week is added to the Intelligent Cube, without affecting the existing data and without having to reload all existing data. Users can select t...

Derived metric based on attribute values

Derived metric based on attribute values Here is how could create and display data correctly on using below simple steps.  Create a report with Category, Subcategory and Revenue. Create New Metric in a report or VI.  Case((Category@ID = 1), Revenue, 0) Booksand Name it as Revenue for  where 2 is Category ID for "Books"  Report will display result as below.  Result for new metric is blank. Now to fix this create a new Derived metric on Category attribute first with formula as  Max(Category) {~ }  and calling Books Now Edit the "Revenue for Books metric and Replace Category@ID with this new Books metric formula would looks like this  Case((Books = 1), Revenue, 0).  Report result would now display as expected as shown below