Symptom
- 1. What does the term "I/O-intensive database operations" refer to in this note?
- 2. What problems can occur as a result of these database operations?
- 3. How can I minimize the effects of these operations?
- 4. When do I actually need to use I/O-intensive database operations?
- 5. Which online options are available?
- 6. Which aspects do I have to bear in mind to optimize performance?
- 7. How can I best execute I/O-intensive database operations with Oracle tools?
- 8. How can I best execute I/O-intensive database operations with SAP tools?
Other Terms
FAQ
Reason and Prerequisites
- 1. What does the term "I/O-intensive database operations" refer to in this note?
- Creating indexes
- Rebuilding indexes
- Coalescing indexes
- Generating statistics
- Structure validation of objects
- Determination of index fragmentation
- Reorganization of tables
- System copy / Unicode conversion with R3LOAD
- Media recovery
- Client deletion
- Table conversion
- Incremental conversion
- 2. What problems can occur as a result of these database operations?
- The operations may place locks on important objects so that a production operation that runs in parallel is now only possible with restrictions.
- The processing of large datasets can use up large amounts of system resources so that a production operation is now only possible with restrictions.
- Certain objects may be temporarily inaccessible.
- Due to long runtimes, the operation may not be completed within the planned downtime.
- 3. How can I minimize the effects of these operations?
- Do I actually need the database operation in question?
- Can I execute the operation online without locks?
- Can I speed up the operation by setting parameters or using parallel processing?
- 4. When do I actually need to use I/O-intensive database operations?
- Creating indexes
- Coalescing indexes
- Rebuilding indexes
Note 771929 describes in detail the differences between rebuilding and coalescing indexes.
- Generating statistics
- Structure validation of objects
- Determination of index fragmentation
- Reorganization of tables
- System copy / Unicode conversion with R3LOAD
A Unicode conversion is a specific instance of a system copy to convert the system to Unicode.
- Media recovery
- Client deletion
- Table conversion
- Incremental conversion
- 5. Which online options are available?
As of Oracle 8i, you can rebuild indexes online. However, note that temporary locks are still set so the online function is restricted (refer to Note 682926, point 2).
As of Oracle 9i, you can create indexes, reorganize tables without LONG and LONG RAW fields, and validate structures online. You can use ICNV (Note 541538) to restructure tables with LONG and LONG RAW fields during production operation.
- 6. Which aspects do I have to bear in mind to optimize performance?
- Oracle parameter DB_FILE_MULTIBLOCK_READ_COUNT
Caution: The parameter value affects the cost calculation of CBOs (see Note 750631). Therefore, you must ensure that the parameter is only adjusted for the I/O-intensive database operation. You can set the parameter for individual sessions by using:
ALTER SESSION SET DB_FILE_MULTIBLOCK_READ_COUNT = <new_value>
- Oracle parameters SORT_AREA_SIZE / PGA_AGGREGATE_TARGET
- Oracle parameters DB_CACHE_SIZE / DB_BLOCK_BUFFERS
Sometimes, a big buffer pool can have a negative effect on performance. For Oracle Release 10.2.03 or lower see Note 1028099.
- Other Oracle parameters
It may also be useful to set the parameter DB_BLOCK_CHECKSUM to FALSE in the critical time period.
- NOLOGGING option
- Redo log configuration
- NOARCHIVELOG option
- Parallel Query
- Parallel processing on the client
- 7. How can I best execute I/O-intensive database operations with Oracle tools?
- Creating indexes
CREATE INDEX <index_name> ... [ONLINE] [PARALLEL <degree>]
[NOLOGGING]
Choose PARALLEL to activate Parallel Query with a < degree> level of parallel processing.
Choose NOLOGGING if you do not want redo log information to be generated.
The individual options are independent of each other and can be used as required.
See also Note 334224.
- Rebuilding indexes
ALTER INDEX <index_name> ... REBUILD [ONLINE] [PARALLEL <degree>]
[NOLOGGING]
Choose PARALLEL to activate Parallel Query with a < degree> level of parallel processing.
Choose NOLOGGING if you do not want redo log information to be generated.
The individual options are independent of each other and can be used as required.
- Coalescing indexes
ALTER INDEX <index_name> COALESCE [PARALLEL <degree>];
- Generating statistics
ANALYZE TABLE ... STATISTICS ...
DBMS_STATS.GATHER_TABLE_STATS(... [, degree => <degree>]);
Also refer to Notes 632336, 684545, 711047 and 906139 for information on optimizing DBMS_STATS runtimes on Oracle 9i.
- Structure validation of objects
ANALYZE TABLE <table_name> VALIDATE STRUCTURE CASCADE [ONLINE];
For Oracle 10g, you should also refer to Note 1022097.
- Determination of index fragmentation
ANALYZE INDEX <index> VALIDATE STRUCTURE;
- Reorganization of tables
- Media recovery
RECOVER DATABASE ... [PARALLEL <degree>]
After each recovered archive log, a checkpoint must be performed. Therefore, checkpoint tuning measures (such as increasing the number of DBWR processes or using larger redo logs) can also help.
- Client deletion
- Table conversion
- Incremental conversion
- 8. How can I best execute I/O-intensive database operations with SAP tools?
To perform I/O-intensive administration tasks, we recommend that you use the BRSPACE (see Note 647697) and BRCONNECT (see Note 403704) tools.
- Creating indexes
- Rebuilding indexes
brspace -f idreorg -i <indexes> [-p <degree>] [-e <degree>]
You can use the "-p" option to activate parallel processing on the client - BRSPACE can then rebuild multiple indexes at the same time.
You can use the "-e" option to activate Parallel Query.
- Coalescing indexes
brspace -f idalter -a coalesce
Parallel processing is not supported by BRSPACE.
- Generating statistics
brconnect -f stats -t <table> [-p <degree>] [-g <degree>]
brconnect -f stats -t all [-p <degree>] [-g <degree>]
You can use the "-p" option to activate parallel processing on the client (see Note 403713).
You can use the "-g" option to activate Oracle parallel execution for DBMS_STATS. See also Note 424239.
When using DBMS_STATS you can switch from Row Sampling to Block Sampling in order to reduce the number of block accesses needed (see Note 424239).
Do not set the BRCONNECT parameter STATS_CHANGE_THRESHOLD lower than necessary. Otherwise, statistics are created again for an unnecessary number of tables.
With Oracle 9i and lower, you can activate table monitoring (see Notes 408527, 628590) to shorten the time-intensive check phase of generating statistics. As of Oracle 10g, this feature is active by default.
Refer also to the other notes listed above for optimizing DBMS_STATS performance on Oracle.
- Structure validation of objects
brconnect -f stats -t <table> -v [-p <degree>]
brconnect -f stats -t all -v [-p <degree>]
You can use the " -p" option to activate parallel processing on the client - BRCONNECT can then process several tables at the same time.
As of Oracle 9i, the operation is automatically executed online.
- Determination of index fragmentation
brconnect -f stats -t <index> -v index_store [-p <degree>]
Caution: The operation always locks the relevant table, since the necessary statistical information can only be determined when the table is locked (see Note 444287).
- Reorganization of tables
brspace -f tbreorg -t <tables> [-p <degree>] [-e <degree>]
You can use the "-p" option to activate parallel processing on the client - BRSPACE can then reorganize several tables at the same time.
You can use the "-e" option to activate Parallel Query.
You can execute an offline reorganization (which is necessary for tables with LONG and LONG RAW fields and with Oracle 8.1.7 or lower) as follows:
brspace -f tbexport -t <tables>
brspace -f tbimport -t <tables> [-m no]
When you specify "-m no", commits are suppressed during the import, and this can lead to significant improvements in performance. However, you should note that PSAPROLL or PSAPUNDO must be larger than the largest table to be imported.
You can execute an offline reorganization on the basis of Data Pump as of Oracle 10g and BRSPACE 7.00 (17) as follows: You can parallelize the export phase and the import phase by specifying "-p <degree>".
Refer to Note 646681 for more information about reorganization with BRSPACE.
- System copy / Unicode conversion with R3LOAD
In addition, you can activate Parallel Query to parallel process full table scans that are executed during an export:
ALTER TABLE <table> PARALLEL <degree>;
To ensure that the system does not use an index access instead of a more suitable full table scan, you should set parameter OPTIMIZER_INDEX_COST_ADJ to 100.
As of R3load 6. 40, you have the option of using a direct path import, which avoids the Oracle buffer pool and therefore performs better. For more information, see Note 1045847.
See also Note 936441, which contains extensive information on tuning R3LOAD activities on Oracle.
For information about how to considerably reduce the time required by R3szchk to calculate the storage requirement, see Note 1047369.
You can split larger tables using Notes 1043380 and 952514.
Note 954268 describes how performance gains can be made using unsorted unloading.
For information about the Unicode conversion, see also Note 857081.
- Media recovery
brrecover ... [-e <degree>]
- Client deletion
- Table conversion
In addition, parallel and unlocked conversions are also often possible on the basis of BRSPACE online reorganizations. However, this requires additional manual actions and can lead to unwanted results if the procedure is performed incorrectly.
- Incremental conversion
However, to avoid ORA-01555 errors, the cursor is closed after an hour and then reopened. As a result, all cleared areas of the table (or the index used) have to be read again before the first data record that still exists is found. In the case of very large tables, it may take more than an hour to scan all blocks that have already been cleared, which has a very negative effect on the overall performance. To solve this problem, manually modify the timeout. To do this, adjust the following row of report RADIV050:
IF RUN_TIME > max_table_time.
Max_table_time (Default: 3600) can be replaced with a different number of seconds until the timeout occurs. Since max_table_time is also used in other reports, you should not adjust the value of the constants. Instead, you should replace this constant with the corresponding numeric constant. Therefore, the following entry would be for a timeout of one day:
IF RUN_TIME > 86400.
Since RADIV050 is a template, you cannot use the Modification Assistant to carry out the change.
After you adjust the value, you must stop and restart the data transfer in ICNV in order to activate the new setting.
Header Data
Released On | 11.01.2012 21:50:03 | ||
Release Status | Released for Customer | ||
Component | BC-DB-ORA Oracle | ||
Other Components |
| ||
Priority | Recommendations / Additional Info | ||
Category | FAQ |
Validity
This document is not restricted to a software component or software component version
References
This document refers to:
SAP Notes
No comments:
Post a Comment