0
我们是否需要将主键添加到多列索引?或者它会自动放在那里?我们是否需要将主键添加到多列索引?
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`);
索引结构取决于正在使用的存储引擎。 –
你能解释清楚吗? – Narutokage
。 。 https://dev.mysql.com/doc/refman/5.7/en/storage-engines.html。 –