> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# إعدادات جلسة shrink_over_*

> إعدادات جلسة ClickHouse في المجموعة المُنشأة shrink_over_*.

export const VersionHistory = ({rows = []}) => {
  if (rows.length === 0) {
    return null;
  }
  const headers = ["الإصدار", "القيمة الافتراضية", "التعليق"];
  const border = "1px solid rgba(128, 128, 128, 0.3)";
  const cell = {
    border,
    padding: "0.25rem 0.5rem",
    textAlign: "start",
    verticalAlign: "top"
  };
  return <details className="not-prose" style={{
    border,
    borderRadius: "0.5rem",
    margin: "0.5rem 0",
    padding: "0.5rem 0.75rem",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <summary style={{
    cursor: "pointer",
    fontWeight: 600,
    opacity: 0.72
  }}>
        سجل الإصدارات
      </summary>
      <table style={{
    borderCollapse: "collapse",
    width: "100%",
    margin: "0.5rem 0 0"
  }}>
        <thead>
          <tr>
            {headers.map(header => <th key={header} style={{
    ...cell,
    fontWeight: 600,
    opacity: 0.72
  }}>
                {header}
              </th>)}
          </tr>
        </thead>
        <tbody>
          {rows.map((row, row_index) => <tr key={row.id ?? row_index}>
              {(row.items ?? []).map((item, item_index) => <td key={item_index} style={{
    ...cell,
    overflowWrap: "anywhere"
  }}>
                  {item?.label}
                </td>)}
            </tr>)}
        </tbody>
      </table>
    </details>;
};

export const SettingsInfoBlock = ({type, default_value, changeable_without_restart}) => {
  return <div className="not-prose" style={{
    display: "flex",
    flexWrap: "wrap",
    alignItems: "baseline",
    columnGap: "0.5rem",
    rowGap: "0.125rem",
    margin: "0.375rem 0",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <div style={{
    fontWeight: 600,
    opacity: 0.72
  }}>النوع</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>القيمة الافتراضية</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          يمكن تغييره دون إعادة التشغيل
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

تتوفر هذه الإعدادات في [system.settings](/docs/ar/reference/system-tables/settings)، وهي مُولَّدة تلقائيًا من [الشفرة المصدرية](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp).

<div id="shrink_over_allocated_columns_min_waste_bytes">
  ## shrink\_over\_allocated\_columns\_min\_waste\_bytes
</div>

<SettingsInfoBlock type="UInt64" default_value="16777216" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.8"},{"label": "16777216"},{"label": "إعداد جديد: الحد الأدنى المطلق للذاكرة المهدرة في عمود لتقليصه ليلائم حجمه عند INSERT."}]}]} />

الحد الأدنى المطلق للذاكرة المهدرة (المحجوزة ولكن غير المستخدمة) في عمود، بالبايت، لتقليصه ليلائم حجمه عند INSERT. راجع [shrink\_over\_allocated\_columns\_min\_waste\_ratio](/docs/ar/reference/settings/session-settings/shrink-over#shrink_over_allocated_columns_min_waste_ratio).

يمنع إعادة تخصيص الأعمدة ذات التخصيص الزائد الطفيف، عندما لا يبرر التوفير في الذاكرة تكلفته.

<div id="shrink_over_allocated_columns_min_waste_ratio">
  ## shrink\_over\_allocated\_columns\_min\_waste\_ratio
</div>

<SettingsInfoBlock type="Float" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.8"},{"label": "1"},{"label": "إعداد جديد لتقليص الأعمدة المفرطة في التخصيص لتناسب حجم البيانات عند INSERT، بهدف تقليل ذروة استخدام الذاكرة. معطّل افتراضيًا (1.0)."}]}]} />

عند INSERT، تُقلَّص الأعمدة المفرطة في التخصيص (التي تتجاوز ذاكرتها المحجوزة الذاكرة المستخدمة، مثلًا نتيجة نمو الأعمدة متغيرة الطول وفق قوى العدد اثنين) لتناسب حجم البيانات قبل مرحلتي التجسيد وكتابة الجزء المكلفتين، بهدف تقليل ذروة استخدام الذاكرة.

لا يُقلَّص العمود إلا عندما يكون `allocatedBytes() > byteSize() * shrink_over_allocated_columns_min_waste_ratio` ويكون الهدر المطلق مساويًا على الأقل لـ `shrink_over_allocated_columns_min_waste_bytes`.

القيم الممكنة:

* قيمة Float أكبر من 1.
* قيمة أقل من 1 أو تساويه تعطّل التقليص (تحافظ القيمة الافتراضية `1.0` على تعطيله).
