### 描述

向指定的表添加索引。

### 用法

 ```
add_clean_index( string $table, string $index )
```

### 参数

**$table**

(string)(必填)数据库表的名称。

**$index**

(string)(必填)数据库表索引列。

### 返回

(true) 真，当执行完成时。

### 来源

文件：wp-admin/includes/upgrade.php

 ```
function add_clean_index( $table, $index ) {
    global $wpdb;
    drop_index( $table, $index );
    $wpdb->query( "ALTER TABLE `$table` ADD INDEX ( `$index` )" );
    return true;
}
```