nerdexam
Oracle

1Z0-888 · Question #15

Consider these global status variables: mysql> SELECT * FROM performance_schema.global_status WHERE VARIABLE_NAME LIKE '%connection%' OR VARIABLE_NAME LIKE '%thread%'…

The correct answer is B. There are 510 connections to MySQL at the time of the output. D. There are more connections being idle than executing queries. B is correct because Connections = 510 is the cumulative count of all connection attempts to MySQL since the server started - exactly what the output shows as of that moment. D is correct because Threads_connected = 140 (currently connected) minus Threads_running = 14 (actively…

Monitoring

Question

Consider these global status variables: mysql> SELECT * FROM performance_schema.global_status WHERE VARIABLE_NAME LIKE '%connection%' OR VARIABLE_NAME LIKE '%thread%'; +---------------------------------------+---------------------+ | VARIABLE_NAME | VARIABLE_VALUE | +---------------------------------------+---------------------+ | Connection_errors_accept | 0 | | Connection_errors_internal | 6 | | Connection_errors_max_connections | 0 | | Connections_errors_peer_address | 0 | | Connection_errors_select | 0 | | Connection_errors_tcpwrap | 0 | | Connections | 510 | | Delayed_insert_threads | 0 | | Max_used_connections | 145 | | Performance_schema_thread_classes_lost | 0 | | Performance_schema_thread_instances_lost | 0 | | Slow_launch_threads | 0 | | Threads_cached | 6 | | Threads_connected | 140 | | Threads_created | 155 | | Threads_running | 14 | +---------------------------------------+---------------------+ 17 rows in set (0.00 sec) Which two conclusions can be made from the output?

Options

  • AThere are 140 Performance Schema threads at the time of the output.
  • BThere are 510 connections to MySQL at the time of the output.
  • CThe thread cache has been configured with thread_cache_size set to at least 6.
  • DThere are more connections being idle than executing queries.
  • EAll max_connections were in use at 2018-03-22 14:54:06

How the community answered

(50 responses)
  • A
    12% (6)
  • B
    80% (40)
  • C
    2% (1)
  • E
    6% (3)

Explanation

B is correct because Connections = 510 is the cumulative count of all connection attempts to MySQL since the server started - exactly what the output shows as of that moment. D is correct because Threads_connected = 140 (currently connected) minus Threads_running = 14 (actively executing) leaves 126 idle connections - far outnumbering the 14 active ones.

A is wrong: Threads_connected = 140 counts client connection threads, not Performance Schema threads, which are tracked by separate variables like Performance_schema_thread_instances_lost. C is a trap: while 6 threads are currently cached, thread_cache_size could have been set to a higher value or changed after those threads were cached, so you cannot reliably infer the configured setting from Threads_cached alone. E is wrong because Max_used_connections = 145 shows the all-time peak concurrent connections, but this output contains no timestamp metadata - the date in the answer is fabricated and not derivable from anything shown.

Memory tip: Keep three counters straight - Connections (total ever, like a turnstile count), Threads_connected (currently in the building), and Threads_running (currently at a desk working). Idle = connected minus running.

Topics

#Connection Management#Thread Monitoring#Status Variables#System Performance

Community Discussion

No community discussion yet for this question.

Full 1Z0-888 Practice