SLEEP
statementThe SLEEP
statement is used to introduce a delay or pause in the execution of a query or a batch of queries for a specific amount of time.
SurrealQL SyntaxSLEEP @duration;
The following query shows example usage of this statement.
-- Sleep one second SLEEP 1s; -- Sleep 100 milliseconds SLEEP 100ms;
For more dynamic usage of sleep, see SurrealDB’s sleep function.
SLEEP
can be useful in a small number of situations, such as: