PDA

View Full Version : حرفه ای: ترجمه مقاله When Oracle Storage Parameters are Ignored



رسول_57
دوشنبه 06 آذر 1391, 14:40 عصر
When Oracle Storage Parameters are Ignored

Oracle Tips by Burleson Consulting

October 29, 2011
Question: I understand that there are Oracle storage features that cause the standard table and index storage options to be ignored. Under what conditions are the storage parameters ignored?
Answer (by Chris Aiken): Oracle uses various parameters to define how data blocks are handled within the database. These storage parameters are all explained below, giving a brief overview of what they do and how they operate, as well as when the parameter is handled differently by Oracle.
It is important to note that with Automated Segment Space Management (http://www.dba-oracle.com/art_builder_assm.htm) enabled, and in some cases with Locally Managed Tablespaces (http://www.dba-oracle.com/concepts/t_administering_tablespaces.htm), certain parameters are disregarded. These storage parameters are PCTFREE, PCTUSED, MINIMUM EXTENT, MAXEXTENTS, INITIAL, NEXT, PCTINCREASE, FREELIST GROUPS and FREELISTS.
When PCTFREE is ignored

PCTFREE (http://www.dba-oracle.com/art_pctfree.htm) is a block storage parameter which specifies the amount of free space Oracle should leave in a database block for future updates. Oracle will continue adding new rows to the block until the remaining space is equal to the PCTFREE parameter. The default value for the PCTFREE parameter is PCTFREE=10. Any value between 0 and 99 may be used as long as the sum of PCTFREE and PCTUSED is not greater than 100.
When talking about PCTFREE, it must be noted that indexes are a special case. PCTFREE may be specified for an index, but only when the index is initially created.
The PCTFREE parameter is only used when an index is created. After index creation, new index block entries are made and PCTFREE is ignored.
When PCTUSED is ignored

PCTUSED (http://www.dba-oracle.com/oracle_tips_PCTFREE_PCTUSED.htm) is a storage parameter in Oracle which specifies when a database block is empty enough for Oracle to add it to the free list. When the percentage of used space in a block is greater than the PCTUSED parameter, Oracle will not add new rows to the block. The default settings for all Oracle tables are PCTUSED=40.


PCTUSED is disregarded for all objects created in locally managed tablespaces when Automated Segment Space Management (ASSM) is enabled.



PCTUSED is ignored for indexes: Oracle must manage the freelist re-link process for index tree management because the index node boundaries are the same as the index data block size. Hence, PCTUSED is not used for index segments.

When MINEXTENTS is ignored

In a dictionary-managed tablespace, the MINEXTENTS (http://www.dba-oracle.com/t_ault_18_clause_minextents_maxextent.htm) parameter defines the total number of extents to be allocated when a segment is created. MINIMUM EXTENT is used for locally managed tablespaces, but only to compute the initial amount of space to be allocated.
When MAXEXTENTS is ignored

MAXEXTENTS, for dictionary-managed tablespaces, is the maximum number of extents that can ever be allocated for the segment.
Locally Managed Tablespaces ignores MAXEXTENTS. Because Oracle manages the extents under a locally managed tablespace, MAXEXTENTS will be ignored.
When INITIAL is ignored

The INITIAL parameter defines the size of the first extent of an object. The default value for this is the size of 5 data blocks. In a dictionary-managed tablespace, if the MINIMUM EXTENT parameter was set at the time the tablespace was created, then Oracle rounds the value of INITIAL up to the specified MINIMUM EXTENT size, but only if necessary.
In a locally managed tablespace, Oracle uses the value of INITIAL together with the size of extents specified for the tablespace to calculate the size of the first extent of the object. It must also be noted that INITIAL cannot be set by using an ALTER TABLE statement.
When NEXT is ignored

NEXT represents, for dictionary-managed tablespaces, the size of the next incremental extent to be allocated for a segment. The default value for NEXT is always the size of 5 data blocks. The default value for the second extent is always equal to the original setting for NEXT. For each new extent, the NEXT is set to the previous size of NEXT multiplied by (1 + PCTINCREASE/100). If you manually set the value of the NEXT parameter, the next allocated extent will have the specified size regardless of the size of the most recently allocated extent and the PCTINCREASE parameter.
NEXT is ignored with LMT (locally managed tablespaces) because the database automatically manages extents.
When PCTINCREASE is ignored

PCTINCREASE is the storage parameter, for dictionary-managed tablespaces, which specifies the percentage by which each incremental extent grows over the previous extent allocated for a segment.
Just like the NEXT parameter, PCTINCREASE is not valid for locally managed tablespaces so it is ignored.
When FREELISTS and FREELIST_GROUPS are ignored

The FREELIST GROUPS parameter specifies the number of groups of free lists (http://www.dba-oracle.com/oracle_tips_INITRANS_MAXTRANS_FREELISTS.htm) for the database object you are creating. The default, and minimum, is 1 which causes all free lists of a segment to be available to all instances.


The FREELISTS and FREELIST GROUPS are disregarded for objects created in locally managed tablespaces (LMT).



The FREELISTS and FREELIST GROUPS parameter is disregarded with segment space management AUTO (bitmapped freelists, a.k.a. ASSM.).

The FREELISTS parameter specifies the number of free lists available for each of the free list groups for the object. This parameter is not used for tablespaces. The default and minimum value for FREELISTS is 1, and the maximum value depends on block size. Attempting to specify FREELISTS to a value greater than allowed will generate an error message informing you of the maximum value.


سوال : متوجه شده ام که در بعضی حالات ذخیره سازی در پایگاه داده اوراکل ، گزینه های ذخیره سازی استاندارد مرتبط با جدول و شاخص در نظر گرفته نمی شود . می خواستم بدانم تحت چه شرایطی این گزینه های ذخیره سازی به کناری نهاده می شود ؟
پاسخ :اوراکل ، پارامترهای مختلفی را برای تنظیم چگونگی استفاده از بلاک های داده در پایگاه داده تنظیم می کند . در اینجا به بحث در مورد پارامترهای ذخیره سازی می پردازیم و بررسی مختصری در مورد چگونگی عملکردشان داشته و مشخص می سازیم که در چه زمانی تنظیمات آنها در اوراکل تغییر می کند .

توجه داشته باشید که هنگامی که 'مدیریت فضای سگمنت اتوماتیک' فعال باشد و هنگامیکه فضاهای جدول (TableSpace) به صورت محلی مدیریت گردد ، بعضی پارامترها نادیده گرفته می شود . این پارامترهای ذخیره سازی عبارتند از : MAXEXTENTS ،PCTFREE ،PCTUSED،MINIMUM EXTENT،INITIAL،NEXT،PCTINCREASE،FREELISTGROUPS ،FREELISTS،
چه زمانی PCTFREE در نظر گرفته نمی شود ؟
PCTFREE یکی از پارامترهای ذخیره سازی بلاک است که مقدار فضای آزادی را که برای به روزرسانی های بعدی مورد نیاز است مشخص می سازد .اوراکل به افزودن سطرهای جدید در بلاک می پردازد تا زمانیکه مقدار فضای خالی بلاک برابر با پارامتر PCTFREE گردد. مقدار پیش فرض این پارامتر برابر با 10 است . هر عددی بین 0 تا 99 را می توان برای این پارامتر در نظر گرفت به گونه ایکه مجموع آن با پارامتر PCTUSED بیشتر از 100 نگردد .
باید خاطر نشان کرد که در هنگام بحث در مورد پارامتر PCTFREE ، ایندکس ها حالت خاصی دارند . PCTFREE باید برای یک ایندکس مشخص گردد اما تنها تا زمان ایجاد ایندکس .
پارامتر PCTFREE تنها تا زمانیکه ایندکس ایجاد گردد مورد استفاده قرار می گیرد . بعد از ایجاد ایندکس ، موجودیت های بلاک شاخص جدید ایجاد گردیده و PCTFREE حذف می گردد .



چه زمانی PCTUSED در نظر گرفته نمی شود ؟
PCTUSED پارامتر حافظه ای است که مشخص می سازد که چه زمانی بلاک پایگاه داده به اندازه کافی خالیست که اوراکل بتواند آن را به لیست خالی اضافه کند . هنگامیکه درصد فضای مورد استفاده در بلاک از پارامتر PCTUSED بیشتر گشت ، اوراکل سطر جدیدی به بلاک اضافه نمی کند . تنظیم پیش فرض برای تمام جداول اوراکل PCTUSED=40 است .

PCTUSED برای تمام اشیایی که در فضاهای جدول مدیریت شده ایجاد می گردند هنگامیکه مدیریت فضای سگمنت اتوماتیک (ASSM) فعال است ، نادیده گرفته می شود . PCTUSED برای ایندکس ها نیز نادیده گرفته می شود . اوراکل باید فرآیند لینک مجدد لیست خالی را برای مدیریت درخت ایندکس مدیریت کند زیرا حدود نود ایندکس مشابه اندازه بلاک داده ایندکس است . بنابراین ، PCTUSED برای سگمنت های ایندکس مورد استفاده قرار نمی گیرد .

چه زمانی MINEXTENTS نادیده گرفته می شود ؟

در فضای جدول مدیریت شده توسط دیکشنری داده ها ، پارامتر MINEXTENTS تعداد اکستنت هایی را که در هنگام ایجاد سگمنت به آن اختصاص داده می شود را مشخص می سازد . MINEXTENTS برای فضاهای جدول مدیریت شده محلی مورد استفاده قرار می گیرد اما تنها برای محاسبه مقدار اولیه فضایی که باید اختصاص داده شود .

چه زمانی MAXEXTENTS نادیده گرفته می شود ؟
MAXEXTENTS در فضای جدول مدیریت شده توسط دیکشنری داده ها ، بیشترین تعداد اکستنتی است که می توان برای یک سگمنت اختصاص داد . در حالت فضای جدول مدیریت شده محلی ، MAXEXTENTS نادیده گرفته می شود . به علت اینکه اوراکل ، اکستنت ها را در فضای جدول مدیریت شده محلی مدیریت می کند ، MAXEXTENTS نادیده گرفته می شود .

چه زمانی Initial نادیده گرفته می شود ؟

پارامتر Initial اندازه اولین اکستنت شی را نشان می دهد . مقدار پیش فرض آن 5 بلاک داده است . در فضای جدول مدیریت شده توسط دیکشنری ، اگر پارامتر MINIMUM EXTENT به زمانی که فضای جدول ایجاد می گردد ، اوراکل مقدار Initial را به اندازه MINIMUM EXTENT روند می کند ، اما تنها در صورتیکه ضروری باشد .

...