文件名称:压缩存储-Greenplum 数据库基础培训V1.2
文件大小:7.92MB
文件格式:PPT
更新时间:2024-05-15 15:14:48
Greenplum 中文
压缩存储 压缩存储 支持ZLIB和QUICKLZ方式的压缩,压缩比可到10:1 压缩表只能是Append Only方式 压缩数据不一定会带来性能的下降,压缩表将消耗CPU资源,而减少I/O资源占用 语法 CREATE TABLE foo (a int, b text) WITH (appendonly=true, compresstype=zlib, compresslevel=5); Instructor Notes Table partitioning addresses the problem of supporting very large tables, such as fact tables, by allowing you to divide them into smaller and more manageable pieces. The advantages of partitioning are to improve query performance by scanning only the relevant data needed to satisfy a given query. It can also be used to facilitate database maintenance tasks such as rolling old data out of the data warehouse or speeding up the update of indexes. GPDB supports both range partitioning (division of data based on a numerical range, such as date or price) or list partitioning (division of data based on a list of values, such as gender or region), or a combination of both types. Table partitioning in GPDB works using table inheritance and constraints. Table inheritance creates a persistent relationship between a child table and its parent table(s), so that all of the schema information from the parent table propagates to its children. CHECK constraints limit the data a table can contain based on some defining criteria. These constraints are also used at runtime to determine which tables to scan in order to satisfy a given query. In Greenplum DB partitioned tables are also distributed across the segments as is any non-partitioned table. Partitioning is more of a tool to logically divide big tables to improve query performance and maintenance. It does not effect the physical distribution of the table data.