LindormSearch lets you configure cold storage for tables, reducing storage costs for data that is written infrequently and queried rarely. Queries on cold storage tables complete significantly slower than on hot storage, so cold storage is best suited for archival or audit data where response time is not critical.
Prerequisites
Before you begin, ensure that you have:
Enabled cold storage on your Lindorm instance. For more information, see Enable cold storage
Downloaded and installed Search Shell. For more information, see Use Search Shell to connect to and use LindormSearch
When to use cold storage
Cold storage is a good fit when a table meets both of the following conditions:
Low write volume: only a small amount of data is written to the table
Infrequent queries: queries on the table are rare
If the table is still queried frequently, keep it in hot storage. Moving frequently queried data to cold storage will noticeably increase query response times.
Move a table to cold storage
Replace collection_name with the name of your table in all commands below.
Run the
RELOADcommand. This helps reduce the period of time that is required to migrate cold data to cold storage../search-cli reload_collection -c collection_nameSet the storage type of the table to cold storage.
./search-cli modify_collection -c collection_name -s COLDTrigger a major compaction to migrate data from hot storage to cold storage.
./search-cli major_compaction -c collection_nameAfter the migration is complete, run the following command to release the hot storage capacity. The migration is performed in an asynchronous manner. We recommend that you wait 30 to 60 minutes before you release the hot storage capacity.
./search-cli reload_collection -c collection_name