1、partitions 表中的常用列说明:

  1、table_schema:表所在的数据库名

  2、table_name:表名

  3、partition_method:表分区采用的分区方法

  4、partition_expression:分区键

  5、partions_name:分区名

  6、table_rows:分区中所包涵的数据行数

  7、data_free:分区中还未使用的空间

2、例子:

查询实例中的分区表、分区方法,分区字段

select
concat(table_schema,'.',table_name) as partition_table_names,-- 返回表的完全限定名
partition_method, -- 分区方法
partition_expression -- 分区字段
from information_schema.partitions
where
table_schema not in('mysql','information_schema','performance_schema')
group by
table_schema,table_name,partition_method;
+-----------------------+------------------+----------------------+
| partition_table_names | partition_method | partition_expression |
+-----------------------+------------------+----------------------+
| tempdb.t | RANGE | age |
| tempdb.t2 | RANGE | age |
+-----------------------+------------------+----------------------+

information_schema.partitions 学习的更多相关文章

  1. information_schema.referential_constraints 学习

    information_schema.referential_constraints 表用于查看外键约束 1.information_schema.referential_constraints表的常 ...

  2. information_schema.profiling学习

    information_schema.profiling可以用来分析每一条SQL在它执行的各个阶段的用时,注意这个表是session 级的,也就是说如果session1 开启了它:session2没有 ...

  3. information_schema.optimizer_trace学习

    information_schema.optimizer_trace 用于追踪优化器的优化过程:通常来说这张表中是没有数据的,要想开户追踪要把 @@session.optimizer_trace='e ...

  4. information_schema.triggers 学习

    mysql实例中的每一个trigger 对应到information_schema.triggers 中有一行 1.information_schema.triggers 表的常用列: 1.trigg ...

  5. information_schema.routines 学习

    information_schema.routines 用户查看mysql中的routine信息 1.information_schema.routines 表中的常用列: 1.

  6. information_schema.key_column_usage 学习

    information_schema.key_column_usage 表可以查看索引列上的约束: 1.information_schema.key_column_usage 的常用列: 1.cons ...

  7. information_schema.events 学习

    information_schema.events 表保存了整个mysql实例中的event 信息 1.常用列: 1.event_catalog :永远是def 2.event_schema :eve ...

  8. information_schema.engines学习

    当前mysql实例的存储引擎信息可以从information_schema.engines 中查询到 例子: mysql> select * from information_schema.en ...

  9. information_schema.column_privileges 学习

    mysql 的授权是分层次的 实例级 | 库级 | 表级 | 列级 而这些授权信息被保存在了mysql.user | mysql.db | mysql.tables_priv | mysql.colu ...

随机推荐

  1. JVM中可生成的最大Thread数量

    最近想测试下Openfire下的最大并发数,需要开大量线程来模拟客户端.对于一个JVM实例到底能开多少个线程一直心存疑惑,所以打算实际测试下,简单google了把,找到影响线程数量的因素有下面几个: ...

  2. 《Programming WPF》翻译 第6章 4.应用程序全球化

    原文:<Programming WPF>翻译 第6章 4.应用程序全球化 如果你打算发布你的应用程序到全球各地,你可能需要为不同地区的用户界面准备不同的版本.至少,这需要解决将文本翻译成适 ...

  3. Android添加横线和竖线分割界面

    竖线 <View       android:layout_width="1dip"     android:layout_height="match_parent ...

  4. kibana 统计每天注册数

  5. Java反编译插件jad

    原文地址:http://www.cnblogs.com/JimLy-BUG/p/5405868.html 1.首先下载jar文件:net.sf.jadclipse_3.3.0.jar  下载   2. ...

  6. HDU 1394 Minimum Inversion Number(线段树 或 树状数组)

    题目大意:给出从 0 到 n-1 的整数序列,A0,A1,A2...An-1.可将该序列的前m( 0 <= m < n )个数移到后面去,组成其他的序列,例如当 m=2 时,得到序列 A2 ...

  7. DBA 经典面试题(1)

    1:列举几种表连接方式 hash join.  merge join. nest loop join(cluster join). index join    2:不借助第三方工具,怎样查看sql的执 ...

  8. 《Java程序员面试笔试宝典》之 instanceof有什么作用

    instanceof是Java语言中的一个二元运算符,它的作用是判断一个引用类型的变量所指向的对象是否是一个类(或接口.抽象类.父类)的实例,即它左边的对象是否是它右边的类的实例,返回boolean类 ...

  9. hdu 5427 A problem of sorting(字符排序)

    Problem Description There are many people's name and birth in a list.Your task is to print the name ...

  10. Linux 终端訪问 FTP 及 上传下载 文件

    今天同事问我一个问题,在Linux 下訪问FTP,并将文件上传上去. 我之前一直是用WinSCP工具的. 先将文件从linux copy到windows下,然后在传到ftp上. google 一下. ...