多值压缩(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

Question 
Re-creating tables show that they are occupying more space temporarily and shows correct space next day (or later time)
Answer
Working as Expected.
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工具)的更多相关文章

  1. Linux中常用压缩打包工具

    Linux中常用压缩打包工具 压缩打包是常用的功能,在linux中目前常用的压缩工具有gzip,bzip2以及后起之秀xz.本文将介绍如下的工具常见压缩.解压缩工具以及打包工具tar. gzip2 直 ...

  2. Java压缩和解压缩文件工具

    Java压缩和解压缩文件工具 学习了: https://www.oschina.net/code/snippet_1021818_48130 http://blog.csdn.net/gaowen_h ...

  3. PHP的LZF压缩扩展工具

    这次为大家带来的是另外一个 PHP 的压缩扩展,当然也是非常冷门的一种压缩格式,所以使用的人会比较少,而且在 PHP 中提供的相关的函数也只是对字符串的编码与解码,并没有针对文件的操作.因此,就像 B ...

  4. 【Teradata】磁盘碎片整理(ferret工具)

    DEFRAGMENTcombines free sectors and moves them to the end of a cylinder.PACKDISKfill (or packs) cyli ...

  5. 【Teradata Utility】系统工具使用

    List two ways in which a system utility can be started. Explain how to use the following utilities t ...

  6. C#照片批量压缩小工具

    做了一个照片批量压缩工具,其实核心代码几分钟就完成了,但整个小工具做下来还是花了一天的时间.中间遇到了大堆问题,并寻求最好的解决方案予以解决.现在就分享一下这个看似简单的小工具所使用的技术. 软件界面 ...

  7. Java操作zip压缩和解压缩文件工具类

    需要用到ant.jar(这里使用的是ant-1.6.5.jar) import java.io.File; import java.io.FileInputStream; import java.io ...

  8. Linux下方便的块设备查看工具lsblk

    之前在Linux下看有什么块设备,通常都用fdisk什么的或者直接ls /dev/ 去看很不方便. 这个工具属于util-linux-ng包,在RHEL 6.1上是安装好的啦,直接用就好. ubunt ...

  9. 图片压缩java工具类

    package com.net.util; import java.awt.Image; import java.awt.image.BufferedImage; import java.io.Fil ...

随机推荐

  1. Python进阶笔记

    列表生成式 函数的参数类型 lambda函数 map, reduce, filter, sorted函数 eval, exec, join, zip函数 itertools中的函数 copy与deep ...

  2. 注册asp.net 4.0版本到IIS服务器中

    在IIS服务器的运维的过程中,有时候部署asp.net网站发现未安装.net framework对应版本信息,此时就需要重新将.net framework对应的版本注册到IIS中,此处以重新注册.ne ...

  3. SpringBoot史前简述

    背景 大约20年前,程序员们使用“企业级Java Bean”(EJB)开发企业应用,需要配置复杂的XML. 在二十世纪初期,新兴Java技术——Spring,横空出世.使用极简XML和POJO(普通J ...

  4. python网络聊天器多线程版

    在之前的一篇文章(python网络编程-udp)中实现了一个简单的udp聊天器,只能在单线程下进行收发数据,在学习完多线程之后,实现一个能同时收发数据的udp聊天器. 说明: 编写一个有2个线程的程序 ...

  5. C#设计模式之四建造者模式(Builder Pattern)【创建型】

    一.引言 今天我们要讲讲Builder模式,也就是建造者模式,当然也有叫生成器模式的,英文名称是Builder Pattern.在现实生活中,我们经常会遇到一些构成比较复杂的物品,比如:电脑,它就是一 ...

  6. 搭建基于nginx-rtmp-module的流媒体服务器

    1.业务流程图 2.软件下载 2.1 windows下载obs 2.2 linux 安装nginx(附加rtmp模块) 1.cd /usr/local 2.mkdir nginx 3.cd nginx ...

  7. vuejs 1.x - 实例:搜索过滤

    <!DOCTYPE html> <html> <head> <meta name="viewport" content="wid ...

  8. iOS ---------NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813)

    遇到此问题的解决办法: 使用<NSURLSessionDelegate>中的didReceiveChallenge方法,方法中的代码如下: - (void)URLSession:(NSUR ...

  9. iOS------教你如何APP怎么加急审核

    苹果的加急审核如何使用呢? 在iTunesconnect页面,点击右上角的“?”图标,在弹出菜单中选择“联系我们”, 联系我们 然后在Contact Us页面,选择“App Review” —> ...

  10. JMeter 正则表达式提取器结合ForEach控制器遍历提取变量值

    正则表达式提取器结合ForEach控制器遍历提取变量值   by:授客 QQ:1033553122 1. 需要解决的问题 使用正则提取器提取了一组变量值,需要在其它sampler中,循环引用组中的某几 ...