11.07.2015 Views

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

128 CHAPTER 3 ■ DATABASE ADMINISTRATIONNew Data Partitioning SchemesIn <strong>Oracle</strong> <strong>Database</strong> <strong>11</strong>g, there are several new partitioning techniques to facilitate storing largeamounts of data as well as increasing the performance of queries based on the partitionedtables. We list the four new partitioning schemes here. You’ll find a more detailed discussion ofthe new partitioning schemes in Chapter 12, which discusses new data warehousing featuresin <strong>Oracle</strong> <strong>Database</strong> <strong>11</strong>g.• Reference partitioning enables you to logically equipartition tables with parent-childrelationships by inheriting the partitioning key from the parent table.• Interval partitioning lets you automate the creation of range partitions by creating partitionson demand.• System partitioning enables application controlled partitioning.• New composite partitioning schemes let you perform logical range partitioning alongtwo dimensions.• Virtual column partitioning lets you use partitioning key columns defined on a table’svirtual columns (discussed earlier in this chapter), thus overcoming limitations wherethe partitioning needs aren’t being served by the currently defined table columns.Allowing DDL Locks to Wait for DML LocksIn previous releases, by default, any DDL locks wouldn’t wait for a DML lock but would failright away if they couldn’t obtain the DDL lock. In <strong>Oracle</strong> <strong>Database</strong> <strong>11</strong>g, you can use the newinitialization parameter ddl_lock_timeout to specify the duration for which a DDL statementwill wait for a DML lock.The default value of the ddl_lock_timeout parameter is zero, meaning that DDL statementswon’t wait for a DML lock. The maximum value of 1,000,000 seconds means you canpotentially set the wait duration for as long as <strong>11</strong>.5 days. You can use the alter session statementto specify the duration of wait for a DML lock, as shown here:SQL> alter session set ddl_lock_timeout = 30;Session altered.SQL>Explicit Locking of TablesIf you want to add a column to a table, <strong>Oracle</strong> requires that an exclusive lock be requestedwhen you issue the DDL command to add the column. If <strong>Oracle</strong> fails to obtain an immediateDDL lock on the table in question, the DDL command will fail right away. <strong>Oracle</strong> <strong>Database</strong> <strong>11</strong>glets you allow a DDL command to wait for a specified length of time before it fails because of itsinability to acquire the necessary DML lock on the table.<strong>Oracle</strong> now allows new syntax with the lock table command that lets you specify themaximum time a statement should wait to obtain a DML lock on a table. This feature is handyfor operations such as adding a column to a table that users are frequently updating. The newsyntax of the lock table command is as follows:

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

Saved successfully!

Ooh no, something went wrong!