Redis › Redis Monitoring & Observability
What is the Redis slow log, and how do you use it to identify commands that are taking longer than expected to execute?
IntermediateAnswer
The slow log automatically records any command that takes longer than a configured threshold to execute, and you review it using the SLOWLOG GET command, which shows you the specific slow commands along with their execution time, helping you identify problematic queries or patterns that might be affecting your overall Redis performance.
CONFIG SET slowlog-log-slower-than 10000
SLOWLOG GET 10Real-world example A team investigating occasional latency spikes reviews their slow log, discovering a specific command pattern from a reporting script was consistently appearing, leading them to optimize that particular operation.