0
0
Supabasecloud~5 mins

Database indexes in Supabase - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a database index?
A database index is like a shortcut in a book's table of contents. It helps the database find data faster without looking at every row.
Click to reveal answer
beginner
How does an index improve database queries?
An index speeds up queries by letting the database quickly locate the data instead of scanning the whole table.
Click to reveal answer
intermediate
What is a downside of using too many indexes?
Too many indexes slow down data changes like inserts, updates, and deletes because the indexes must be updated too.
Click to reveal answer
beginner
What types of columns are good candidates for indexing?
Columns used often in search conditions or joins, like IDs or foreign keys, are good for indexes.
Click to reveal answer
intermediate
What is a unique index?
A unique index ensures that all values in a column are different, preventing duplicate entries.
Click to reveal answer
What does a database index do?
ADeletes duplicate data
BEncrypts the database
CSpeeds up data retrieval
DBacks up data automatically
Which column is best to index?
AA column used in search queries
BA column with mostly unique values
CA column rarely used in queries
DA column with many NULL values
What is a risk of having too many indexes?
AFaster queries
BSlower data updates
CMore storage space saved
DAutomatic data backup
What does a unique index enforce?
AAutomatic data replication
BFaster data deletion
CEncrypted data storage
DNo duplicate values in a column
When should you avoid adding an index?
AOn columns rarely used in queries
BOn columns used in joins
COn primary key columns
DOn foreign key columns
Explain what a database index is and how it helps with query performance.
Think of a book's table of contents.
You got /3 concepts.
    Describe the trade-offs of using indexes in a database.
    Indexes help reading but can slow writing.
    You got /4 concepts.