Indexes, Views & Performance (89–100)
Indexes, Views & Performance (89–100)
-
What is an index?
An index improves query performance.
-
Disadvantage of index?
Slows down inserts/updates and uses storage.
-
What is a clustered index?
Sorts and stores table data physically.
-
What is non-clustered index?
Stores index separately from actual data.
-
What is a view?
A virtual table based on query.
-
Why use a view?
For abstraction, security, and reusable logic.
-
What is a stored procedure?
A precompiled SQL block stored in database.
-
What is a trigger?
A trigger executes automatically on INSERT/UPDATE/DELETE.
-
How to improve SQL query performance?
Use indexes, avoid SELECT *, optimize joins, filter early.
-
What is normalization?
Organizing data to reduce redundancy.
-
What is denormalization?
Adding redundancy to improve read performance.
-
Scenario: Query is slow, what will you check first?
Check execution plan, indexes, joins, filters, and data volume.
No comments:
Post a Comment