Git Product home page Git Product logo

Comments (1)

liuts avatar liuts commented on May 27, 2024

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;

from owl.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.