0
0
MySQLquery~5 mins

Index maintenance in MySQL - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the main purpose of index maintenance in a database?
Index maintenance ensures that indexes remain efficient and up-to-date, which helps speed up data retrieval and keeps the database performing well.
Click to reveal answer
beginner
What happens if indexes are not maintained regularly?
Indexes can become fragmented or outdated, causing slower queries and increased resource use because the database has to work harder to find data.
Click to reveal answer
intermediate
Which MySQL command can be used to rebuild an index?
You can use ALTER TABLE table_name DROP INDEX index_name, ADD INDEX index_name (columns); or OPTIMIZE TABLE table_name; to rebuild and defragment indexes.
Click to reveal answer
intermediate
What is index fragmentation and why is it important to fix it?
Fragmentation means the index pages are not stored in a continuous order, which slows down data access. Fixing it improves speed and reduces disk I/O.
Click to reveal answer
intermediate
How does the OPTIMIZE TABLE command help with index maintenance in MySQL?
It reorganizes the physical storage of table data and associated indexes, reducing fragmentation and reclaiming unused space to improve query speed.
Click to reveal answer
What is the effect of index fragmentation on database performance?
ANo effect at all
BSlower query response times
CMore efficient memory usage
DFaster data insertion
Which MySQL command can help reduce index fragmentation?
AOPTIMIZE TABLE
BCREATE INDEX
CDROP TABLE
DSHOW INDEX
Why should you maintain indexes regularly?
ATo disable indexing
BTo delete all data
CTo increase disk space usage
DTo keep queries fast and efficient
Which of these is NOT a method of index maintenance?
ADropping unused indexes
BDefragmenting indexes
CIncreasing table size
DRebuilding indexes
What does the ALTER TABLE command do in index maintenance?
ARebuilds or modifies indexes
BDeletes the entire table
CShows table structure
DBacks up the database
Explain why index maintenance is important for database performance.
Think about how data is stored and accessed.
You got /4 concepts.
    Describe common methods to maintain indexes in MySQL.
    Focus on commands and practices.
    You got /4 concepts.