log table

Fields

Schema summary

 DESCRIBE log;

+----------+---------------------+------+-----+-------------------+-----------------------------+
| Field    | Type                | Null | Key | Default           | Extra                       |
+----------+---------------------+------+-----+-------------------+-----------------------------+
| log_id   | int(10) unsigned    | NO   | PRI | NULL              | auto_increment              |
| log_time | timestamp           | NO   | MUL | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
| level    | tinyint(1) unsigned | NO   | MUL | 0                 |                             |
| user_id  | int(10) unsigned    | NO   | MUL | 0                 |                             |
| ip       | varchar(45)         | NO   | MUL | NULL              |                             |
| message  | mediumtext          | NO   |     | NULL              |                             |
+----------+---------------------+------+-----+-------------------+-----------------------------+

Indices

 SHOW INDEX IN log;

+-----------+------------+-------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table     | Non_unique | Key_name    | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+-----------+------------+-------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| wacko_log |          0 | PRIMARY     |            1 | log_id      | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| wacko_log |          1 | idx_level   |            1 | level       | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| wacko_log |          1 | idx_user_id |            1 | user_id     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| wacko_log |          1 | idx_ip      |            1 | ip          | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| wacko_log |          1 | idx_time    |            1 | log_time    | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
+-----------+------------+-------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+