更新查询优化器的查询重写超时设置

查询优化器的默认查询重写超时时间为60秒。 在激活查询优化器后,您可以使用PATCH API修改此值。

过程

  1. 运行以下 PATCH API 命令以更新查询重写超时:

    curl --request PATCH  \
    --url https://{REGION}.lakehouse.cloud.ibm.com/lakehouse/api/v3/prestissimo_engines/{ENGINE_ID} \
    --header 'accept: application/json' \
     --header 'Content-Type: application/merge-patch+json' \
     --header 'AuthInstanceId: {CRN}' \
    --header 'Authorization: Bearer <BEARER_TOKEN>' \
    -d '{
        "display_name": "prestissimo-small",
        "description": "",
        "properties": {
            "configuration": {
                "coordinator": {
                    "query.max-history": "2000"
                },
                "worker": {
                }
            },
            "jvm": {
                "coordinator": {
                }
            },
            "catalog": {
                "hive_data": {
                    "coordinator": {
                    },
                    "worker": {}
                }
            },
            "velox": {
            },
            "log_config": {
                "coordinator": {
                },
                "worker": {}
            },
            "optimizer_properties": {
                "optplus.query-timeout-seconds":"3000"
    
            },
            "global": {}
        },
        "restart_type": "force",
        "tags": []
    }'
    

    <console-url> 控制台 URLwatsonx.data。

    <instance-id> 实例标识符。

    <engine-id> 引擎 Presto 标识符。

    <auth-instance-id> 身份验证实例ID。

    <token> 用于授权的凭证令牌。

  2. 将 的值 optplus.query-timeout-seconds 更新为所需的超时时间(单位:秒)。