---
title: "Other functions"
description: "CoraDB utility functions: BENCHMARK times an expression, SLEEP pauses a statement, and SYS_GUID returns a random identifier."
url: "https://www.coradb.ai/manual/sql/function/other_fn.html"
markdown_url: "https://www.coradb.ai/manual/markdown/sql/function/other_fn.md"
product: "CoraDB"
version: "1.0"
keywords: "benchmark function, sleep function, sys_guid, guid, uuid, random identifier, coradb"
---

# Other functions

## BENCHMARK

```text
BENCHMARK(count, expression)
```

Evaluates *expression* *count* times and returns the elapsed time in seconds. Use it to compare the cost of expressions and functions. *count* must be a positive integer; if it is **NULL**, the result is **NULL**. A subquery in *expression* may be evaluated only once and reused. **Return type:** DOUBLE.

```sql
SELECT BENCHMARK(100000, SHA1('coradb'));   -- for example 0.022481736
```

## SLEEP

```text
SLEEP(seconds)
```

Pauses the statement for the given number of seconds, then returns 0. *seconds* is a `DOUBLE`, so fractions such as `0.5` are allowed. Use it to simulate slow work when testing timeouts or locking. **Return type:** INT.

```sql
SELECT SLEEP(3);   -- returns 0 after three seconds
```

## SYS_GUID

```text
SYS_GUID()
```

Returns a random 32-character hexadecimal string, different on every call. Use it as a globally unique identifier. **Return type:** VARCHAR.

```sql
SELECT SYS_GUID();
```

```text
938210043A7B4455927A8697FB2571FF
```
