Setting SET Statements
Using SET statements to configure query hints is a method to manually optimize query performance. This approach can directly influence the decisions of the database query optimizer, thereby improving database query performance. Once SET statements are configured, query efficiency will be enhanced in scenarios such as dashboards and large screens. This section describes how to set SET statements.
Notes and Constraints
- The currently supported data sources for SET statements are: GaussDB(DWS) and PostgreSQL.
- The parameter name of the SET statement can only contain letters, numbers, periods (.), and underscores (_), with a maximum length of 50 characters.
- A maximum of 10 SET statements can be added.
Prerequisites
- A project has been created by referring to Creating a Project.
- A data source has been connected by referring to Creating a Data Source.
Procedure
- Log in to the DataArts Insight console.
- Click
in the upper left corner of the management console to select a region. Then, select an enterprise project in the upper right corner.
- On the top menu of the console, click Project. On the displayed My Projects page, click the name of the desired project.
- In the navigation pane on the left, choose Data Management > Datasets.
- On the displayed page, click the name of the dataset you created.
- On the dataset editing page, click Set up the SET statement (Figure 1).
- In the dialog box that appears, set the parameters, click Validate, and click OK. Figure 1 lists the join_collapse_limit and from_collapse_limit parameters for the PostgreSQL database. For other parameters and their descriptions, refer to the official documentation. After setting up, click View SQL Statement to view the configured SET statements (Figure 2).
Once SET statements are configured, when performing data analysis on the dashboard, click
in the upper right corner of the chart and select View SQL Statement to view the configured SET statements.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot