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(15)         | NO   | MUL | NULL              |                             |
| message  | text                | 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 |
+---------+------------+-------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| dev_log |          0 | PRIMARY     |            1 | log_id      | A         |         576 |     NULL | NULL   |      | BTREE      |         |               |
| dev_log |          1 | idx_level   |            1 | level       | A         |           8 |     NULL | NULL   |      | BTREE      |         |               |
| dev_log |          1 | idx_user_id |            1 | user_id     | A         |           4 |     NULL | NULL   |      | BTREE      |         |               |
| dev_log |          1 | idx_ip      |            1 | ip          | A         |           2 |     NULL | NULL   |      | BTREE      |         |               |
| dev_log |          1 | idx_time    |            1 | log_time    | A         |         576 |     NULL | NULL   |      | BTREE      |         |               |
+---------+------------+-------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+