在Clickhouse中查詢時,報如下錯誤:
DB::Exception: Timeout exceeded: elapsed 5.001140127 seconds, maximum: 5:
發現超時了,查看Clickhouse的設置表:
:) select * from system.settings where name='max_execution_time'
┌─name───────────────┬─value─┬─changed─┐
│ max_execution_time │ 5 │ 1 │
└────────────────────┴───────┴─────────┘
max_execution_time 參數用於配置最大運行時間,我的值設置太小,所以會報錯。
可以通過設置max_execution_time值來解決問題。設置方式爲:
SET max_execution_time = 30;