0
0
Redisquery~20 mins

Slow log for performance analysis in Redis - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Redis Slow Log Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
query_result
intermediate
1: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 3
AReturns an error because the argument '3' is invalid for SLOWLOG GET.
BReturns the total number of slow log entries stored in Redis.
CClears the last 3 slow log entries from the slow log.
DReturns the last 3 slow log entries with details like ID, timestamp, execution time, and command arguments.
Attempts:
2 left
💡 Hint
Think about what 'GET' means in the context of slow logs.
🧠 Conceptual
intermediate
1:30remaining
Why is the Redis slow log useful for performance analysis?
Choose the best reason why Redis slow log helps in analyzing performance issues.
AIt shows the total memory used by Redis at any moment.
BIt records commands that took longer than a configured threshold, helping identify slow operations.
CIt deletes keys that cause slowdowns to improve performance.
DIt automatically fixes slow commands by optimizing them.
Attempts:
2 left
💡 Hint
Think about what kind of information helps find slow commands.
📝 Syntax
advanced
1: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?
ASLOWLOG CLEAR
BSLOWLOG RESET
CSLOWLOG DELETE ALL
DSLOWLOG FLUSH
Attempts:
2 left
💡 Hint
Check the official Redis command for clearing slow logs.
optimization
advanced
2:00remaining
How can you configure Redis to log only commands slower than 5 milliseconds?
Which command sets the slow log threshold to 5 milliseconds?
ACONFIG SET slowlog-log-slower-than 5
BCONFIG SET slowlog-threshold 5
CCONFIG SET slowlog-log-slower-than 5000
DCONFIG SET slowlog-threshold 5000
Attempts:
2 left
💡 Hint
The threshold is in microseconds, so 5 milliseconds equals 5000 microseconds.
🔧 Debug
expert
2:00remaining
What error occurs when running SLOWLOG GET -1 in Redis?
You run SLOWLOG GET -1 to get slow log entries. What happens?
ARaises an error: ERR invalid argument for SLOWLOG GET.
BReturns an empty list because negative count is invalid.
CReturns all slow log entries without error.
DReturns the last slow log entry only.
Attempts:
2 left
💡 Hint
Check if negative numbers are valid arguments for SLOWLOG GET.