In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This is a real-world example, but I do not recommend using MySQL partitions for production
CREATE TABLE `tlog` (`ID`int (11) NOT NULL AUTO_INCREMENT COMMENT 'key ID', `VERSON` int (11) NOT NULL DEFAULT 0 COMMENT' version', `ACTIONS` varchar (100) DEFAULT NULL COMMENT 'operation record', `ADMINID` int (11) DEFAULT 1 COMMENT 'administrator ID', `IP`varchar (20) DEFAULT' 1' COMMENT 'login Ip', `CDATE`datetime NOT NULL COMMENT', `UDATE` datetime NOT NULL COMMENT 'modification time, PRIMARY KEY (`ID`, `CDATE`) KEY `ADMINID` (`ADMINID`) USING BTREE) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT=' log table 'Time: 0.024sALTER TABLE `blog`.`t _ log` PARTITION BY RANGE (year (`CDATE`)) PARTITIONS 1SUBPARTITION BY HASH (to_days (`CDATE`)) SUBPARTITIONS 4 (PARTITION `p0` VALUES LESS THAN (2020) (SUBPARTITION `s200`, SUBPARTITION `s201`, SUBPARTITION `s202`, SUBPARTITION `s203`) Time: 0.057salter table t_logADD PARTITION (PARTITION `p1` VALUES LESS THAN (2021) (SUBPARTITION `s210` ENGINE=InnoDB, SUBPARTITION `s211` ENGINE=InnoDB, SUBPARTITION `s212` ENGINE=InnoDB) SUBPARTITION `s213` ENGINE = InnoDB) Time: 0.054s
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.