# reverse

Reverses the event order.

```tql
reverse
```

## Description

`reverse` is a shorthand notation for [`slice stride=-1`](https://preview.docs.tenzir.com/375/375/reference/operators/slice.md).

Potentially High Memory Usage

Use caution when applying this operator to large inputs. It currently buffers all data in memory. Out-of-core processing is on our roadmap.

## Examples

### Reverse a stream of events

```tql
from {x: 1}, {x: 2}, {x: 3}
reverse
```

```tql
{x: 3}
{x: 2}
{x: 1}
```

## See Also

* [`sort`](https://preview.docs.tenzir.com/375/375/reference/operators/sort.md)
* [Slice and sample data](https://preview.docs.tenzir.com/375/375/guides/optimization/slice-and-sample-data.md)