Indexes in primary key columns

Asked

Viewed 203 times

2

I know that each case is a case, and that there are no ready-made rules on the creation of indexes. In my case, considering that the primary key of each table of my bank is used in wheres of my bank inquiries, should I create an index for them? Or is the field defined as a primary key already considered by default as an index? This is because, in Phpmyadmin, when I create the index in the column already inserted as the primary key, there is the message that there are equal indexes for the same column, something like this.

1 answer

3


In my case, considering that the primary key of each table of my bank is used in the wheres of my queries to the bank, I must create an index for them?

Primary key indication automatically creates an index for it. Nothing else needs to be done.

Check if you are creating any unnecessary index.

  • Obgd for the clarification.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.