本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
OpenCypher 查询超时提示
可以通过查询级别的查询提示在每个查询的基础上配置查询超时行为。QUERY:TIMEOUTMILLISECONDS它必须与USING子句一起使用。查询提示接受非负长整数作为值。
# Using query-level timeout hint % curl https://<endpoint>:<port>/opencypher \ -d "query=USING QUERY:TIMEOUTMILLISECONDS 100 MATCH(n) RETURN n LIMIT 1"
查询超时行为将考虑集群级超时和查询级超时的最小值。请查看以下示例以了解查询超时行为。有关集群级查询超时的更多信息,请参阅 neptune_query_timeout。
# Suppose `neptune_query_timeout` is 10000 ms and query-level timeout is set to 100 ms # It will consider 100 ms as the final timeout % curl https://<endpoint>:<port>/opencypher \ -d "query=USING QUERY:TIMEOUTMILLISECONDS 100 MATCH(n) RETURN n LIMIT 1" # Suppose `neptune_query_timeout` is 100 ms and query-level timeout is set to 10000 ms # It will still consider 100 ms as the final timeout % curl https://<endpoint>:<port>/opencypher \ -d "query=USING QUERY:TIMEOUTMILLISECONDS 10000 MATCH(n) RETURN n LIMIT 1"