SlideShare a Scribd company logo
When do Rollback Segments Shrink?                                               Administration Tips




When do Rollback Segments shrink?

Rollback segments shrink whenever a transaction crosses an extent boundary, provided
that OPTIMAL has been set. Crossing the extent boundary is known as a 'wrap' (erroneously,
many think a 'wrap' only occurs when the segment starts re-using its first extent. It doesn't.
Any time a new extent starts to be used, that's a wrap).

If OPTIMAL has not been set, shrinks will not occur, however many wraps you have.

If you think about it, shrinking as a transaction seeks to cross the extent boundary is a
ludicrous time to do the deed. There's your transaction, wanting to get on and write its
rollback, and suddenly, it has to take time out waiting for the rollback segment to decide
which extents are to be de-allocated. Shrinkage also forces DBWR to flush rollback blocks
in the Buffer Cache back down to disk -and any time anything induces additional I/O,
performance suffers.

Therefore, my strong advice has always been: First, size your segments properly in the first
place, so that they neither grow nor shrink. Second, if they do inadvertently balloon in
size (perhaps because of a blocking transaction, which there's very little you can do to
prevent happening), perform a shrink manually, at a time and place of your choosing,
instead of relying on the automatic OPTIMAL method firing off in the middle of
transactions.

To induce a manual shrink, issue the command:

ALTER ROLLBACK SEGMENT BLAH SHRINK TO    50M;

(...or whatever size is appropriate for you). The segment might not get all the way down
to the specified size (it will never drop extents that contain active rollback -i.e., live
transactions- for example), but it will get as close as it can. If that command fires at night
when few people are using the system, nobody will notice the performance hit it induces.




Copyright © Howard Rogers 2001            10/18/2001                                     Page 1 of 1

More Related Content

PDF
Tablerename
PDF
Rollbacksizes
PDF
Sequencereset
PDF
Userlimit
PDF
Rollbackblocking
PDF
Undo internalspresentation
PDF
Usertracing
PPT
Applyinga blockcentricapproachtotuning
Tablerename
Rollbacksizes
Sequencereset
Userlimit
Rollbackblocking
Undo internalspresentation
Usertracing
Applyinga blockcentricapproachtotuning

More from oracle documents (20)

PDF
Windowsosauthent
PDF
Whatistnsnames
PDF
Whatisadatabaselink
PDF
Varraysandnestedtables
PDF
Userpasswrd
PDF
Undo internals paper
PDF
Tablespacelmt
PDF
Sql scripting sorcerypresentation
PDF
Sql scripting sorcerypaper
PDF
Sql for dbaspresentation
PDF
Rollbacklmt
PDF
Rollback1555s
PDF
PDF
Real liferecoverypresentation
PDF
Real liferecoverypaper
PDF
Perfstats
PDF
Oracledates
PDF
PDF
Nologging
PDF
Migration
Windowsosauthent
Whatistnsnames
Whatisadatabaselink
Varraysandnestedtables
Userpasswrd
Undo internals paper
Tablespacelmt
Sql scripting sorcerypresentation
Sql scripting sorcerypaper
Sql for dbaspresentation
Rollbacklmt
Rollback1555s
Real liferecoverypresentation
Real liferecoverypaper
Perfstats
Oracledates
Nologging
Migration
Ad

Recently uploaded (20)

PDF
20250805_A. Stotz All Weather Strategy - Performance review July 2025.pdf
PDF
Stem Cell Market Report | Trends, Growth & Forecast 2025-2034
DOCX
unit 1 COST ACCOUNTING AND COST SHEET
PPTX
ICG2025_ICG 6th steering committee 30-8-24.pptx
PDF
Katrina Stoneking: Shaking Up the Alcohol Beverage Industry
PPTX
Belch_12e_PPT_Ch18_Accessible_university.pptx
PDF
Reconciliation AND MEMORANDUM RECONCILATION
PPT
340036916-American-Literature-Literary-Period-Overview.ppt
PPTX
Principles of Marketing, Industrial, Consumers,
PPTX
The Marketing Journey - Tracey Phillips - Marketing Matters 7-2025.pptx
PDF
pdfcoffee.com-opt-b1plus-sb-answers.pdfvi
PDF
Elevate Cleaning Efficiency Using Tallfly Hair Remover Roller Factory Expertise
PDF
Chapter 5_Foreign Exchange Market in .pdf
PDF
Roadmap Map-digital Banking feature MB,IB,AB
PDF
Power and position in leadershipDOC-20250808-WA0011..pdf
PDF
Ôn tập tiếng anh trong kinh doanh nâng cao
DOCX
Business Management - unit 1 and 2
PDF
Outsourced Audit & Assurance in USA Why Globus Finanza is Your Trusted Choice
PDF
Types of control:Qualitative vs Quantitative
PDF
kom-180-proposal-for-a-directive-amending-directive-2014-45-eu-and-directive-...
20250805_A. Stotz All Weather Strategy - Performance review July 2025.pdf
Stem Cell Market Report | Trends, Growth & Forecast 2025-2034
unit 1 COST ACCOUNTING AND COST SHEET
ICG2025_ICG 6th steering committee 30-8-24.pptx
Katrina Stoneking: Shaking Up the Alcohol Beverage Industry
Belch_12e_PPT_Ch18_Accessible_university.pptx
Reconciliation AND MEMORANDUM RECONCILATION
340036916-American-Literature-Literary-Period-Overview.ppt
Principles of Marketing, Industrial, Consumers,
The Marketing Journey - Tracey Phillips - Marketing Matters 7-2025.pptx
pdfcoffee.com-opt-b1plus-sb-answers.pdfvi
Elevate Cleaning Efficiency Using Tallfly Hair Remover Roller Factory Expertise
Chapter 5_Foreign Exchange Market in .pdf
Roadmap Map-digital Banking feature MB,IB,AB
Power and position in leadershipDOC-20250808-WA0011..pdf
Ôn tập tiếng anh trong kinh doanh nâng cao
Business Management - unit 1 and 2
Outsourced Audit & Assurance in USA Why Globus Finanza is Your Trusted Choice
Types of control:Qualitative vs Quantitative
kom-180-proposal-for-a-directive-amending-directive-2014-45-eu-and-directive-...
Ad

Rollbackshrinks

  • 1. When do Rollback Segments Shrink? Administration Tips When do Rollback Segments shrink? Rollback segments shrink whenever a transaction crosses an extent boundary, provided that OPTIMAL has been set. Crossing the extent boundary is known as a 'wrap' (erroneously, many think a 'wrap' only occurs when the segment starts re-using its first extent. It doesn't. Any time a new extent starts to be used, that's a wrap). If OPTIMAL has not been set, shrinks will not occur, however many wraps you have. If you think about it, shrinking as a transaction seeks to cross the extent boundary is a ludicrous time to do the deed. There's your transaction, wanting to get on and write its rollback, and suddenly, it has to take time out waiting for the rollback segment to decide which extents are to be de-allocated. Shrinkage also forces DBWR to flush rollback blocks in the Buffer Cache back down to disk -and any time anything induces additional I/O, performance suffers. Therefore, my strong advice has always been: First, size your segments properly in the first place, so that they neither grow nor shrink. Second, if they do inadvertently balloon in size (perhaps because of a blocking transaction, which there's very little you can do to prevent happening), perform a shrink manually, at a time and place of your choosing, instead of relying on the automatic OPTIMAL method firing off in the middle of transactions. To induce a manual shrink, issue the command: ALTER ROLLBACK SEGMENT BLAH SHRINK TO 50M; (...or whatever size is appropriate for you). The segment might not get all the way down to the specified size (it will never drop extents that contain active rollback -i.e., live transactions- for example), but it will get as close as it can. If that command fires at night when few people are using the system, nobody will notice the performance hit it induces. Copyright © Howard Rogers 2001 10/18/2001 Page 1 of 1