Do we need to add primary key to multiple columns index?

Do we need to add primary key to multiple columns index ? Or it will be automatically put there ?

ALTER TABLE `wp_posts`
  ADD PRIMARY KEY (`ID`),
  ADD KEY `post_name` (`post_name`(191)),
  ADD KEY `type_status_date` (`post_type`,`post_status`,`post_date`,`ID`),
  ADD KEY `post_parent` (`post_parent`),
  ADD KEY `post_author` (`post_author`);

Read more here: Do we need to add primary key to multiple columns index?

Leave a Reply

Your email address will not be published. Required fields are marked *