# Clarification on "OPTIMIZE TABLE" Behavior in SingleStore 5.7.32

**URL:** <https://www.singlestore.com/forum/t/clarification-on-optimize-table-behavior-in-singlestore-5-7-32/8227>\
**Category:** Help\
**Tags:** developer\
**Created:** [May 1, 2025, 9:49pm UTC](https://www.singlestore.com/forum/t/clarification-on-optimize-table-behavior-in-singlestore-5-7-32/8227 "2025-05-01T21:49:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bruce.chen](https://www.singlestore.com/forum/letter_avatar_proxy/v4/letter/b/b38774/32.png) [@bruce.chen](https://www.singlestore.com/forum/u/bruce.chen)\
**Post date:** [May 1, 2025, 9:49pm UTC](https://www.singlestore.com/forum/t/clarification-on-optimize-table-behavior-in-singlestore-5-7-32/8227/1 "2025-05-01T21:49:12Z")

</div>

Hi Team,

I’m currently running SingleStore version 5.7.32 (Self-Managed) and would like to clarify the behavior of the `OPTIMIZE TABLE` command.

Specifically, I’d like to know:

- Does running `OPTIMIZE TABLE` on a rowstore table in version 5.7.32 cause any downtime or lock the table for reads/writes?

I found in document that as for our cloud edition, the `OPTIMIZE TABLE` will execute online, which I think it won’t bring any downtime. Is the behavior on version 5.7.32 is the same?

I’ve looked through the 5.7 documentation but could not find a dedicated page explaining the command in detail.

> **[Data Definition Language (DDL)](https://archived.docs.singlestore.com/v5.7/reference/sql-reference/data-definition-language-ddl/data-definition-language-ddl/)**
>
> This page contains a list of all data definition language (DDL) commands in MemSQL:
> LOCK TABLES DROP DATABASE UNLOCK TABLES DROP TABLE DROP VIEW ALTER TABLE CREATE DATABASE CREATE INDEX CREATE TABLE DESCRIBE DROP INDEX FLUSH TABLES ALTER VIEW DROP …...

Any clarification or reference material would be greatly appreciated.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![rsantos](https://www.singlestore.com/forum/letter_avatar_proxy/v4/letter/r/7feea3/32.png) [@rsantos](https://www.singlestore.com/forum/u/rsantos)\
**Post date:** [May 6, 2025, 3:52pm UTC](https://www.singlestore.com/forum/t/clarification-on-optimize-table-behavior-in-singlestore-5-7-32/8227/2 "2025-05-06T15:52:00Z")

</div>

Hi Bruce,

The version you’re seeing refers to MySQL compatibility. To check the actual SingleStore version, you can run the following query:

```auto
SELECT @@memsql_version;

```

Running OPTIMIZE TABLE does not cause any downtime, so you can execute it without any issues. This command is used to reclaim storage and improve performance by reorganizing the physical layout of data on disk. It’s especially helpful after large deletions or bulk updates, as it can reduce storage usage and improve query efficiency.

You can read more about it here: [OPTIMIZE TABLE · SingleStore Self-Managed Documentation](https://docs.singlestore.com/db/v8.9/reference/sql-reference/data-definition-language-ddl/optimize-table/)
