在 Azure Synapse Analytics 的专用 SQL 池中配置工作负载重要性Configure workload importance in dedicated SQL pool for Azure Synapse Analytics

在 Azure Synapse 的专用 SQL 池中设置重要性可以影响查询计划。Setting importance in dedicated SQL pool for Azure Synapse allows you to influence the scheduling of queries. 重要性较高的查询将安排在重要性较低的查询之前运行。Queries with higher importance will be scheduled to run before queries with lower importance. 若要为查询分配重要性,需要创建工作负荷分类器。To assign importance to queries, you need to create a workload classifier.

创建具有重要性的工作负载分类器Create a Workload Classifier with Importance

在数据仓库方案中,用户通常需要在繁忙的系统上快速运行其查询。Often in a data warehouse scenario you have users, on a busy system, who need to run their queries quickly. 用户可能是需要运行报表的公司高管人员,也可能是运行即席查询的分析师。The user could be executives of the company who need to run reports or the user could be an analyst running an adhoc query. 要分配重要性,请创建一个工作负载分类器,并向查询分配重要性。To assign importance, you create a workload classifier and importance is assigned to a query. 下面的示例使用 create workload classifier 语法创建了两个分类器。The examples below use the create workload classifier syntax to create two classifiers. Membername 可以是单个用户或组。Membername can be a single user or a group. 若要查找现有的专用 SQL 池用户,请运行:To find existing dedicated SQL pool users, run:

Select name from sys.sysusers

若要为重要性较高的用户创建工作负荷分类器,请运行:To create a workload classifier, for a user with higher importance run:

CREATE WORKLOAD CLASSIFIER ExecReportsClassifier
    WITH (WORKLOAD_GROUP = 'xlargerc'
         ,MEMBERNAME     = 'name' 
         ,IMPORTANCE     = above_normal);

若要为重要性较低运行即席查询的用户创建工作负荷分类器,请运行:To create a workload classifier for a user running adhoc queries with lower importance run:

CREATE WORKLOAD CLASSIFIER AdhocClassifier
    WITH (WORKLOAD_GROUP = 'xlargerc'
         ,MEMBERNAME     = 'name' 
         ,IMPORTANCE     = below_normal);

后续步骤Next Steps