【Teradata】块压缩(ferret工具)

多值压缩(MVC)
Enhanced Multi-Value Compression (MVC) or Value-List Compression
• Compress VARCHAR, VARBYTE, or VARGRAPHIC columns
• Number of characters in a compressed value is increased to 510.
算法压缩(ALC)
Algorithmic Compression (ALC) or Column Level Compression
• Allows users to apply a compression algorithm to data at the column level in a row.
– One example is to compress two-byte Unicode into one byte when the data is Latin (ASCII).
• Compression/decompression is done by specifying a UDF function.
– Teradata provides some UDFs to do compression for UNICODE and LATIN data columns.
– User can create and apply their own compression/decompression algorithms to columns.
块压缩(BLC)
Block Level Compression :在数据块实际写入/读取存储设备之前,Teradata在文件系统级别对整个数据块执行压缩。
压缩/解压缩整个数据块会增加CPU成本,但会减少IO。目前CPU成本在不断下降,IO成本还比较高,所以CPU换IO非常划算。
可以在系统上打开所有数据块压缩,也可以按表申请块压缩。
自动与其它压缩机制结合。
BLC将只压缩/解压缩数据块,但不会用于任何文件系统结构,如主/柱面索引、WAL日志和表头。
• How is BLC set for a specific table?
• When loading data, SET QUERY_BAND = 'BLOCKCOMPRESSION=YES/NO;' FOR SESSION;
• Ferret utility has new commands – COMPRESS/UNCOMPRESS table
• DBSControl settings
1.在dbscontrol中开启块压缩
display compression
modify compression = on
write
2.启动ferret
方法一:使用admin用户登录viewpoint,选择remote console,选择ferret工具
方法二:使用root用户登录节点
cnsterm
start ferret
日志提示started ferret in window
Ctrl + C 退出当前窗口 cnsterm //2为start ferret命令显示窗口编号
3.记录ferret所有屏显日志
//启动ferret后执行
output into /tmp/file.out
4.查看某表是否已经压缩,C代表全压缩,U代表无压缩
scope table ("ds.orders" *) //单表
scope table ("ds.orders" *,"ds.orders_2016" *) //多表
showblock
tableid "ds.orders" //查看表ID
5.进行块压缩
同一时间仅能启动一个compress命令,/y参数代表无需确认。
compress /y "ds.orders" //压缩某张表
compress /y "ds.*" //压缩全库
6.解压缩
uncompress /y "ds.orders"
7.更新dbc的数据表大小信息
使用ferret工具进行压缩处理,dbc的空间信息不会及时更新,需要通过updatesapce工具进行处理,由于这个工具是针对整个库进行的,所以最好在一个库下面的所有表都压缩处理完成后,再统一执行一次。
如果某个表数据发生变更,也会自动更新DBC空间信息。
cnsterm
start updatespace
日志提示started update space in window
Ctrl + C 退出当前窗口 cnsterm //3为start updatespace命令显示窗口编号
update all space for ds;
IDKCS001442
Space
accounting is not immediate but the tables should be compressed immediately.
Please check the "showblock /m" output in ferret to confirm if the table is
compressed. as soon as the tables are created with compress option or if
manual compression is done on the particular table using ferret then running
updatespace is required to reflect the space change immediately or will reflect
with next auto updatespace run.
【Teradata】块压缩(ferret工具)的更多相关文章
- Linux中常用压缩打包工具
Linux中常用压缩打包工具 压缩打包是常用的功能,在linux中目前常用的压缩工具有gzip,bzip2以及后起之秀xz.本文将介绍如下的工具常见压缩.解压缩工具以及打包工具tar. gzip2 直 ...
- Java压缩和解压缩文件工具
Java压缩和解压缩文件工具 学习了: https://www.oschina.net/code/snippet_1021818_48130 http://blog.csdn.net/gaowen_h ...
- PHP的LZF压缩扩展工具
这次为大家带来的是另外一个 PHP 的压缩扩展,当然也是非常冷门的一种压缩格式,所以使用的人会比较少,而且在 PHP 中提供的相关的函数也只是对字符串的编码与解码,并没有针对文件的操作.因此,就像 B ...
- 【Teradata】磁盘碎片整理(ferret工具)
DEFRAGMENTcombines free sectors and moves them to the end of a cylinder.PACKDISKfill (or packs) cyli ...
- 【Teradata Utility】系统工具使用
List two ways in which a system utility can be started. Explain how to use the following utilities t ...
- C#照片批量压缩小工具
做了一个照片批量压缩工具,其实核心代码几分钟就完成了,但整个小工具做下来还是花了一天的时间.中间遇到了大堆问题,并寻求最好的解决方案予以解决.现在就分享一下这个看似简单的小工具所使用的技术. 软件界面 ...
- Java操作zip压缩和解压缩文件工具类
需要用到ant.jar(这里使用的是ant-1.6.5.jar) import java.io.File; import java.io.FileInputStream; import java.io ...
- Linux下方便的块设备查看工具lsblk
之前在Linux下看有什么块设备,通常都用fdisk什么的或者直接ls /dev/ 去看很不方便. 这个工具属于util-linux-ng包,在RHEL 6.1上是安装好的啦,直接用就好. ubunt ...
- 图片压缩java工具类
package com.net.util; import java.awt.Image; import java.awt.image.BufferedImage; import java.io.Fil ...
随机推荐
- c# 项目之间循环引用vs弹窗提醒
circular dependencies in projects' graph ! Projects in cycle are:ProjectImp(Name:FrameWork.Entity,Pl ...
- ASP.NET资源大全-知识分享
API 框架 NancyFx:轻量.用于构建 HTTP 基础服务的非正式(low-ceremony)框架,基于.Net 及 Mono 平台.官网 ASP.NET WebAPI:快捷创建 HTTP 服务 ...
- [PHP]算法-拼接最小字典序的实现
拼接最小字典序: 给定一个字符串类型的数组strs,请找到一种拼接顺序,使得将所有字符串拼接起来组成的大字符串是所有可能性中字典顺序最小的并放回这个大字符串. 思路: 1.字典序,12345这五个数, ...
- C-Linux_毫秒级随机值获取
秒级随机值-常用方法: #include <stdlib.h> #include <stdio.h> #include <stdio.h> #include < ...
- springMVC_02hello案例
1.导入jar包 commons-logging-1.1.1.jar jackson-annotations-2.5.4.jar jackson-core-2.5.4.jar jackson-data ...
- JUnit4注解
今天学习了下,mybatis中开发dao的方法,用到了JUnit4进行单元测试, 将JUnit4中的注解总结了下,供大家参考学习: JUnit 4 开始使用 Java 5 中的注解(annotatio ...
- 2018-12-16 VS Code英汉词典进化效果演示: 翻译文件所有命名
续VS Code英汉词典插件v0.0.7-尝试词性搭配, 下一个功能打算实现文件的批量命名翻译: 批量代码汉化工具 · Issue #86 · program-in-chinese/overview ...
- java对程序的简单加密
File file = new File("oppo.in"); File file1 = new File("main.in"); GregorianCale ...
- p标签内容实现第二行缩进两个字体间距
p{ word-break:normal; text-indent: -2em; margin-left: 2em;} <p> p标签实现自动换行:p标签实现自动换行:p标签实现自动换行: ...
- git 入门教程之本地和远程仓库的本质
本地仓库和远程仓库在本质上没有太大区别,只不过一个是本地电脑,一个是远程电脑. 远程仓库不一定非得是 github 那种专门的"中央服务器",甚至局域网的另外一台电脑也可以充当&q ...