Php 新表中0和1上的Ange。这将增加报告和趋势的检索时间。@GeorgeNikolaides:如果您现在只对更改感兴趣,不想对历史更改进行任何分析,那么可以省略步骤4。 alter table yourTableName add index yourInde

Php 新表中0和1上的Ange。这将增加报告和趋势的检索时间。@GeorgeNikolaides:如果您现在只对更改感兴趣,不想对历史更改进行任何分析,那么可以省略步骤4。 alter table yourTableName add index yourInde,php,mysql,triggers,views,Php,Mysql,Triggers,Views,新表中0和1上的Ange。这将增加报告和趋势的检索时间。@GeorgeNikolaides:如果您现在只对更改感兴趣,不想对历史更改进行任何分析,那么可以省略步骤4。 alter table yourTableName add index yourIndexName(col1, col2); mysql> select * from table1; +---------+------+------+-------------+ | autonum | ID | name | met


新表中0和1上的Ange。这将增加报告和趋势的检索时间。@GeorgeNikolaides:如果您现在只对更改感兴趣,不想对历史更改进行任何分析,那么可以省略步骤4。
alter table yourTableName add index yourIndexName(col1, col2);

mysql> select * from table1;

+---------+------+------+-------------+
| autonum | ID   | name | metavalue   |
+---------+------+------+-------------+
|       1 |    1 | Rose | Drinker     |
|       2 |    1 | Rose | Nice Person |
|       3 |    1 | Rose | Runner      |
|       4 |    2 | Gary | Player      |
|       5 |    2 | Gary | Funny       |
|       6 |    2 | Gary | NULL        |
|       7 |    2 | Gary | Smelly      |
+---------+------+------+-------------+
7 rows in set (0.01 sec)

mysql> alter table table1 add index autoNumID(autonum, ID);
Query OK, 0 rows affected (0.02 sec)
Records: 0  Duplicates: 0  Warnings: 0