无序整理,以后会慢慢补充
表空间(tablespace)> segments(段)> extent(区)> block(块)
数据库块大小,这里8192bytes约8k.
SQL> show parameter db_block_size
NAME TYPE VALUE
db_block_size integer 8192
表,index等segments建在schema的表空间上,初始大小是建表语句定义,插入2条小数据的话,会分配一个extents,一个extents有几个block是看建表语句。如果定义的是1M的话,1024kb, 那就是1024/8 = 128个块。 如果插入数据越来越多,需要扩展extents初次会根据建表语句next参数来扩。以后会分配的extents会越来越大。
普通表又叫堆表(heap-organized table),它存数据是无序的,只要有连续可用满足数据的空间就会分配。存的一行数据的列是按照建表的列排序来的。
A data block in the table segment might contain the unordered rows shown in the following example:
50,Shipping,121,1500
120,Treasury,1700
70,Public Relations,204,2700
30,Purchasing,114,1700
130,Corporate Tax,1700
10,Administration,200,1700
110,Accounting,205,1700
The column order is the same for all rows in a table. The database usually stores columns in the order in which they were listed in the CREATE TABLE statement, but this order is not guaranteed. For example, if a table has a column of type LONG, then Oracle Database always stores this column last in the row. Also, if you add a new column to a table, then the new column becomes the last column stored.
数据行尽可能的都是往一个block里存,每张表的一行数据小于等于256 columns的话,都会往一个block里存,如果超过了就会跨block来存了。