Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
47 lines (45 sloc) 2.11 KB
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;
Something went wrong with that request. Please try again.