楼主: yexichang

[原创] 深入SecureFile—新一代LOB揭秘

[复制链接]
论坛徽章:
22
ITPUB 11周年纪念徽章
日期:2012-10-09 18:16:002013数据库大会纪念章
日期:2015-03-18 10:16:212014数据库大会纪念章
日期:2015-03-18 10:16:21秀才
日期:2015-07-13 09:55:11金牛座
日期:2015-09-14 18:15:03天蝎座
日期:2015-12-03 09:15:302016猴年福章
日期:2016-02-18 09:31:30猴赛雷
日期:2016-02-18 09:33:422016猴年福章
日期:2016-02-23 09:58:34秀才
日期:2016-03-24 09:20:52
21#
发表于 2015-1-28 14:51 | 只看该作者
本帖最后由 carlos。zh 于 2015-1-28 15:06 编辑

顶顶顶

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
22#
发表于 2015-1-29 02:30 | 只看该作者
本帖最后由 Yong Huang 于 2015-1-28 18:25 编辑

> 新版本咋不直接将BasicFile 去掉呢?是否意味着basicfile与securefile对比还有可取的地方呢?

Good question. In 12c, SecureFiles is the default. I guess Oracle just wants to slowly change these features to be cautious.

There's one little but important difference. BasicFiles does not support advanced features such as compression or deduplication. These features require a separate license. If Oracle dropped BasicFiles, and if you don't have the license, you would have to be careful not to specify the clause to use these features when you create a LOB column. But I guess it's a very small risk that could only be caused by a low probability accident.

By the way, Wing Hong continued the research on this topic almost three years ago. Somehow I missed it. A late Kudo to his excellent work!

使用道具 举报

回复
论坛徽章:
22
ITPUB 11周年纪念徽章
日期:2012-10-09 18:16:002013数据库大会纪念章
日期:2015-03-18 10:16:212014数据库大会纪念章
日期:2015-03-18 10:16:21秀才
日期:2015-07-13 09:55:11金牛座
日期:2015-09-14 18:15:03天蝎座
日期:2015-12-03 09:15:302016猴年福章
日期:2016-02-18 09:31:30猴赛雷
日期:2016-02-18 09:33:422016猴年福章
日期:2016-02-23 09:58:34秀才
日期:2016-03-24 09:20:52
23#
发表于 2015-1-29 10:24 | 只看该作者
Yong Huang 发表于 2015-1-29 02:30
> 新版本咋不直接将BasicFile 去掉呢?是否意味着basicfile与securefile对比还有可取的地方呢?

Good qu ...

谢谢,我有个疑问,我是在11.2.0.3上测试导入lob数据
但效果反而反了,耗时长空间开销大,是不是跟我的lob的具体数据有关呢?
我刚刚导入了个800M LOB字段测试了下
导入如果目标表lob为basicfile 需要83s   空间仍然需要800M
测试都是用的默认参数
LOB (PHOTO) STORE AS (
  TABLESPACE  LOBS
  ENABLE      STORAGE IN ROW
  CHUNK       8192
  PCTVERSION  10
  NOCACHE
  LOGGING

可当导入目标表lob为securefile,却需要98s  空间需要880M存储(不是说chunk大小可变,这样更易节省空间吗?)
LOB (PHOTO) STORE AS SECUREFILE (
  TABLESPACE  LOBS
  ENABLE      STORAGE IN ROW
  CHUNK       8192   ----建空表的时候没有指定chunk大小,系统默认
  NOCACHE
  LOGGING

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
24#
发表于 2015-2-3 04:48 | 只看该作者
Better performance of SecureFiles LOBs is probably observed during actual usage of the LOB, not during its creation. Try testing the performance of a query that reads the LOB.

Space usage may not be smaller for SecureFiles LOB unless you enable compression, which is a feature not available for BasicFiles LOB.

使用道具 举报

回复
论坛徽章:
22
ITPUB 11周年纪念徽章
日期:2012-10-09 18:16:002013数据库大会纪念章
日期:2015-03-18 10:16:212014数据库大会纪念章
日期:2015-03-18 10:16:21秀才
日期:2015-07-13 09:55:11金牛座
日期:2015-09-14 18:15:03天蝎座
日期:2015-12-03 09:15:302016猴年福章
日期:2016-02-18 09:31:30猴赛雷
日期:2016-02-18 09:33:422016猴年福章
日期:2016-02-23 09:58:34秀才
日期:2016-03-24 09:20:52
25#
发表于 2015-2-5 11:43 | 只看该作者
Yong Huang 发表于 2015-2-3 04:48
Better performance of SecureFiles LOBs is probably observed during actual usage of the LOB, not duri ...

谢谢 ~~ 已经测试 ~~

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
26#
发表于 2015-2-6 00:08 | 只看该作者
And the test result is?

使用道具 举报

回复
论坛徽章:
22
ITPUB 11周年纪念徽章
日期:2012-10-09 18:16:002013数据库大会纪念章
日期:2015-03-18 10:16:212014数据库大会纪念章
日期:2015-03-18 10:16:21秀才
日期:2015-07-13 09:55:11金牛座
日期:2015-09-14 18:15:03天蝎座
日期:2015-12-03 09:15:302016猴年福章
日期:2016-02-18 09:31:30猴赛雷
日期:2016-02-18 09:33:422016猴年福章
日期:2016-02-23 09:58:34秀才
日期:2016-03-24 09:20:52
27#
发表于 2015-2-7 10:35 | 只看该作者
Yong Huang 发表于 2015-2-6 00:08
And the test result is?

在  nocache+logging 下insert 400M的文本
securefile 速度是basicfile 的3倍
但空间需要多花80M左右

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
28#
发表于 2015-2-7 23:05 | 只看该作者
Thanks for your test. The performance advantage is expected. I didn't know SecureFile LOB would take so much more space than BasicFile LOB. If you also test SecureFile with compression, please let us know the result. Thanks.

使用道具 举报

回复
论坛徽章:
22
ITPUB 11周年纪念徽章
日期:2012-10-09 18:16:002013数据库大会纪念章
日期:2015-03-18 10:16:212014数据库大会纪念章
日期:2015-03-18 10:16:21秀才
日期:2015-07-13 09:55:11金牛座
日期:2015-09-14 18:15:03天蝎座
日期:2015-12-03 09:15:302016猴年福章
日期:2016-02-18 09:31:30猴赛雷
日期:2016-02-18 09:33:422016猴年福章
日期:2016-02-23 09:58:34秀才
日期:2016-03-24 09:20:52
29#
发表于 2015-2-9 10:48 | 只看该作者
Yong Huang 发表于 2015-2-7 23:05
Thanks for your test. The performance advantage is expected. I didn't know SecureFile LOB would take ...

我在测试环境下 securefile 使用了压缩
450M 使用medium压缩参数  段大小变为18M左右
如果使用high压缩参数 段大小变为15M左右
另外值得一提的是
比如我插入了200M LOB文件属性为securefile,在数据库中查看段大小约为450M
如果我此时将该段移动一次表空间(相当于重新整理)大小变为400M左右,此时的空间开销和basicfile差不多

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
30#
发表于 2015-2-10 00:11 | 只看该作者
Thanks for the test. Compressed Securefile LOB is impressive in space saving. I hope performance doesn't significantly suffer due to compression.

If you use alter table move to re-org the Securefile LOB segment, why not also do the same to Basicfile LOB? Every time you alter table move (or alter index rebuild), the segment size usually goes down. So for the comparison to be fair, the LOB re-org should be done to both types of LOB.

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表