EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB484832: Optimize CONCAT expression containing multiple constant Strings to improve performance


Min Zhao

Quality Engineer, Principal • MicroStrategy


This article explains a scenario that CONCAT expression is optimized to improve performance when there are too many Strings to CONCAT for the Derived Attribute created by “Create Links”.

Starting with the release of Strategy ONE (March 2024), dossiers are also known as dashboards.
The improvement works for CONCAT function used in both Derived Attribute and Derived Metric. It merges the constant Strings in the CONCAT expression to improve performance.
Steps to Reproduce
This procedure is using Strategy Tutorial WH that is shipped with Strategy products.

  1. Login to Strategy Web, go to Add External Data -> Databases -> Pick Tables and pick the following table and columns

ka0PW0000001Jf9YAE_0EM4W000001KV0b.png
  1. Click Finish to Import as an In-memory Dataset and save as MTDI

ka0PW0000001Jf9YAE_0EM4W000001KV0c.png

 

  1. Create dossier based on MTDI, create links based on Attribute Year Id

ka0PW0000001Jf9YAE_0EM4W000001KV0d.png
  1. Add into template: Year Id(Link)
  1. Check MCE Trace, notice that constant string ‘'' href='' ‘ and ‘?&src=mstrWeb.3140&evt=3140&documentID=BE6501164438B2DA47662EAC644CC565’  work as two different parameters in the CONCAT function.

select      [Year Id]@[YEAR_ID],
                [Year Id]@[YEAR_ID] as [Year Id(Link)]@[ID],
                Concat('<a data='', [Year Id]@[YEAR_ID], '' href='', ?&src=mstrWeb.3140&evt=3140&documentID=BE6501164438B2DA47662EAC644CC565, '' target='_blank' rel='noopener noreferrer'>', [Year Id]@[YEAR_ID], </a>) as [Year Id(Link)]@[FORM_1]
from        Ex0_tempcube0
to             RELATION0-<Year Id(Link), Year Id>
Cause:
This is a known issue in Strategy.
Solution:
This issue has been addressed in Strategy 2021.
To pick up the fix, upgrade to Strategy 2021 or above and enable project level setting "Data Engine Version" to 2021 or above. For more details on enabling the setting, refer to Data Engine Version.
After the fix, it optimizes the CONCAT function to merge constant string ‘'' href='' ‘ and ‘?&src=mstrWeb.3140&evt=3140&documentID=BE6501164438B2DA47662EAC644CC565’  to be one parameter, so that we can improve the performance.
select      [Year Id]@[YEAR_ID],
                [Year Id]@[YEAR_ID] as [Year Id(Link)]@[ID],
                Concat('<a data='', [Year Id]@[YEAR_ID], '' href='?&src=mstrWeb.3140&evt=3140&documentID=BE6501164438B2DA47662EAC644CC565' target='_blank' rel='noopener noreferrer'>', [Year Id]@[YEAR_ID], </a>) as [Year Id(Link)]@[FORM_1]
from        Ex0_tempcube0
to             RELATION0-<Year Id(Link), Year Id>
Strategy internal reference number for this technical note is DE172805.
 


Comment

0 comments

Details

Knowledge Article

Published:

January 15, 2021

Last Updated:

March 21, 2024