Index in Database Presentation Group4
Index in Database Presentation Group4
FA23-BCS-014(HOORABIA SATTAR)
FA23-BCS-041(MUHAMMAD ABDULLAH KHALID)
FA23-BCS-008(ALIZA BAIG)
What is an Index in a
Database?
• An index is like a shortcut for finding data
quickly.
• Without an index, the database performs
needed data.
• Analogy: Book index or Google search.
Why We Use Indexes
• Fast Searching: Helps in locating data
quickly.
• Better Query Performance:
- WHERE clause filtering
- JOIN operations
- ORDER BY and GROUP BY clauses
Example of index:
Types of index
1. Single-column Index
columns.
Column order in index matters.
Example:
Syntax:
Example:
Syntax:
Example:
operations.
Over-indexing can reduce performance.
Conclusion
• Indexes make data retrieval faster.
• Choose indexes wisely for performance.
• Avoid over-indexing to keep balance.