Home > Database > Mysql Tutorial > Oracle建表后插入一条记录占用的段空间为什么是0.0625M

Oracle建表后插入一条记录占用的段空间为什么是0.0625M

WBOY
Release: 2016-06-07 16:47:36
Original
1067 people have browsed it

为什么建表、插入一条记录,segment占用的空间是0.0625M? 其实就是此时,对象T8产生了8个不同类型额BLOCK(目前只知道5个class=

通过前面建表看BUFFER CACHE中BUFFER HEADER的数量和类型,就明白了自己以前理解的一段sql查询结果:

ZN@PROD>select * from t8;

        X          Y
 ---------- ----------
          1          2

ZN@PROD>select segment_name,bytes/1024/1024 from user_segments where segment_name='T8';
 
SEGMENT_NA BYTES/1024/1024
 ---------- ---------------
 T8                  .0625

为什么建表、插入一条记录,segment占用的空间是0.0625M?

其实就是此时,对象T8产生了8个不同类型额BLOCK(目前只知道5个class=1的DATA BLOCK,1个class=4的SEGMENT HEADER,,至于class=8&9的是什么BLOCK就不知道了),每个BLOCK大小是8192个字节,那么8*8192/1024/1024=0.0625M!

linux

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template