🔴 Redis Intermediate

What is the Redis slow log?

Answer

The Redis slow log records commands that exceed a configurable execution time threshold (slowlog-log-slower-than, in microseconds, default 10,000 = 10ms; set to 0 to log all, -1 to disable). SLOWLOG GET [count] retrieves the most recent slow entries, showing the command, arguments, timestamp, and execution duration. SLOWLOG LEN shows the number of entries; SLOWLOG RESET clears it. The slow log is essential for diagnosing performance issues — common findings include: KEYS * or SMEMBERS on huge sets blocking the server, unindexed range scans, or excessive Lua script execution time. Unlike application-level logging, the slow log measures pure server-side processing time, excluding network I/O.