Clarification on "OPTIMIZE TABLE" Behavior in SingleStore 5.7.32

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.

Any clarification or reference material would be greatly appreciated.

Thanks in advance!

Hi Bruce,

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

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