05.11.2015 Views

Apress.Expert.Oracle.Database.Architecture.9i.and.10g.Programming.Techniques.and.Solutions.Sep.2005

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

638<br />

CHAPTER 14 ■ PARALLEL EXECUTION<br />

you do some conventional path inserts into these tables also, UNIFORM allocation will permanently<br />

have additional free space in it that it will never use. Unless you can size the extents for<br />

the UNIFORM LMT to be much smaller, you will see what I term excessive wastage over time—<br />

<strong>and</strong> remember that this space is associated with the segment <strong>and</strong> will be included in a full<br />

scan of the table.<br />

To demonstrate this, let’s do another parallel direct path load into these existing tables,<br />

using the same inputs:<br />

ops$tkyte@ORA10GR1> alter session enable parallel dml;<br />

Session altered.<br />

ops$tkyte@ORA10GR1> insert /*+ append */ into UNIFORM_TEST<br />

2 select * from big_table_et;<br />

10000000 rows created.<br />

ops$tkyte@ORA10GR1> insert /*+ append */ into AUTOALLOCATE_TEST<br />

2 select * from big_table_et;<br />

10000000 rows created.<br />

ops$tkyte@ORA10GR1> commit;<br />

Commit complete.<br />

If we compare the space utilization of the two tables after that operation as follows:<br />

ops$tkyte@ORA10GR1> exec show_space( 'UNIFORM_TEST' );<br />

Free Blocks............................. 118,463<br />

Total Blocks............................ 409,600<br />

Total Bytes............................. 3,355,443,200<br />

Total MBytes............................ 3,200<br />

Unused Blocks........................... 0<br />

Unused Bytes............................ 0<br />

Last Used Ext FileId.................... 6<br />

Last Used Ext BlockId................... 281,609<br />

Last Used Block......................... 12,800<br />

PL/SQL procedure successfully completed.<br />

ops$tkyte@ORA10GR1> exec show_space( 'AUTOALLOCATE_TEST' );<br />

Free Blocks............................. 48<br />

Total Blocks............................ 291,184<br />

Total Bytes............................. 2,385,379,328<br />

Total MBytes............................ 2,274<br />

Unused Blocks........................... 0<br />

Unused Bytes............................ 0<br />

Last Used Ext FileId.................... 8<br />

Last Used Ext BlockId................... 140,025<br />

Last Used Block......................... 8<br />

PL/SQL procedure successfully completed.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!