InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 51. |
Avoiding NULL in columns may make queries simpler.(a) True(b) FalseI had been asked this question in my homework.This interesting question is from Choosing Data Types for Efficient Queries topic in section Query Optimization of MySQL |
|
Answer» Correct ANSWER is (a) True |
|
| 52. |
To maintain performance of tables having variable length rows, which statement is used?(a) MAINTAIN TABLE(b) BALANCE TABLE(c) ADJUST TABLE(d) OPTIMIZE TABLEI got this question by my school principal while I was bunking the class.My enquiry is from Choosing Data Types for Efficient Queries in chapter Query Optimization of MySQL |
|
Answer» The correct option is (d) OPTIMIZE TABLE |
|
| 53. |
To convert a string to an int, the function is _________________(a) INET_ATON()(b) INET_NTOA()(c) INET_ITOS()(d) INET_STOI()I got this question in semester exam.My enquiry is from Choosing Data Types for Efficient Queries in chapter Query Optimization of MySQL |
|
Answer» Correct choice is (a) INET_ATON() |
|
| 54. |
To convert an int to string, the function is _________________(a) INET_ATON()(b) INET_NTOA()(c) INET_ITOS()(d) INET_STOI()The question was posed to me by my school teacher while I was bunking the class.This intriguing question comes from Choosing Data Types for Efficient Queries in section Query Optimization of MySQL |
|
Answer» CORRECT answer is (b) INET_NTOA() The best I can EXPLAIN: In MySQL, the function USED to CONVERT an integer to a string is INET_NTOA(). On the other hand, the function INET_ATON() converts a string to the corresponding integer value. |
|
| 55. |
Calculations involving numbers are faster than those involving string.(a) True(b) FalseI had been asked this question during a job interview.I need to ask this question from Choosing Data Types for Efficient Queries in section Query Optimization of MySQL |
|
Answer» The correct option is (a) True |
|
| 56. |
The optimizer_prune_level is set by default.(a) True(b) FalseThis question was addressed to me during a job interview.The above asked question is from MySQL Query Optimizer in section Query Optimization of MySQL |
|
Answer» Right option is (a) True |
|
| 57. |
Which system variable tells how far into the rest of each incomplete plan the optimizer should look to evaluate whether it should be expanded further?(a) optimizer_prune_level(b) optimizer_search_depth(c) optimizer_search(d) optimizer_pruneI have been asked this question at a job interview.I would like to ask this question from MySQL Query Optimizer in division Query Optimization of MySQL |
|
Answer» The correct option is (B) optimizer_search_depth |
|
| 58. |
Which system variable tells the optimizer to skip certain plans based on estimates of the number of rows accessed for each table?(a) optimizer_prune_level(b) optimizer_search_depth(c) optimizer_search(d) optimizer_pruneThis question was posed to me in an online interview.I'd like to ask this question from MySQL Query Optimizer topic in chapter Query Optimization of MySQL |
|
Answer» CORRECT ANSWER is (a) optimizer_prune_level The explanation is: The optimizer_prune_level VARIABLE tells the optimizer to skip CERTAIN plans based on estimates of the number of rows accessed for each table. This option is kept on by default. |
|
| 59. |
Which of these comparisons is slowest?(a) INT/INT(b) INT/BIGINT(c) BIGINT/BIGINT(d) All are of same speedThis question was addressed to me in homework.I want to ask this question from MySQL Query Optimizer topic in portion Query Optimization of MySQL |
|
Answer» The correct OPTION is (B) INT/BIGINT |
|
| 60. |
Which statement is used to force the optimizer to use tables in a particular order?(a) FORCE INDEX(b) USE INDEX(c) IGNORE INDEX(d) STRAIGHT_JOINI have been asked this question during an online interview.The question is from MySQL Query Optimizer topic in portion Query Optimization of MySQL |
|
Answer» Right answer is (d) STRAIGHT_JOIN |
|
| 61. |
Which statement is used to verify optimizer operation?(a) ANALYZE(b) VERIFY(c) EXPLAIN(d) SHOWI have been asked this question at a job interview.The doubt is from MySQL Query Optimizer topic in section Query Optimization of MySQL |
|
Answer» CORRECT OPTION is (c) EXPLAIN Explanation: The EXPLAIN STATEMENT in MYSQL can tell whether the INDEXES are being used or not. This information is helpful when different ways of writing a statement need to be tested. |
|
| 62. |
To perform analysis of key values by the server, the statement used is __________(a) ANALYZE KEYS(b) ANALYZE TABLE(c) PERFORM ANALYSIS(d) PERFORM TABLE ANALYSISThis question was addressed to me in an interview for internship.My question is taken from MySQL Query Optimizer topic in division Query Optimization of MySQL |
|
Answer» Right choice is (b) ANALYZE TABLE |
|
| 63. |
To check how MySQL would execute a SELECT query, which statement is used?(a) TELL(b) SHOW(c) DISPLAY(d) EXPLAINThis question was addressed to me by my school teacher while I was bunking the class.My question is based upon MySQL Query Optimizer topic in section Query Optimization of MySQL |
|
Answer» Right option is (d) EXPLAIN |
|
| 64. |
The slow query log is written as __________(a) numbers(b) text(c) image(d) graphI have been asked this question in semester exam.My query is from Using Indexing in portion Query Optimization of MySQL |
|
Answer» Right option is (b) TEXT |
|
| 65. |
The slow query log can be used to identify queries that may be performing badly.(a) True(b) FalseThis question was posed to me in an online quiz.The query is from Using Indexing in portion Query Optimization of MySQL |
|
Answer» Correct answer is (a) True |
|
| 66. |
For a table having 4 columns, the number of columns to which hash function is applied when using hash indexes is __________(a) 1(b) 2(c) 3(d) 4The question was asked in homework.I want to ask this question from Using Indexing in chapter Query Optimization of MySQL |
|
Answer» Right answer is (d) 4 |
|
| 67. |
If a column contains 7 values and 6 distinct values, the cardinality is __________(a) 7(b) 6(c) 13(d) 1I had been asked this question in an online quiz.This interesting question is from Using Indexing topic in chapter Query Optimization of MySQL |
|
Answer» RIGHT choice is (b) 6 Best explanation: In MySQL, the cardinality of a column is the number of distinct values that it CONTAINS. A column that contains the values 1, 2, 3, 4, 4, 5, 6 has a cardinality of six and not seven. |
|
| 68. |
In a single table (with 10 columns) join query the number of values needed to examine per column is __________(a) 1(b) 10(c) 0(d) 2I had been asked this question by my college professor while I was bunking the class.This is a very interesting question from Using Indexing in division Query Optimization of MySQL |
|
Answer» RIGHT ANSWER is (b) 10 For EXPLANATION I would say: For indexing in the context of performing joins, in a single table query, the number of values that are needed to be examined per COLUMN is the number of rows in the table. |
|
| 69. |
The data rows of a MyISAM table are stored in __________(a) data file(b) index file(c) log file(d) error fileI had been asked this question in a national level competition.My doubt is from Using Indexing in division Query Optimization of MySQL |
|
Answer» Correct CHOICE is (a) data file |
|
| 70. |
The maximum number of indexes on MyISAM table is __________(a) 0(b) 1(c) 2(d) more than 1This question was addressed to me in class test.This is a very interesting question from Using Indexing topic in division Query Optimization of MySQL |
|
Answer» Correct choice is (d) more than 1 |
|
| 71. |
Using indexes optimizes query performance.(a) True(b) FalseI had been asked this question in a national level competition.The query is from Using Indexing topic in section Query Optimization of MySQL |
|
Answer» Correct choice is (a) True |
|