Greenplum:分区前思考几个问题
2013-08-07 15:30
218 查看
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 will 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).
相关文章推荐
- 大型网站架构要思考的几个问题
- GraphicsStatsService常见的几个问题带来的思考
- 搭建SSH时的思考和遇到的几个问题的解决方法
- 思考:关于搜索引擎抓取网页的几个技术问题
- 几个经典同步问题的思考
- BN、dropout的几个问题和思考
- 编写代码时需要思考的几个问题
- 0112 大型网站架构要思考的几个问题【高级】
- Java系统时钟几个值得思考的问题
- 关于分区的几个问题
- 阅读《人类简史》思考的几个问题。
- 几个值得思考的问题
- 对几个问题的思考
- 大家很容易忽视的几个问题,1.投简历请换位思考、2.前台页面设计比后台实现更值钱
- 大家很容易忽视的几个问题,1.投简历请换位思考、2.前台页面设计比后台实现更值钱
- 有几个关于分区的问题
- 正在思考的几个管理方面的几个问题
- 大家很容易忽视的几个问题,1.投简历请换位思考、2.前台页面设计比后台实现更值钱
- 创业前必须思考的几个问题
- 自我申告中的几个问题思考