What is the “onepass” option in repair?
Under normal running of repair (without the onepass option), the repair runs in two passes. In the first pass the tables are compared, followed by the second pass when the target table is repaired for the rows that were earlier found to be out of sync during the compare phase. When such rows are repaired, the lock on target table is row level lock or table level lock depending on the absolute # of out of sync rows determined. If the out of sync rows are few, then it is a row level lock, otherwise it is a table level lock.
The “onepass” option is extremely useful if fixing the out of sync on tables that are huge as well as have a very ratio of out of sync rows relative to the total # of rows. With “onepass” option there is only one pass which is the repair pass, and no separate compare and repair passes. The target table is locked for the duration of repair. This is more efficient under the circumstances where the target table has a very ratio of out of sync rows relative to the total # of rows.
© ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center