Does the unique index slow down?

slows down query time to use many unique indexes? I don’t have so many interesting things, I think I heard this somewhere, where

  • id (primary auto_increment)
  • username (unique)
  • password
  • salt (unique)
  • email (unique)
+5
source share
5 answers

It depends on the database server software and the type of table / index you are using. Inserts will be slower anytime you have indexes of any type, but not necessarily a lot - it will also depend on the size of the table.

In general, unique indexes should speed up any SELECT queries you use that can use index (s)

+6

( , , ), . , , .

+2

, , , - , .

, , , . , , .

+1

, , . . , , . , . - , , , . , , , . Wikipedia here . Msdn also has a good article.

+1
source

Request time, no. They slow down the INSERT and DELETE times, though, since each index value needs to be calculated and then inserted or deleted.

0
source

All Articles