分区测试 分区本质

 

 

 

D:\wamp64\wamp\bin\mysql\mysql5.6.17\bin>mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.17 MySQL Community Server (GPL)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases
    -> ;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| test               |
+--------------------+
2 rows in set (0.01 sec)

mysql> use test
Database changed
mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| cadrs          |
| wadr           |
+----------------+
2 rows in set (0.00 sec)

mysql> select version();
+-----------+
| version() |
+-----------+
| 5.6.17    |
+-----------+
1 row in set (0.00 sec)

mysql> CREATE TABLE t3 (   col1 INT NOT NULL,   col2 DATE NOT NULL,   col3 INT NOT NULL,   col4 INT
NOT NULL,   UNIQUE KEY (col1, col2, col3)  )PARTITION BY RANGE( col3 ) (  PARTITION p1 VALUES LESS T
HAN (11),  PARTITION p2 VALUES LESS THAN (15));
Query OK, 0 rows affected (0.05 sec)

mysql> show COLUMNS FROM t3;
+-------+---------+------+-----+---------+-------+
| Field | Type    | Null | Key | Default | Extra |
+-------+---------+------+-----+---------+-------+
| col1  | int(11) | NO   | PRI | NULL    |       |
| col2  | date    | NO   | PRI | NULL    |       |
| col3  | int(11) | NO   | PRI | NULL    |       |
| col4  | int(11) | NO   |     | NULL    |       |
+-------+---------+------+-----+---------+-------+
4 rows in set (0.02 sec)

mysql> select version();
+-----------+
| version() |
+-----------+
| 5.6.17    |
+-----------+
1 row in set (0.00 sec)

mysql>

  

 

posted @ 2018-07-24 21:38  papering  阅读(240)  评论(0编辑  收藏  举报