Tom, because when I create a table with the following values in each of its partitions, I generate 195 extents?
If the partitions have an INITIAL if the size of the partition.
COMPRESS BASIC
STORAGE (
INITIAL 7748954362 - 7.2 GB
NEXT 1048576 - 1 MB
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0),
Thank you.
By default, tablespaces are now locally managed, which means we use a bit map system to map out the file. Which means extents are defined in preset equally sized chunks (64k, 1m, 8m, ... etc)
For example
SQL> create table T ( x char(1000) )
2 tablespace demo;
Table created.
SQL>
SQL> insert into t values (1);
1 row created.
SQL>
SQL> select extent_id, bytes
2 from dba_extents
3 where owner = user
4 and segment_name = 'T'
5 order by 1
6 /
EXTENT_ID BYTES
---------- ----------
0 65536
We gave you a 64k chunk. What if you asked for larger initial ? Now I drop the table and repeat
SQL> create table T ( x char(1000) )
2 tablespace demo
3 storage ( initial 20m next 7m);
Table created.
SQL>
SQL> insert into t values (1);
1 row created.
SQL>
SQL> select extent_id, bytes
2 from dba_extents
3 where owner = user
4 and segment_name = 'T'
5 order by 1
6 /
EXTENT_ID BYTES
---------- ----------
0 8388608
1 8388608
2 1048576
3 1048576
4 1048576
5 1048576
6 rows selected.
You asked for 20m, so we gave you 2 x 8M, plus 4 x 1M
This is a good thing, because as tables comes and go, grow and shrink, then they'll all be able to grab free chunks from each other, because all of the size allocations are consistent.