|
|
 |
|
Oracle Tips
by Burleson Consulting
|
The Data Warehouse Development Life Cycle
Parallelism And Oracle Data Warehousing
The V$SYSSTAT View
Here, we see that File 16 may have a problem with excessive lock
conversions. To further investigate, return to V$PING, and get the
sums for File 16, as follows:
SELECT *
FROM
v$ping
SEE CODE DEPOT FOR FULL SCRIPT
Now, we can see additional detail about the contents of File 16, as
shown in Table 7.2.
File # Block #
Stat XNC
Class #
Name Kind
16
11
XCUR
5 1
ORDER Table
16
12
XCUR 33456
1
ORDER Table
16
13
XCUR 12
1
ORDER Table
Table 7.2 Viewing additional file details.
From this output, we can clearly see that Block 12 is the source of
our contention.
The following query against the ORDER table will reveal the contents
of the rows in the data block, as shown in Table 7.3. Remember, data
blocks are numbered in hex, so we convert Block 12 to a hex(c).
SELECT
rowid,
order_number,
customer_number
FROM
ORDER
SEE CODE DEPOT FOR FULL SCRIPT
ROWID
ORDER_NUMBER
CUSTOMER_NUMBER
0000000C.0000.0008 1212
73
0000000C.0000.0008 1213
73
0000000C.0000.0008 1214
73
Table 7.3 Viewing row contents.
In Table 7.3, we see that the lock conversion relates to orders
placed by customer number 73. Other than a random coincidence, we
can assume that there may be freelist contention in the ORDER table
as new orders are added to the database. Adding new freelists will
allow more concurrency during SQL INSERT operations, and the value
for freelists should be reset to the maximum number of end users who
are expected to be inserting an ORDER row at any given time.
Unfortunately, Oracle does not allow the dynamic modification of
freelists, because they are physically stored in each data block.
So, the only alternative is to drop and re-create the table with
more freelists in each block header. Following is the SQL used to
drop and re-create the ORDER table:
CREATE TABLE ORDER_DUMMY
STORAGE (freelists 10)
AS
SELECT * FROM ORDER;
DROP TABLE ORDER;
RENAME ORDER_DUMMY TO ORDER;
This is an excerpt from "High Performance
Data Warehousing".
 |
If you like Oracle
tuning, you may enjoy the book
Oracle Tuning: The Definitive Reference
, with over 900 pages of BC's favorite tuning tips & scripts.
You
can buy it directly from the publisher and save 30%, and get instant
access to the code depot of Oracle tuning scripts. |
 |
Expert Remote DBA
BC is America's oldest and largest Remote DBA Oracle support
provider. Get real Remote DBA experts, call
BC Remote DBA today. |
 |
|
|
|
|