Database Management
MySQL
Subjective
Oct 01, 2025
Explain the difference between clustered and non-clustered indexes.
Detailed Explanation
Clustered Index:
• Physical order of data matches index order
• One per table (usually PRIMARY KEY)
• Data pages stored in order of key values
• Faster for range queries
Non-clustered Index:
• Separate structure pointing to data rows
• Multiple allowed per table
• Contains pointers to actual data
• Additional lookup required
In MySQL InnoDB, PRIMARY KEY is clustered, others are non-clustered.
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts