# enableTSDBAsyncSorting {#enabletsdbasyncsorting}

**Parent topic:**[Functions](../../Functions/category.md)

## Syntax {#syntax}

`enableTSDBAsyncSorting()`

## Arguments {#arguments}

None

## Details {#details}

Data written to the TSDB cache engine are sorted by *sortColumns*. The tasks of writing and sorting data can be processed synchronously or asynchronously. Execute the command to enable asynchronous sorting mode. The number of asynchronous threads is specified with configuration parameter *TSDBAsyncSortingWorkerNum*. This command can only be executed by an administrator on a data node. Please make sure the parameter *TSDBAsyncSortingWorkerNum* is configured greater than 0 before executing the command.

It's recommended to enable asynchronous mode for a TSDB engine on a multi-core processor.

Related function: [disableTSDBAsyncSorting](../d/disableTSDBAsyncSorting.md)

