Greenplum:分区前思考几个问题

简介:
Deciding on a Table Partitioning Strategy 
分区前思考几个问题
Not all tables are good candidates for partitioning. If the answer is yes to all or most of 
the following questions, then table partitioning is a viable database design strategy for 
improving query performance. If the answer is no to most of the following questions, 
then table partitioning is not the right solution for that table:
•  Is the table large enough?
表足够大?超过一千万条记录?
Large fact tables are good candidates for table 
partitioning. If you have millions or billions of records in a table, you wi ll see 
performance benefits from logically breaking that data up into smaller chunks. For 
smaller tables with only a few thousand rows or less, the administrative overhead 
of maintaining the partitions will outweigh any performance benefits you might 
see.
•  Are you experiencing unsatisfactory performance?
查询性能满意否?
As with any performance tuning initiative, a table should be partitioned only if queries against that table are 
producing slower response times than desired. 
•  Do your query predicates have identifiable access patterns? 
查询where条件有规律可循?
Examine the WHERE clauses of your query workload and look for table columns that are 
consistently used to access data. For example, if most of your queries tend to look 
up records by date, then a monthly or weekly date-partitioning design might be 
beneficial. Or if you tend to access records by region, consider a list-partitioning 
design to divide the table by region.
•  Does your data warehouse maintain a window of historical data? 
数据时间窗口定长?例如只保留12个月?
Another consideration for partition design is your organization’s business requirements for 
maintaining historical data. For example, your data warehouse may only require 
you to keep the past twelve months worth of data. If the data is partitioned by 
month, you can easily drop the oldest monthly partition from the warehouse, and 
load current data into the most recent monthly partition.
•  Can the data be divided into somewhat equal parts based on some defining 
criteria? 
每个分区差不多大?
You should choose partitioning criteria that will divide your data as 
evenly as possible. If the partitions contain a relatively equal number of records, 
query performance improves based on the number of partitions created. For 
example, by dividing a large table into 10 partitions, a query will execute 10 times 
faster than it would against the unpartitioned table (provided that the partitions are 
designed to support the query’s criteria).


 本文转自 hexiaini235 51CTO博客,原文链接:http://blog.51cto.com/idata/1266063,如需转载请自行联系原作者

相关文章
|
SQL HIVE
Hive分区+根据分区查询
Hive分区+根据分区查询
|
9月前
|
存储 算法
GreenPlum AOCO列存如何将数据刷写磁盘
GreenPlum AOCO列存如何将数据刷写磁盘
70 0
|
9月前
|
存储 文件存储 索引
GreenPlum列存解密
GreenPlum列存解密
130 0
|
9月前
|
存储 关系型数据库 MySQL
MySQL数据库的分区和分表技术
MySQL数据库的分区和分表技术
|
10月前
|
SQL 算法 关系型数据库
|
存储 SQL 数据管理
|
SQL Oracle 关系型数据库
OceanBase分区表有什么不同?
OceanBase从1.0版本开始OceanBase就支持分区表,功能逐步跟ORACLE分区表兼容,并且支持不同分区分布在集群的不同节点(机器)上。本文是对OceanBase分区表的能力做一个详细介绍。
3050 0
|
关系型数据库 PostgreSQL
|
NoSQL 算法 负载均衡