22.Identify the logical structure that will never have more than one data segment created for it.

22.Identify the logical structure that will never have more than one data segment created for it.
A.external table
B.partitioned table
C.partitioned index
D.nonclustered table
E.global temporary table
答案:D
解析:


一、首先看下数据库中现有的,多于1个segment的类型
SQL> select distinct segment_type from dba_segments group by segment_name,owner,segment_type having  count(*)>1;
SEGMENT_TYPE
------------------
INDEX PARTITION
TABLE SUBPARTITION
TABLE PARTITION
所以排除BC
二、接下来我们创建一个外部表
SQL> create table test_delta
  2  (id varchar2(100))
  3  organization external              
  4  (type oracle_loader                
  5  default directory DATA_DIR         
  6  access parameters                  
  7  (records delimited by newline characterset us7ascii 
  8  badfile 'LOG_DIR':'test.bad'       
  9  logfile 'LOG_DIR':'test.log'       
 10  fields terminated by " " optionally enclosed by '\t'  
 11  )
 12  location('test_delta.txt')         
 13  )
 14  reject limit unlimited;


Table created.
[oracle@wahaha3 data_dir]$ vi test_delta.txt 
1
2
3
4
5
6
7
8
SQL> select * from scott.test_delta;
ID
--------------------------------------------------------------------------------
1
2
3
4
5
6
7
8
8 rows selected.
SQL> select SEGMENT_NAME from user_segments;


SEGMENT_NAME
--------------------------------------------------------------------------------
DEPT
EMP
SALGRADE
WAHAHA2
WAHAHA0713
PK_DEPT
PK_EMP
7 rows selected.
这里说不表不占用segment
三、建立一个global temporary table
SQL> create global temporary table  tbgtemp1 (id integer) on commit preserve rows tablespace temp;
Table created.
SQL> insert into tbgtemp1 values(1);
1 row created.
SQL> select table_name,tablespace_name from dba_tables where TABLE_NAME=upper('tbgtemp1');
TABLE_NAME                     TABLESPACE_NAME
------------------------------ ------------------------------
TBGTEMP1                       TEMP
SQL> select segment_name from dba_segments where tablespace_name='TEMP';
no rows selected
这里也没有
四、nonclustered table指的是非簇表
多个表存在一个段中
create cluster c1 (id integer) tablespace users
create table t1(id integer)cluster c1(id);
create table t2(id integer)cluster c1(id);
create index c1_index on cluster c1;
insert into t1 values(1);
SQL> select segment_name from dba_segments where segment_name='C1';


SEGMENT_NAME
--------------------------------------------------------------------------------
C1
只有1个
非簇表不知道是不是就是多个表不在一个segment中存储的意思
所以这道题
A:是外部表 0个
B:分区表   多个
C:分区索引 多个
D:非簇表   多个
E:全局临时表 0个
我觉得应该选AE
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值