With millions of records, this scan operation may take many seconds & this high response time makes APIs & applications slower & unusable. If you don’t create an index, the database scans all the rows, filters out the matching rows & returns the result. Mostly an index is created on the columns specified in the WHERE clause of a query as the database retrieves & filters data from the tables based on those columns. Index is used to quicken the search by reducing the number of records to search for. In simple terminology, an index maps search keys to corresponding data on disk by using different in-memory & on-disk data structures. A proper index can be created only when you know exactly what your query & data access patterns look like. For doing that you need to understand how you are going to query your database tables. However, the most important part is to understand what to index & how the indexing is going to boost the query response time. Although databases are internally optimised through multiple mechanisms to meet their performance requirements in the modern world, a lot depends on the application developer as well - after all, only a developer knows what queries the application has to perform.ĭevelopers who deal with relational databases have used or at least heard about indexing, and it’s a very common concept in the database world. Performance is extremely important in many consumer products like e-commerce, payment systems, gaming, transportation apps, and so on.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |