Once the space is used in the initial extent,
incremental extents are allocated. In a locally managed tablespace, these subsequent extents can
either be the same size (using the UNIFORM keyword when the tablespace is created) or optimally
sized by Oracle (AUTOALLOCATE). For extents that are optimally sized, Oracle starts with a
minimum extent size of 64KB and increases the size of subsequent extents as multiples of the initial
extent as the segment grows. In this way, fragmentation of the tablespace is virtually eliminated.
?–
?–
?–
?–
?–
?–
170 Oracle Database 11g DBA Handbook
When the extents are sized automatically by Oracle, the storage parameters INITIAL, NEXT,
PCTINCREASE, and MINEXTENTS are used as a guideline, along with Oracle??™s internal algorithm,
to determine the best extent sizes. In the following example, a table created in the USERS tablespace
(during installation of a new database, the USERS tablespace is created with AUTOALLOCATE
enabled) does not use the storage parameters specified in the create table statement:
SQL> create table t_autoalloc (c1 char(2000))
2 storage (initial 1m next 2m pctincrease 50)
3 tablespace users;
Table created.
SQL> begin
2 for i in 1..3000 loop
3 insert into t_autoalloc values ('a');
4 end loop;
5 end;
6 /
PL/SQL procedure successfully completed.
SQL> select segment_name, extent_id, bytes, blocks
2 from user_extents where segment_name = 'T_AUTOALLOC';
SEGMENT_NAME EXTENT_ID BYTES BLOCKS
------------ ---------- ---------- ----------
T_AUTOALLOC 0 65536 8
T_AUTOALLOC 1 65536 8
.
Pages:
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311