We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
metrcs中大于255长度的tags无法写入mysql数据库
The text was updated successfully, but these errors were encountered:
1,将metric表中 tags字段改为 text 2,将索引 改为tags(255) 改后的表为: CREATE TABLE metric ( id int(10) unsigned NOT NULL AUTO_INCREMENT, host_id char(32) COLLATE utf8_unicode_ci NOT NULL, metric varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'cpu.idle/cpu=all', tags text COLLATE utf8_unicode_ci NOT NULL, dt enum('GAUGE','DERIVE','COUNTER') COLLATE utf8_unicode_ci NOT NULL, cycle int(10) NOT NULL, create_at datetime NOT NULL, update_at datetime NOT NULL, PRIMARY KEY (id), UNIQUE KEY idx_name (metric,host_id,tags(255)) USING BTREE, KEY fk_metric_host (host_id), CONSTRAINT fk_metric_host FOREIGN KEY (host_id) REFERENCES host (id) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=4989794 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
metric
id
host_id
tags
dt
cycle
create_at
update_at
idx_name
fk_metric_host
host
Sorry, something went wrong.
No branches or pull requests
metrcs中大于255长度的tags无法写入mysql数据库
The text was updated successfully, but these errors were encountered: