Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Added index and modified datatype for sec and nsec to better reflex 32 bits content #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions schema/pmm.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down