Hello I would be indexing my database tables. Present constraints I am following is indexing the columns which would be most used in “where” clauses in my queries. Would that be the right constraint or are there any other constraints or checks to be followed?? And how would indexing affect the database on the whole?
Hello I would be indexing my database tables. Present constraints I am following is
Share
You are right to use indexes on fields that are frequently used in WHERE clauses. A few other places to use them:
As for how indexes would affect your database, they will (generally) make queries faster, inserts and updates a bit slower, and of course increase the size of the database. Assuming that database size isn’t a concern, it usually comes down to a tradeoff between query performance and insert performance.