cons. I know it make looking up records faster and there is the cost of the size of the DB.
Yeah that's it
Indexing creates an index table that maps the indexed column to the primary key of the table you are indexing. This table will be used instead of the natural column to perform the lookup when doing any operation that works with queries on the indexed column It may be implemented as a special kind of table but they are generally either b-trees or skip lists, just like normal tables
Isn't that extra overhead?
yeah but when you have very frequent reads or require fast lookups then its worth it
Overhead on insert, but tremendous optimization on lookup, and you need to consider lookups more common than inserts
Обсуждают сегодня