【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 ...
随机推荐
- 第一册:lesson7-8.
原文:Are you a teacher? A:I am a new student ,my name is A. B:Nice to meet you,my name is B. A:Are yo ...
- 【转载】C#常用数据库Sqlserver通过SQL语句查询数据库以及表的大小
在Sqlserver数据库中,一般我们查看数据库的大小可以通过查找到数据库文件来查看,但如果要查找数据表Table的大小的话,则不可通过此方法,在Sqlserver数据库中,提供了相应的SQL语句来查 ...
- 【转载】Centos系统采用NVM安装Node.js环境
Node.js 是一个基于 Chrome V8 引擎的 JavaScript 运行环境,用来方便地搭建快速的易于扩展的网络应用.Node.js 使用了一个事件驱动.非阻塞式 I/O 的模型,使其轻量又 ...
- [日常] DNS解析概述
DNS DomainNameSystem域名系统,根据域名查出IP地址 1.dig命令可以显示整个查询的过程 root@VM-38-204-ubuntu:~# dig www.sopans.com / ...
- 你试过不用if撸代码吗?
译者按: 试着不用if撸代码,是件很有趣的事,而且,万一你领会了什么是“数据即代码,代码即数据”呢? 原文: Coding Tip: Try to Code Without If-statements ...
- JS中的反柯里化( uncurrying)
反柯里化 相反,反柯里化的作用在与扩大函数的适用性,使本来作为特定对象所拥有的功能的函数可以被任意对象所用.即把如下给定的函数签名, obj.func(arg1, arg2) 转化成一个函数形式,签名 ...
- GitHub for Windows离线安装包
国内安装github客户端,真的很痛!! 偶然找到了离线安装包,感谢作者的资源分享!!! 地址:http://download.csdn.net/download/lyg468088/8723039? ...
- codevs3002 石子归并 3
题目描述 Description 有n堆石子排成一列,每堆石子有一个重量w[i], 每次合并可以合并相邻的两堆石子,一次合并的代价为两堆石子的重量和w[i]+w[i+1].问安排怎样的合并顺序,能够使 ...
- iOS----------开发中常用的宏有那些
OC对象判断是否为空? 字符串是否为空 #define kStringIsEmpty(str) ([str isKindOfClass:[NSNull class]] || str == nil || ...
- android:Android开发不得不收藏的Utils
AndroidUtils AndroidUtils Android开发不得不收藏的Utils 之前写这篇文章主要是项目应用到的Utils,发现已经有一个更全面的开源库总结,所以还是非常震惊可以总结的这 ...