Why we need to create an index if the primary key is already present in a table?

DWQA QuestionsCategory: SQL Why we need to create an index if the primary key is already present in a table?
Editor Staff asked 9 months ago

 Why we need to create an index if the primary key is already present in a table?

  1. Index improves the speed of data retrieval operations on a table.
  2. Indexes are special lookup tables that will be used by the database search engine.
  3. Indexes are synonyms of a column in a table.
  4. All of the above
1 Answers
Editor Staff answered 9 months ago

Answer:

  1. Index improves the speed of data retrieval operations on a table.

Explanation: When we define a primary key in a table, the Database Engine enforces the data’s uniqueness by creating a unique index for those columns. This indexing process improves data retrieval when the primary key is used in queries. Therefore, we need to create an index if a primary key is already present in a table.