0
0
MySQLquery~20 mins

Server configuration tuning in MySQL - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Server Tuning Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
query_result
intermediate
2:00remaining
Effect of max_connections on concurrent sessions

Consider a MySQL server configured with max_connections=100. If 105 clients try to connect simultaneously, what will happen to the last 5 connection attempts?

AThe last 5 clients will be refused with an error indicating too many connections.
BThe server will automatically increase max_connections to 105 to allow all clients.
CThe server will queue the last 5 clients until some connections close.
DAll 105 clients will connect successfully without any error.
Attempts:
2 left
💡 Hint

Think about the maximum allowed simultaneous connections setting.

query_result
intermediate
2:00remaining
Impact of innodb_buffer_pool_size on query performance

Given a MySQL InnoDB table of size 10GB, if innodb_buffer_pool_size is set to 1GB, what is the expected impact on query performance compared to setting it to 12GB?

AQueries will be slower with 1GB buffer pool because less data fits in memory, causing more disk reads.
BQueries will be faster with 1GB buffer pool because less memory usage means less overhead.
CQuery performance will be the same regardless of buffer pool size.
DQueries will fail if buffer pool size is less than table size.
Attempts:
2 left
💡 Hint

Consider how caching data in memory affects disk access.

📝 Syntax
advanced
2:00remaining
Correct syntax to change max_allowed_packet size

Which of the following commands correctly changes the max_allowed_packet size to 64MB for the current MySQL session?

ASET max_allowed_packet = 64MB;
BSET GLOBAL max_allowed_packet = 67108864;
CSET SESSION max_allowed_packet = 64MB;
DSET SESSION max_allowed_packet = 67108864;
Attempts:
2 left
💡 Hint

Remember the unit for max_allowed_packet is bytes and how to set session variables.

📝 Syntax
advanced
2:00remaining
Optimizing query cache usage

A MySQL server has query_cache_size set to 256MB but query cache hit ratio remains very low. Which change is most likely to improve query cache effectiveness?

ADisable query cache by setting <code>query_cache_size</code> to 0.
BIncrease <code>query_cache_size</code> to 1GB to cache more queries.
CReduce <code>query_cache_size</code> to 64MB to reduce overhead and fragmentation.
DIncrease <code>max_connections</code> to allow more concurrent queries.
Attempts:
2 left
💡 Hint

Think about how large query cache sizes can cause fragmentation and reduce efficiency.

🧠 Conceptual
expert
2:00remaining
Choosing the right thread_cache_size value

What is the main benefit of increasing thread_cache_size in MySQL server configuration?

AIt improves query execution speed by caching query plans.
BIt reduces the overhead of creating new threads by reusing existing threads for client connections.
CIt increases the maximum number of concurrent client connections allowed.
DIt limits the number of threads that can run simultaneously to prevent overload.
Attempts:
2 left
💡 Hint

Consider what happens when a client disconnects and a new client connects.