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

KB484689: Reports against Amazon Redshift may have performance degradation when the Parameterized Query is enabled


Rambo Qian

Quality Engineer, Principal • MicroStrategy


When users run reports against Amazon Redshift with the Parameterized Query is enabled and if many elements are selected in filter, they may encounter performance degradation comparing with when the Parameter Query is disabled.

In the Strategy 2021 release, Parameterized Query is enabled by default for all newly created database connections against a list of Strategy certified Diamond Gateways. With the Parameterized Query option enabled, reports containing text filters and prompts will be executed using parameter markers (?) during SQL execution.
 

Symptom


When users run reports against Amazon Redshift with the Parameterized Query is enabled and if many elements are selected in filter, they may encounter performance degradation comparing with when the Parameter Query is disabled.
Report SQL like below, there’re hundreds of parameters included in the query:

select    a11.p_name  p_namefrom    part    a11where    a11.p_name in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);

Cause


According to Redshift team’s investigation, the root cause of the performance degradation is that the PrepareStatement function is not optimized in Redshift which the function is used in Parameterized Query, but it only happens on tiny Redshift cluster type such as ds2.large or dc2.xlarge which has limited computer resource.

Action


To avoid this performance degradation, it’s recommended to promote Redshift cluster to higher type such as RA3 which has more powerful computer capacity.
 


Comment

0 comments

Details

Knowledge Article

Published:

November 6, 2020

Last Updated:

December 20, 2020