I tried to set timeout for query in IoTDB. I changed the value of configuration file in iotdb-engine.properties like follows: But it seems to be same for every query. How can I set different timeout for queries?
CodePudding user response:
For queries that take too long to execute, IoTDB will forcibly interrupt the query and throw a timeout exception, as shown in the figure:
IoTDB> select * from root; Msg: 701 Current query is time out, please check your statement or modify timeout parameter.
The default timeout of a query is 60000 ms,which can be customized in the configuration file through the query_timeout_threshold parameter.
If you use JDBC or Session, we also support setting a timeout for a single query(Unit: ms):
((IoTDBStatement) statement).executeQuery(String sql, long timeoutInMS) session.executeQueryStatement(String sql, long timeout)