Question
Which of the following best describes the primary
function of a database index?Solution
A database index is a data structure that improves the speed of data retrieval operations on a database table at the cost of additional space and maintenance overhead. The index works similarly to an index in a book, which allows you to quickly locate a specific entry without scanning the entire content.
- Performance Boost : By providing fast access paths to data, an index improves query performance, especially for SELECT queries that involve searching, sorting, or joining large tables.
- Structure : Indexes typically use structures like B-trees or hash tables to allow rapid lookups. When a query is executed, the database system uses the index to quickly locate the relevant rows, rather than scanning every record in the table.
- Use Case Example : For a table with a large number of records, such as a customer database, creating an index on the customerID column allows the database to find a specific customer much faster than searching through all the rows.
The average of two consecutive even numbers is 79. If the smaller number is increased by 50% and the larger number is decreased by 50%, then find the di...
The average weight of 10 students is 45 kg. If a new student joins, the average becomes 46 kg. Find the weight of the new student.
The average of five consecutive odd numbers is 45. What is the average of the first three numbers among them?
Ashish bought 25 notebooks for Rs.1230 from shop A and 12 notebooks for Rs.805 from shop B. What is the average price he paid per book?
A set contains ten numbers. The average of the first six numbers is (x − 5), and the average of the last three numbers is (x + 1). The average of the...
Average marks scored by each boy in a class were 60, whereas that by each girl were 75. If the number of boys is 50% more than the number of girls, then...
The average age of a class of 17 girls is 12 years. If 3 new girls having average age of 8 years join the class, then the average age of the class becomes:
In an examination, the average marks obtained by the students is 80. After correcting the quantitative mistakes, the average of 90 students is reduced t...
- The average score of a player in 30 matches is 42. In the next five matches, he scored 80, 70, 60, 55, and 45. What is his new average?
Determine the number of Girls in a school of 60 Student when you know that the average weight of all Student is 50 kgs, the average weight of boys...