does it slow down the query time to use a lot of unique indexes? i dont have that many im just curious, i think i have heard this some where
In addition to enforcing the uniqueness of data values, a unique index can also be used to improve data retrieval performance during query processing.
Why? Because sequentially scanning an index is actually less efficient than sequentially scanning a table, for indexes with a large number of rows for a given key.
If you update a table, the system has to maintain those indexes that are on the columns being updated. So having a lot of indexes can speed up select statements, but slow down inserts, updates, and deletes.
Answer: Of course! I have discussed this subject multiple times on this blog. Of course, Index can reduce the performance of any query and particularly of SELECT queries without even being that indexed utilized directly in the query.
It depends on the database server software and table/index type you are using. Inserts will be slower any time you have indexes of any sort, but not necessarily by a lot - this will depend on the table size as well.
In general, unique indexes should speed up any SELECT queries you use that are able to take advantage of the index(es)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With