Understanding Indexes
Which of the following is most effective for speeding up searches in a large table with millions of rows, such as finding a user by email address?
- A. Creating an index on the email address column
- B. Increasing the size of the table
- C. Duplicating rows in the table
- D. Adding more columns to the table
- E. Using uppercase letters in column names
Optimizing Queries
You notice that a query selecting all columns from a table runs slowly. Which optimization could quickly improve its performance?
- A. Selecting only the needed columns instead of all columns
- B. Deleting random rows
- C. Changing data types to larger ones
- D. Sorting the table alphabetically in every query
- E. Using more joins than necessary
Normalization Basics
Why does removing repetitive data (for example, customer addresses repeated in every order) help improve database performance?
- A. It reduces data redundancy and increases efficiency
- B. It adds more storage to the table
- C. It complicates queries unnecessarily
- D. It slows down backup processes
- E. It requires larger network cables
Writing Efficient Queries
Given a choice, which sorting operation is faster and less resource-intensive for a database?
- A. Sorting by an indexed column
- B. Sorting by a calculated field every time
- C. Sorting by unrelated tables
- D. Sorting by all columns at once
- E. Sorting by misspelled column names
Caching Strategies
How does enabling query result caching benefit a frequently accessed, rarely changing 'product list' table?
- A. It reduces the need to run the same query repeatedly
- B. It increases the number of rows in the table
- C. It causes outdated results to display forever
- D. It slows down users from accessing the table
- E. It prevents any future updates to the table