forked from box/Anemometer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mysql56-install.sql
46 lines (45 loc) · 2.11 KB
/
mysql56-install.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
CREATE DATABASE IF NOT EXISTS slow_query_log;
CREATE TABLE events_statements (
`DIGEST` varchar(32) character set binary NOT NULL ,
`DIGEST_TEXT` longtext NOT NULL,
`first_seen` datetime DEFAULT NULL,
`last_seen` datetime DEFAULT NULL,
`reviewed_by` varchar(20) DEFAULT NULL,
`reviewed_on` datetime DEFAULT NULL,
`reviewed_status` varchar(24) DEFAULT NULL,
`comments` text,
PRIMARY KEY (`DIGEST`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE events_statements_history (
history_id bigint unsigned not null auto_increment PRIMARY KEY,
hostname varchar(48) not null default '',
`DIGEST` varchar(32) character set binary DEFAULT NULL ,
`DIGEST_TEXT` longtext,
`COUNT_STAR` bigint(20) unsigned NOT NULL,
`SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
`MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
`AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
`MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
`SUM_LOCK_TIME` bigint(20) unsigned NOT NULL,
`SUM_ERRORS` bigint(20) unsigned NOT NULL,
`SUM_WARNINGS` bigint(20) unsigned NOT NULL,
`SUM_ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
`SUM_ROWS_SENT` bigint(20) unsigned NOT NULL,
`SUM_ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
`SUM_CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
`SUM_CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
`SUM_SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
`SUM_SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
`SUM_SELECT_RANGE` bigint(20) unsigned NOT NULL,
`SUM_SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
`SUM_SELECT_SCAN` bigint(20) unsigned NOT NULL,
`SUM_SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
`SUM_SORT_RANGE` bigint(20) unsigned NOT NULL,
`SUM_SORT_ROWS` bigint(20) unsigned NOT NULL,
`SUM_SORT_SCAN` bigint(20) unsigned NOT NULL,
`SUM_NO_INDEX_USED` bigint(20) unsigned NOT NULL,
`SUM_NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL,
`FIRST_SEEN` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`LAST_SEEN` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
UNIQUE KEY (`DIGEST`, `hostname`, FIRST_SEEN, LAST_SEEN )
) ENGINE=InnoDB DEFAULT CHARSET=utf8;