MySQL Questions and Answers – Tuning the Server

This set of MySQL Database Multiple Choice Questions & Answers (MCQs) focuses on “Tuning the Server”.

1. Which mode exists at both global level and session-specific level?
a) sql_mode
b) key_buffer_size
c) server_mode
d) query_mode
View Answer

Answer: a
Explanation: The system variable ‘sql_mode’ that indicates the default SQL mode is an example of a variable that exists at both the global and session levels. This mode affects several aspects of SQL statement processing.

2. Which system variable determines the number of rows from INSERT DELAYED statements that can be queued per table?
a) fast_queue_size
b) general_queue_size
c) slow_queue_size
d) delayed_queue_size
View Answer

Answer: d
Explanation: The system variable ‘delayed_queue_size’ determines the number of rows from INSERT DELAYED statements that can be queued per table (for the storage engines that support DELAYED inserts).

3. The largest value to which the variable ‘max_allowed_packet’ can be set is ______________
a) 1GB
b) 2GB
c) 4GB
d) 8GB
View Answer

Answer: a
Explanation: The ‘max_allowed_packet’ stores the maximum size to which the buffer used for client communications can grow. The largest value to which ‘max_allowed_packet’ variable can be set is 1GB.
advertisement
advertisement

4. Increasing the value of which system variable enables mysqld to keep more tables open simultaneously?
a) table_cache
b) max_connect
c) delayed_queue_size
d) max_allowed_packet
View Answer

Answer: a
Explanation: The ‘table_cache’ stores the size of the table cache. Increasing the value enables ‘mysqld’ to keep more tables open simultaneously by reducing the number of files open and close operations.

5. The keyword used with UNION that retains duplicate rows is ___________
a) ALL
b) NARROW
c) STRICT
d) DISTINCT
View Answer

Answer: a
Explanation: The keyword ‘ALL’ used along with ‘UNION’ is not synonymous with just the ‘UNION’ statement. It produces the duplicate rows, if they exist, from the combination of the two tables in the SELECT query.

6. The search mode that uses natural language search as a subroutine is ____________
a) Natural language
b) Boolean mode
c) Query expansion
d) Cross mode
View Answer

Answer: c
Explanation: The query expansion search occurs in two phases. The natural language search is applied in the first phase. Query expansion search is one of the three modes of fulltext searching.

7. For what can the FULLTEXT indexes be created for?
a) MyISAM
b) InnoDB
c) MEMORY
d) TRANSITION
View Answer

Answer: a
Explanation: Full-text searches are based on the FULLTEXT indexes. They can be created for MyISAM tables only. In MySQL, a full text search enables to look for words or phrases without using pattern-matching operations.
advertisement

8. A FULLTEXT index can be created for multiple columns.
a) True
b) False
View Answer

Answer: a
Explanation: In MySQL, a full-text search is based on the FULLTEXT indexes. A FULLTEXT index can be created both for a single column and for multiple columns. Searching is possible across columns.

Sanfoundry Global Education & Learning Series – MySQL Database.

advertisement

To practice all areas of MySQL Database, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.