Regardless of the number of
extents in your tables, they need to be properly sized; as of Oracle Database 10g, you should rely
on automatic (system-managed) extent allocation if the objects in the tablespace are of varying
sizes. Unless you know the precise amount of space you need for each object and the number
and size of extents, use autoallocate when you create a tablespace, as in this example:
create tablespace users12
datafile '+DATA' size 100m
extent management local autoallocate;
The extent management local clause is the default for create tablespace; autoallocate is the
default for tablespaces with local extent management.
Oracle reads data from tables in two ways: by RowID (usually immediately following an
index access) and via full table scans. If the data is read via RowID, the number of extents in the
table is not a factor in the read performance. Oracle will read each row from its physical location
(as specified in the RowID) and retrieve the data.
If the data is read via a full table scan, the size of your extents can impact performance to a
very small degree. When reading data via a full table scan, Oracle will read multiple blocks at a
time. The number of blocks read at a time is set via the DB_FILE_MULTIBLOCK_READ_COUNT
database initialization parameter and is limited by the operating system??™s I/O buffer size. For
example, if your database block size is 8KB and your operating system??™s I/O buffer size is 128KB,
?–
?–
?–
Chapter 5: Developing and Implementing Applications 145
you can read up to 16 blocks per read during a full table scan.
Pages:
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267