Junior — Middle
Have you ever used indexing in a database?
sobes.tech AI
Answer from AI
Yes, indexing in a database was often used to speed up queries, especially when working with large tables. For example, if a table has a field that is frequently used for filtering or sorting, creating an index on that field significantly reduces query execution time.
Example in SQL:
CREATE INDEX idx_user_email ON Users(Email);
In C# with Entity Framework, indexes can be created through migrations or directly in the database. Indexes help reduce the load on the database and improve application performance.