5 questions to test your understanding
A table has 500,000 rows, each 200 bytes. Pages are 8KB. A query needs exactly one row. How many pages must the database read in the worst case (assuming a heap file with no index)?
When a record is moved within a page during compaction, the database must update every external reference (such as index entries) pointing to that record's location.
The database reads a minimum of one full page from disk even if the query only needs a single column from a single row.
Variable-length columns (VARCHAR, TEXT) are stored at the beginning of a record so the database can quickly locate them.
Why is the page the fundamental unit of disk I/O in a database system, and what consequence does this have for query performance?