- 浏览: 237344 次
- 性别:
- 来自: 珠海
文章分类
- 全部博客 (196)
- 职业感想 (66)
- hadoop (7)
- spark (5)
- mycat (13)
- Raft (2)
- nexus (3)
- Nginx (5)
- SpringBoot (5)
- Mongodb (5)
- amq (2)
- shell (3)
- netty (3)
- spring 5.0 (2)
- 响应式编程 (1)
- Spring Cloud (4)
- pdf (1)
- docker (17)
- Kubernetes (1)
- 技术总监 (1)
- 区块链 (1)
- 大数据 (1)
- Kylin (1)
- NIO (1)
- JVM (2)
- zookeeper (1)
- Python (2)
- Docker-Compose (2)
- mysql (14)
- eclipse (1)
- spring cloud config (1)
- Redis (1)
- centos (2)
- tokudb (1)
- findbugs (1)
- HikariCP (1)
- php (1)
- ES (1)
- ZigBee (1)
- 物联网 (1)
- NLP (1)
- ionic (1)
- go (4)
- node red (3)
- 树莓派 (1)
- iot (1)
- pm2 (1)
- nodejs (1)
- Supervisor (1)
- dbus (1)
- linux (1)
- vpn (1)
- arm (1)
- debian (1)
- consul (1)
- Hystrix (1)
- InheritableThreadLocal (1)
最新评论
-
男人50:
不远啊 写道难道大多程序猿都是这样过来的吗,接着后来有一部分当 ...
刚毕业的时候 -
不远啊:
难道大多程序猿都是这样过来的吗,接着后来有一部分当了老师教着新 ...
刚毕业的时候 -
男人50:
...
ES 与关系型数据库的对比 -
liaodongdakai:
精通并发与Netty网盘地址:https://pan.baid ...
精通netty框架 -
男人50:
knight_black_bob 写道这内容怎么审核的,你好, ...
我从事技术的这些年(第12年)
CREATE TABLE `test` (
`id` bigint(19) NOT NULL AUTO_INCREMENT,
`name` varchar(200) DEFAULT NULL,
`name1` varchar(200) DEFAULT NULL,
`cre_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `name_index1` (`name`),
KEY `name1_index1` (`name1`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
PARTITION BY RANGE (id)
SUBPARTITION BY HASH(id) (
PARTITION p0 VALUES LESS THAN (1000000)(
SUBPARTITION s0,
SUBPARTITION s1
),
PARTITION p1 VALUES LESS THAN (2000000)(
SUBPARTITION s2,
SUBPARTITION s3
),
PARTITION p2 VALUES LESS THAN (3000000)(
SUBPARTITION s4,
SUBPARTITION s5
),
PARTITION p3 VALUES LESS THAN (4000000)(
SUBPARTITION s6,
SUBPARTITION s7
),
PARTITION p4 VALUES LESS THAN (5000000)(
SUBPARTITION s8,
SUBPARTITION s9
),
PARTITION p5 VALUES LESS THAN (6000000)(
SUBPARTITION s10,
SUBPARTITION s11
),
PARTITION p6 VALUES LESS THAN (7000000)(
SUBPARTITION s12,
SUBPARTITION s13
),
PARTITION p7 VALUES LESS THAN (8000000)(
SUBPARTITION s14,
SUBPARTITION s15
),
PARTITION p8 VALUES LESS THAN (9000000)(
SUBPARTITION s16,
SUBPARTITION s17
),
PARTITION p9 VALUES LESS THAN (10000000)(
SUBPARTITION s18,
SUBPARTITION s19
),
PARTITION p10 VALUES LESS THAN (11000000)(
SUBPARTITION s20,
SUBPARTITION s21
),
PARTITION p11 VALUES LESS THAN (12000000)(
SUBPARTITION s22,
SUBPARTITION s23
),
PARTITION p12 VALUES LESS THAN (13000000)(
SUBPARTITION s24,
SUBPARTITION s25
),
PARTITION p13 VALUES LESS THAN (14000000)(
SUBPARTITION s26,
SUBPARTITION s27
),
PARTITION p14 VALUES LESS THAN (15000000)(
SUBPARTITION s28,
SUBPARTITION s29
),
PARTITION p15 VALUES LESS THAN (16000000)(
SUBPARTITION s30,
SUBPARTITION s31
),
PARTITION p16 VALUES LESS THAN (17000000)(
SUBPARTITION s32,
SUBPARTITION s33
),
PARTITION p17 VALUES LESS THAN (18000000)(
SUBPARTITION s34,
SUBPARTITION s35
),
PARTITION p18 VALUES LESS THAN (19000000)(
SUBPARTITION s36,
SUBPARTITION s37
),
PARTITION p19 VALUES LESS THAN (20000000)(
SUBPARTITION s38,
SUBPARTITION s39
),
PARTITION p20 VALUES LESS THAN (21000000)(
SUBPARTITION s40,
SUBPARTITION s41
),
PARTITION p21 VALUES LESS THAN (22000000)(
SUBPARTITION s42,
SUBPARTITION s43
),
PARTITION p22 VALUES LESS THAN (23000000)(
SUBPARTITION s44,
SUBPARTITION s45
),
PARTITION p23 VALUES LESS THAN (24000000)(
SUBPARTITION s46,
SUBPARTITION s47
),
PARTITION p24 VALUES LESS THAN (25000000)(
SUBPARTITION s48,
SUBPARTITION s49
),
PARTITION p25 VALUES LESS THAN (26000000)(
SUBPARTITION s50,
SUBPARTITION s51
),
PARTITION p26 VALUES LESS THAN (27000000)(
SUBPARTITION s52,
SUBPARTITION s53
),
PARTITION p27 VALUES LESS THAN (28000000)(
SUBPARTITION s54,
SUBPARTITION s55
),
PARTITION p28 VALUES LESS THAN (29000000)(
SUBPARTITION s56,
SUBPARTITION s57
),
PARTITION p29 VALUES LESS THAN (30000000)(
SUBPARTITION s58,
SUBPARTITION s59
),
PARTITION p30 VALUES LESS THAN (31000000)(
SUBPARTITION s60,
SUBPARTITION s61
),
PARTITION p31 VALUES LESS THAN (32000000)(
SUBPARTITION s62,
SUBPARTITION s63
),
PARTITION p32 VALUES LESS THAN (33000000)(
SUBPARTITION s64,
SUBPARTITION s65
),
PARTITION p33 VALUES LESS THAN (34000000)(
SUBPARTITION s66,
SUBPARTITION s67
),
PARTITION p34 VALUES LESS THAN (35000000)(
SUBPARTITION s68,
SUBPARTITION s69
),
PARTITION p35 VALUES LESS THAN (36000000)(
SUBPARTITION s70,
SUBPARTITION s71
),
PARTITION p36 VALUES LESS THAN (37000000)(
SUBPARTITION s72,
SUBPARTITION s73
),
PARTITION p37 VALUES LESS THAN (38000000)(
SUBPARTITION s74,
SUBPARTITION s75
),
PARTITION p38 VALUES LESS THAN (39000000)(
SUBPARTITION s76,
SUBPARTITION s77
),
PARTITION p39 VALUES LESS THAN (40000000)(
SUBPARTITION s78,
SUBPARTITION s79
),
PARTITION p40 VALUES LESS THAN (41000000)(
SUBPARTITION s80,
SUBPARTITION s81
),
PARTITION p41 VALUES LESS THAN (42000000)(
SUBPARTITION s82,
SUBPARTITION s83
),
PARTITION p42 VALUES LESS THAN (43000000)(
SUBPARTITION s84,
SUBPARTITION s85
),
PARTITION p43 VALUES LESS THAN (44000000)(
SUBPARTITION s86,
SUBPARTITION s87
),
PARTITION p44 VALUES LESS THAN (45000000)(
SUBPARTITION s88,
SUBPARTITION s89
),
PARTITION p45 VALUES LESS THAN (46000000)(
SUBPARTITION s90,
SUBPARTITION s91
),
PARTITION p46 VALUES LESS THAN (47000000)(
SUBPARTITION s92,
SUBPARTITION s93
),
PARTITION p47 VALUES LESS THAN (48000000)(
SUBPARTITION s94,
SUBPARTITION s95
),
PARTITION p48 VALUES LESS THAN (49000000)(
SUBPARTITION s96,
SUBPARTITION s97
),
PARTITION p49 VALUES LESS THAN (50000000)(
SUBPARTITION s98,
SUBPARTITION s99
),
PARTITION p50 VALUES LESS THAN (MAXVALUE)(
SUBPARTITION s100,
SUBPARTITION s101
)
);
`id` bigint(19) NOT NULL AUTO_INCREMENT,
`name` varchar(200) DEFAULT NULL,
`name1` varchar(200) DEFAULT NULL,
`cre_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `name_index1` (`name`),
KEY `name1_index1` (`name1`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
PARTITION BY RANGE (id)
SUBPARTITION BY HASH(id) (
PARTITION p0 VALUES LESS THAN (1000000)(
SUBPARTITION s0,
SUBPARTITION s1
),
PARTITION p1 VALUES LESS THAN (2000000)(
SUBPARTITION s2,
SUBPARTITION s3
),
PARTITION p2 VALUES LESS THAN (3000000)(
SUBPARTITION s4,
SUBPARTITION s5
),
PARTITION p3 VALUES LESS THAN (4000000)(
SUBPARTITION s6,
SUBPARTITION s7
),
PARTITION p4 VALUES LESS THAN (5000000)(
SUBPARTITION s8,
SUBPARTITION s9
),
PARTITION p5 VALUES LESS THAN (6000000)(
SUBPARTITION s10,
SUBPARTITION s11
),
PARTITION p6 VALUES LESS THAN (7000000)(
SUBPARTITION s12,
SUBPARTITION s13
),
PARTITION p7 VALUES LESS THAN (8000000)(
SUBPARTITION s14,
SUBPARTITION s15
),
PARTITION p8 VALUES LESS THAN (9000000)(
SUBPARTITION s16,
SUBPARTITION s17
),
PARTITION p9 VALUES LESS THAN (10000000)(
SUBPARTITION s18,
SUBPARTITION s19
),
PARTITION p10 VALUES LESS THAN (11000000)(
SUBPARTITION s20,
SUBPARTITION s21
),
PARTITION p11 VALUES LESS THAN (12000000)(
SUBPARTITION s22,
SUBPARTITION s23
),
PARTITION p12 VALUES LESS THAN (13000000)(
SUBPARTITION s24,
SUBPARTITION s25
),
PARTITION p13 VALUES LESS THAN (14000000)(
SUBPARTITION s26,
SUBPARTITION s27
),
PARTITION p14 VALUES LESS THAN (15000000)(
SUBPARTITION s28,
SUBPARTITION s29
),
PARTITION p15 VALUES LESS THAN (16000000)(
SUBPARTITION s30,
SUBPARTITION s31
),
PARTITION p16 VALUES LESS THAN (17000000)(
SUBPARTITION s32,
SUBPARTITION s33
),
PARTITION p17 VALUES LESS THAN (18000000)(
SUBPARTITION s34,
SUBPARTITION s35
),
PARTITION p18 VALUES LESS THAN (19000000)(
SUBPARTITION s36,
SUBPARTITION s37
),
PARTITION p19 VALUES LESS THAN (20000000)(
SUBPARTITION s38,
SUBPARTITION s39
),
PARTITION p20 VALUES LESS THAN (21000000)(
SUBPARTITION s40,
SUBPARTITION s41
),
PARTITION p21 VALUES LESS THAN (22000000)(
SUBPARTITION s42,
SUBPARTITION s43
),
PARTITION p22 VALUES LESS THAN (23000000)(
SUBPARTITION s44,
SUBPARTITION s45
),
PARTITION p23 VALUES LESS THAN (24000000)(
SUBPARTITION s46,
SUBPARTITION s47
),
PARTITION p24 VALUES LESS THAN (25000000)(
SUBPARTITION s48,
SUBPARTITION s49
),
PARTITION p25 VALUES LESS THAN (26000000)(
SUBPARTITION s50,
SUBPARTITION s51
),
PARTITION p26 VALUES LESS THAN (27000000)(
SUBPARTITION s52,
SUBPARTITION s53
),
PARTITION p27 VALUES LESS THAN (28000000)(
SUBPARTITION s54,
SUBPARTITION s55
),
PARTITION p28 VALUES LESS THAN (29000000)(
SUBPARTITION s56,
SUBPARTITION s57
),
PARTITION p29 VALUES LESS THAN (30000000)(
SUBPARTITION s58,
SUBPARTITION s59
),
PARTITION p30 VALUES LESS THAN (31000000)(
SUBPARTITION s60,
SUBPARTITION s61
),
PARTITION p31 VALUES LESS THAN (32000000)(
SUBPARTITION s62,
SUBPARTITION s63
),
PARTITION p32 VALUES LESS THAN (33000000)(
SUBPARTITION s64,
SUBPARTITION s65
),
PARTITION p33 VALUES LESS THAN (34000000)(
SUBPARTITION s66,
SUBPARTITION s67
),
PARTITION p34 VALUES LESS THAN (35000000)(
SUBPARTITION s68,
SUBPARTITION s69
),
PARTITION p35 VALUES LESS THAN (36000000)(
SUBPARTITION s70,
SUBPARTITION s71
),
PARTITION p36 VALUES LESS THAN (37000000)(
SUBPARTITION s72,
SUBPARTITION s73
),
PARTITION p37 VALUES LESS THAN (38000000)(
SUBPARTITION s74,
SUBPARTITION s75
),
PARTITION p38 VALUES LESS THAN (39000000)(
SUBPARTITION s76,
SUBPARTITION s77
),
PARTITION p39 VALUES LESS THAN (40000000)(
SUBPARTITION s78,
SUBPARTITION s79
),
PARTITION p40 VALUES LESS THAN (41000000)(
SUBPARTITION s80,
SUBPARTITION s81
),
PARTITION p41 VALUES LESS THAN (42000000)(
SUBPARTITION s82,
SUBPARTITION s83
),
PARTITION p42 VALUES LESS THAN (43000000)(
SUBPARTITION s84,
SUBPARTITION s85
),
PARTITION p43 VALUES LESS THAN (44000000)(
SUBPARTITION s86,
SUBPARTITION s87
),
PARTITION p44 VALUES LESS THAN (45000000)(
SUBPARTITION s88,
SUBPARTITION s89
),
PARTITION p45 VALUES LESS THAN (46000000)(
SUBPARTITION s90,
SUBPARTITION s91
),
PARTITION p46 VALUES LESS THAN (47000000)(
SUBPARTITION s92,
SUBPARTITION s93
),
PARTITION p47 VALUES LESS THAN (48000000)(
SUBPARTITION s94,
SUBPARTITION s95
),
PARTITION p48 VALUES LESS THAN (49000000)(
SUBPARTITION s96,
SUBPARTITION s97
),
PARTITION p49 VALUES LESS THAN (50000000)(
SUBPARTITION s98,
SUBPARTITION s99
),
PARTITION p50 VALUES LESS THAN (MAXVALUE)(
SUBPARTITION s100,
SUBPARTITION s101
)
);
发表评论
-
mysql中update语句的锁
2019-06-12 16:46 710UPDATE rent_contacts SET contac ... -
flush table db2.travelrecord,db3.travelrecord with read lock
2018-08-01 15:26 440flush table db2.test,db3.test w ... -
Slave_IO_Running: No
2018-08-01 13:36 678Slave_IO_Running: No 咋还会 同步数据呢 ... -
这几天在忙 ,解决问题,没时间发博客
2018-07-19 12:44 583这几天在忙 ,解决问题,没时间发博客。见谅。 ... -
mysql InnoDB引擎数据库速度提升方法
2018-07-13 18:17 547innodb_flush_log_at_trx_commit ... -
MySQL半同步复制
2018-06-29 16:29 982从MySQL5.5开始,MySQL以插件的形式支持半同步复制。 ... -
mysql主从复制 延迟解决方案
2018-06-29 09:57 1464实际上主从同步延迟根 ... -
1030 got error 28 from storage engine
2018-06-21 13:10 8411030 got error 28 from storage ... -
innodb_flush_log_at_trx_commit和sync_binlog
2018-06-13 12:45 1156innodb_flush_log_at_trx_commit和 ... -
Slave_IO_Running: No ,Slave_SQL_Running: No
2018-06-12 17:29 1126第一种:在slave stop slave ; reset ... -
mysql分区3
2018-06-09 02:19 498test 分区 子分区 ,分区太多 ,50个分区 受影 ... -
mysql分区2
2018-06-09 00:23 355CREATE TABLE `test2` ( `id` b ... -
MYSQL索引区别
2018-06-08 17:25 1213(1)PRIMARY:主键索引。索引列唯一且不能为空;一张表只 ...
相关推荐
"互联网公司为啥不使用mysql分区表" 在互联网公司中,mysql分区表是一个比较少用的技术,这是因为分区表存在一些缺陷和限制,使得互联网公司更多地选择自己分库分表来水平扩展数据库。 首先,分区表的设计需要考虑...
MySQL分区表是一种优化大型数据表查询效率的技术,它将一个大表分成多个逻辑上相连但物理上独立的部分,每个部分称为一个分区。分区可以按照不同的策略进行,如范围、哈希、列表或复合分区。这样做有助于提高数据...
### MySQL分区表:万字详解与实践指南 #### 一、引言 在现代数据库管理中,随着数据量的不断增长,如何高效管理和查询数据成为了一个重要的课题。MySQL作为广泛使用的开源关系型数据库管理系统之一,提供了多种强大...
MySQL分区表是一种数据库管理策略,它将一个大表的数据分散到多个物理存储单元,从而提高数据管理和查询性能。本文将深入探讨分区表的概念、优点、限制以及常见的分区类型。 首先,分区表的基本概念是根据特定的...
【MySQL分区表详解】 分区表是数据库管理中一种高级的数据组织策略,主要目的是为了提高大表的查询效率和数据管理的便利性。在MySQL中,分区表是通过`PARTITION BY`子句来实现的,它允许我们将一个大的表根据特定的...
MySQL分区表是一种优化大型数据库性能的技术,它将一个大表分成多个较小的部分,每个部分称为一个分区,从而提高查询效率和管理能力。分区通常应用于处理大量数据的表,特别是那些有明确范围或时间属性的数据,如...
MySQL分区表是一种优化大型数据库性能的技术,它将大表逻辑上划分为更小、更易管理的部分,以提高查询速度和数据管理效率。本文将深入探讨MySQL分区表的最佳实践,包括分区的目的、类型、操作示例以及适用场景。 1....
3. **添加数据**:向分区表中插入数据,MySQL会自动根据分区规则分配。 4. **管理分区**:可以添加、删除或重定义分区,以适应数据变化。 **示例:RANGE分区创建** ```sql CREATE TABLE p_range ( id INT(10) NOT...
数据库分区是一种物理数据库设计技术。虽然分区技术可以实现很多效果,但其主要目的是为了在特定的SQL操作中减少数据读写的总量以缩减sql语句的响应时间,同时对于...MYSQL的分区主要有两种形式:水平分区和垂直分区。
#### 三、MySQL分区表常用操作示例 接下来通过具体的示例来展示如何创建不同类型的分区表: 1. **创建RANGE分区**: - 基于员工工资创建范围分区:`CREATE TABLE emp (empno VARCHAR(20) NOT NULL, empname ...
MySQL分区表是数据库管理系统中的一种优化策略,它将大型表分成多个较小的部分,每个部分(或称为分区)存储在不同的物理位置,以提高查询性能和管理效率。在MySQL中,分区通常基于范围、列表、哈希或键值的某种组合...
MySQL分区表是一种优化大数据量表查询效率和管理历史数据的有效策略。它将一个大表物理地分割成多个独立的部分,每个部分称为一个分区,每个分区有自己的索引和数据,但对外表现为一个完整的逻辑表。这使得对大量...
在最近的项目中,我们需要保存大量的数据,而且这些数据是有有效期的,为了提供查询效率以及快速删除过期数据,我们选择了MySQL的分区机制。把数据按照时间进行分区。 分区类型 Range分区:最为常用,基于属于一个...