Oracle19c OCP(1Z0082) Q1题库解析 oracle ocp题库 云贝教育郭一军原创

2023年 9月 2日 42.7k 0

考试科目:1Z0-082

考试题量:90

通过分数:60%

考试时间:150min

本文为云贝教育郭一军原创,请尊重知识产权,转发请注明出处,不接受任何抄袭、演绎和未经注明出处的转载。

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.

参考答案:AB

解析:

A:不可用索引会自动删除segment,但是索引分区后,某个分区的索引不可用,其它索引段还在的

B:私有临时表这个特性18C才引入(https://docs.oracle.com/en/database/oracle/oracle-database/18/admin/managing-tables.html#GUID-9B373086-0760-4B18-9688-BACFF07EC74B)

C:私有临时表和全局临时表都有ON COMMIT DELETE ROWS和ON COMMIT PRESERVE ROWS的两种分类(delete rows用于事务相关,也就在事务结束后truncate data in the temporary table,preserve rows表示在会话结束后清除临时表的数据)

D:不可用的索引会被删除段,已使用alter index unusable测试

E:普通表截断后会保留min_extents设置的初始区段大小

sys@PROD> conn yunbee/yunbee@pdb1

Connected.

yunbee@PDB1> create table t10(id int,name varchar(100));

Table created.

yunbee@PDB1> begin

2 for i in 1 .. 50000 loop

3 insert into t10 values(i,'aaaaa');

4 commit;

5 end loop;

6 end;

7 /

PL/SQL procedure successfully completed.

yunbee@PDB1> select extent_id,file_id,block_id from dba_extents where segment_name='T10';

EXTENT_ID FILE_ID BLOCK_ID

---------- ---------- ----------

0 12 160

1 12 168

2 12 176

3 12 184

4 12 192

5 12 200

6 12 208

7 12 216

8 12 224

9 12 232

10 12 240

11 12 248

12 12 256

13 12 264

14 12 272

yunbee@PDB1> truncate table t10;

Table truncated.

yunbee@PDB1> select extent_id,file_id,block_id from dba_extents where segment_name='T10';

EXTENT_ID FILE_ID BLOCK_ID

---------- ---------- ----------

0 12 160

相关文章

Oracle如何使用授予和撤销权限的语法和示例
Awesome Project: 探索 MatrixOrigin 云原生分布式数据库
下载丨66页PDF,云和恩墨技术通讯(2024年7月刊)
社区版oceanbase安装
Oracle 导出CSV工具-sqluldr2
ETL数据集成丨快速将MySQL数据迁移至Doris数据库

发布评论