Indexes
- Suppose Person is a table consisting of 8 rows and Employee is a table consisting of 6 rows, the number of combinations through which the search is performed is __________.
SELECT Person.i1, Employee.i2
FROM Person INNER JOIN Employee
WHERE Person.i1 = Employee.i2;
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
In MySQL, when the tables are unindexed, the searches are run through all the possible combinations. In this case, the search space is 8 x 6 = 48, the product of the number of rows.
- In a single table (with 10 columns) join query the number of values needed to examine per column is __________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
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.
- The data rows of a MyISAM table are stored in __________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
The data rows of the MyISAM table are stored in a data file and the index values are stored in a separate index file. In MySQL, for a MyISAM table, there can be more than one indexes.
- The maximum number of indexes on MyISAM table is __________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
In MySQL, for a MyISAM table, there can be more than one indexes. The data rows of the MyISAM table are stored in a data file and the index values are stored in a separate index file.
- Using indexes optimizes query performance.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
In MySQL, there are many techniques available for optimizing queries. Indexing is the most useful. Generally the one thing that makes the most difference is the proper use of indexes.