多值压缩(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. [转]docker 部署 mysql + phpmyadmin 3种方法

    本文转自:https://blog.csdn.net/Gekkoou/article/details/80897309 方法1: link # 创建容器 test-mysql (千万别用 mysql: ...

  2. 第一册:lesson ninety-five。

    原文: tickets,please. Two return tickets to London please. What time will the next train leave? At nin ...

  3. 第一册:lesson twenty five。

    原文:Mrs.smith's kitchen. Mrs.smith's kitchen is small. There is a refrigerator in the kitchen. The re ...

  4. 第一讲 从头开始做一个web qq 机器人,第一步获取smart qq二维码

    新手教程: 前言:最近在看了一下很久很久以前做的qq机器人失效了,最近也在换工作目前还在职,时间很挺宽裕的.就决定从新搞一个web qq机器人 PC的协议解析出来有点费时间以后再做. 准备工作: 编译 ...

  5. mysql外键使用

    一.外键 .外键:链接两张表的字段,通过主表的主键和从表的外键来描述主外键关系,呈现的是一对多的关系.例如:商品类别(一)对商品(多),主表:商品类别表,从表:商品表. .外键的特点:从表外键的值是对 ...

  6. RNP项目遇到的坑

    1.nginx问题 和前端约定了在header中存放登录态k-v,选择的key是带下划线的. nginx 默认会丢弃带下划线的 header. 设置 underscores_in_headers on ...

  7. 3款网页jQuery抽奖实例演示

    实例演示 实例演示 实例演示

  8. @RequestBody Spring MVC 示例

    1.前端的访问请求 <script type="text/javascript"> $(document).ready(function(){ var saveData ...

  9. AIDL基本使用

    1.概述 Binder能干什么?Binder可以提供系统中任何程序都可以访问的全局服务.这个功能当然是任何系统都应该提供的,下面我们简单看一下Android的Binder的框架 Android Bin ...

  10. request获取各种路径

    equest.getRealPath() 这个方法已经不推荐使用了,代替方法是: request.getSession().getServletContext().getRealPath() 在ser ...