【Oracle OCP考试】1z0-082(1)

Which two statements are true about space-saving features in an Oracle Database?

A.An index created with the UNUSABLE attribute has no segment.

B.Private Temporary Tables(PTTs) store metadata in memory only.

C.Private Temporary Tables(PTTs) when used, are always dropped at the next commit statement.

D.An index that is altered to be UNUSABLE will retain its segment

E. A table that is truncated will always have all of its extents removed

正确答案:【A、B】

解析:实际上PTT有两种:Transaction-specific (ON COMMIT DROP DEFINITION)和session-specific (ON COMMIT PRESERVE DEFINITION)。这两种在commit时都会删除表中的数据,但第二种是不会删除表定义的,因此C是错的。

bash 复制代码
SQL>  create index in_1 on table_1(no) unusable;
Index created.

SQL> select segment_name,blocks from user_segments where segment_name in ('IN_1');
no rows selected

SQL>  alter index in_1 rebuild;
Index altered.

SQL> select segment_name,blocks from user_segments where segment_name in ('IN_1');
SEGMENT_NAME     BLOCKS
-------------------- ----------
IN_1            8

发现创建索引时为unusable是不创建段的,只有重建索引才会有段。所以A正确。

经过测试,truncate table初始的extent不会删除。所以E错误。

经过测试,alter index in_a unusable,会删除所有的segment。所以D错误。

相关推荐
m0_733565467 分钟前
mysql数据库执行全量备份影响业务_利用xtrabackup实现无锁备份
jvm·数据库·python
楠枬12 分钟前
Redis 事务
数据库·redis·缓存
2401_8800714012 分钟前
golang如何编写DNS查询工具_golang DNS查询工具编写大全
jvm·数据库·python
phltxy13 分钟前
怎么样持续提升自己的编程能力?
数据库
轻刀快马13 分钟前
穿透 MQ 专栏 (五):【终局之战】MySQL 和 MQ 的世纪联姻:扒开“分布式事务”的遮羞布
数据库·分布式·消息队列
Elastic 中国社区官方博客16 分钟前
Elasticsearch 9.4 为 Elastic AI 生态系统的下一阶段提供支持:Dell AI Data Platform(与 NVIDIA 合作)
大数据·数据库·人工智能·elasticsearch·搜索引擎·ai·全文检索
预测模型的开发与应用研究17 分钟前
Oracle双库部署
数据库·oracle
m0_5913647324 分钟前
JavaScript中Object-hasOwn作为现代安全检测方案
jvm·数据库·python
m0_6245785926 分钟前
html标签怎么避免标签嵌套错误_div不能放在p内原因【详解】
jvm·数据库·python
霸道流氓气质42 分钟前
SpringAIAlibaba整合百炼平台实现多MCP Server调用示例及指定某MCP Server调用示例
数据库