Monday, May 18, 2026

Indexes, Views & Performance (89–100)

 

Indexes, Views & Performance (89–100)

  1. What is an index?
    An index improves query performance.
  2. Disadvantage of index?
    Slows down inserts/updates and uses storage.
  3. What is a clustered index?
    Sorts and stores table data physically.
  4. What is non-clustered index?
    Stores index separately from actual data.
  5. What is a view?
    A virtual table based on query.
  6. Why use a view?
    For abstraction, security, and reusable logic.
  7. What is a stored procedure?
    A precompiled SQL block stored in database.
  8. What is a trigger?
    A trigger executes automatically on INSERT/UPDATE/DELETE.
  9. How to improve SQL query performance?
    Use indexes, avoid SELECT *, optimize joins, filter early.
  10. What is normalization?
    Organizing data to reduce redundancy.
  11. What is denormalization?
    Adding redundancy to improve read performance.
  12. Scenario: Query is slow, what will you check first?
    Check execution plan, indexes, joins, filters, and data volume.

No comments:

Post a Comment