更新查詢優化器的查詢重寫超時設定

查詢優化器的預設查詢重寫時限為 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>:驗證實例識別碼。

    <token> 持有人授權令牌。

  2. 將 的值更新 optplus.query-timeout-seconds 為所需的超時秒數。