Database Autonomy Service (DAS) provides the key analysis feature. You can use this feature to view the information about hot keys and big keys in your database instance. For example, you can view the memory that is used by keys, how the keys are distributed in the memory, and the time at which each key expires. This way, you can optimize database performance based on the queried data. The key analysis feature also helps you prevent issues caused by unbalanced distribution of keys in the memory, such as out of memory and reduced performance.
- The instance is an instance of ApsaraDB for Redis Community Edition whose major version is 5.0 or a performance-enhanced instance of ApsaraDB for Redis Enhanced Edition (Tair). For more information about the performance enhanced instance, see Performance-enhanced instances.
- The minor version of the instance is the latest version. For more information about how to update the minor version of the instance, see Update the minor version.
|Big key||ApsaraDB for Redis sorts keys of the List, Hash, Set, and Zset types based on the
number of elements. ApsaraDB for Redis considers the top three keys that have the
most elements as big keys. If two keys have the same number of elements, the key that
first reaches this number of elements ranks higher.
|Hotkey||ApsaraDB for Redis uses efficient sorting and statistical algorithms based on the
Least Frequently Used (LFU) algorithm to identify hotkeys of an instance.
- Log on to the DAS console.
- In the left-side navigation pane, click Instance Monitoring.
- Find the database instance that you want to manage and click the instance ID. The instance details page appears.
- In the left-side navigation pane, click Key Analysis.
- Click the Real-time or History tab to view the information about hot keys and big keys. Note On the History tab, you can view the information about big keys and hot keys. On the History tab, you can query the information about big keys and hot keys that are analyzed within the last four days. The maximum interval between the start time and the end time is three hours.