Challenge - 5 Problems
Redis Slow Log Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ query_result
intermediate1:30remaining
What does the Redis command
SLOWLOG GET 3 return?You run the command
SLOWLOG GET 3 in Redis. What is the expected output?Redis
SLOWLOG GET 3Attempts:
2 left
💡 Hint
Think about what 'GET' means in the context of slow logs.
✗ Incorrect
The command
SLOWLOG GET 3 fetches the last 3 slow log entries, showing details such as the unique ID, timestamp, execution time in microseconds, and the command that was slow.🧠 Conceptual
intermediate1:30remaining
Why is the Redis slow log useful for performance analysis?
Choose the best reason why Redis slow log helps in analyzing performance issues.
Attempts:
2 left
💡 Hint
Think about what kind of information helps find slow commands.
✗ Incorrect
The slow log records commands that exceed a set execution time threshold, allowing developers to find and optimize slow commands.
📝 Syntax
advanced1:30remaining
Which Redis command correctly resets the slow log?
You want to clear all entries in the Redis slow log. Which command will do this?
Attempts:
2 left
💡 Hint
Check the official Redis command for clearing slow logs.
✗ Incorrect
The correct command to clear all slow log entries is
SLOWLOG CLEAR. Other options are invalid commands.❓ optimization
advanced2:00remaining
How can you configure Redis to log only commands slower than 5 milliseconds?
Which command sets the slow log threshold to 5 milliseconds?
Attempts:
2 left
💡 Hint
The threshold is in microseconds, so 5 milliseconds equals 5000 microseconds.
✗ Incorrect
The slow log threshold is set in microseconds. 5 milliseconds = 5000 microseconds, so the correct command is
CONFIG SET slowlog-log-slower-than 5000.🔧 Debug
expert2:00remaining
What error occurs when running
SLOWLOG GET -1 in Redis?You run
SLOWLOG GET -1 to get slow log entries. What happens?Attempts:
2 left
💡 Hint
Check if negative numbers are valid arguments for SLOWLOG GET.
✗ Incorrect
The argument to SLOWLOG GET must be a non-negative integer. Negative values cause an error.