---
title: "Compacting the on-disk database"
method: POST
path: "/operations/db/compact"
tags: ["operations"]
---

# Compacting the on-disk database

`POST /operations/db/compact`

Typesense uses RocksDB to store your documents on the disk. If you do frequent writes or updates, you could benefit from running a compaction of the underlying RocksDB database. This could reduce the size of the database and decrease read latency. While the database will not block during this operation, we recommend running it during off-peak hours.

## Response `200`

Compacting the on-disk database succeeded.

- SuccessStatus
  - `success` boolean, required

---

[API](https://skmtc.dev/typesense/apis/typesense-api.md) · [All operations](https://skmtc.dev/typesense/apis/typesense-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/typesense/typesense-api/revisions/1d9b3b61638e/schema)
