From b392769c32246de22e6a0c48fb90b349e6446957 Mon Sep 17 00:00:00 2001 From: Yves Trudeau Date: Wed, 10 Jan 2018 11:27:13 -0500 Subject: [PATCH] Added index and modified datatype for sec and nsec to better reflex 32bits content --- schema/pmm.sql | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/schema/pmm.sql b/schema/pmm.sql index eedf3e64..e1390f09 100644 --- a/schema/pmm.sql +++ b/schema/pmm.sql @@ -28,12 +28,13 @@ CREATE TABLE IF NOT EXISTS agent_configs ( CREATE TABLE IF NOT EXISTS agent_log ( instance_id INT UNSIGNED NOT NULL, - sec BIGINT UNSIGNED NOT NULL, -- Unix timestamp (seconds) - nsec BIGINT UNSIGNED NOT NULL, -- nanoseconds for ^ + sec INT UNSIGNED NOT NULL, -- Unix timestamp (seconds) + nsec INT UNSIGNED NOT NULL, -- nanoseconds for ^ level TINYINT(1) UNSIGNED NOT NULL, -- 7 debug, 6 info, ... service VARCHAR(50) NOT NULL, -- service + instance name, e.g. mm-mysql-db01 msg VARCHAR(5000) CHARSET 'utf8' NOT NULL, - INDEX (instance_id, sec, level) + INDEX (instance_id, sec, level), + INDEX (sec) ); CREATE TABLE IF NOT EXISTS query_classes (