SQLite and others seem to have functions (commands) to optimize DB because increasing or decreasing data and tables create unnecessary areas. Is there any function or command to optimize Realm?
Or is it not necessary to optimize the structure of Realm?
I look forward to your kind cooperation.
"It was stated in the link below that ""vacuum"" is possible for ROS 3.6.0 or later."
Vacuum Utility-Realm Sync Docs
Realm stores its transactions within files on the server. Over time, these files can become fragmented as new transactions are too large to fit into previously allocated space in the file. When this happens, the file allocates more free disk space for the transaction and as a result a small amount of space may go unused in the original file. Over time, this unused space can add up and be wasteful as well as decrease peperformance.As a result, we offer a "vacuum" utility in ROS version 3.6.0 and newer.This utility remove the unused space and effectively contracts the transaction logs and state.
Here's how to do it:
realm-vacuum<path-to-your-big-server-file>
© 2024 OneMinuteCode. All rights reserved.