> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-postgresql-tls-support.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

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

> إعدادات جلسة ClickHouse ضمن مجموعة max_partitions_* المُنشأة.

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](/ar/reference/system-tables/settings)، ويجري توليدها تلقائيًا من [الشفرة المصدرية](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp).

<div id="max_partitions_per_insert_block">
  ## max\_partitions\_per\_insert\_block
</div>

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

يحدّد الحد الأقصى لعدد الأقسام في كتلة إدراج واحدة،
ويتم طرح استثناء إذا كانت الكتلة تحتوي على عدد كبير جدًا من الأقسام.

* عدد صحيح موجب.
* `0` — عدد غير محدود من الأقسام.

**التفاصيل**

عند إدراج البيانات، يحسب ClickHouse عدد الأقسام في
كتلة الإدراج. وإذا كان عدد الأقسام أكبر من
`max_partitions_per_insert_block`، فإن ClickHouse إمّا يسجّل تحذيرًا أو يطرح
استثناءً استنادًا إلى `throw_on_max_partitions_per_insert_block`. ويكون نص الاستثناء
كما يلي:

> "يوجد عدد كبير جدًا من الأقسام في كتلة INSERT واحدة (`partitions_count` partitions, limit is " + toString(max\_partitions) + ").
> يتم التحكم في هذا الحد بواسطة الإعداد 'max\_partitions\_per\_insert\_block'.
> يُعدّ العدد الكبير من الأقسام من المفاهيم الخاطئة الشائعة. وسيؤدي ذلك إلى
> تأثير سلبي شديد في الأداء، بما في ذلك بطء تشغيل الخادم، وبطء استعلامات INSERT
> وبطء استعلامات SELECT. يُنصح بأن يكون إجمالي عدد الأقسام في الجدول
> أقل من 1000..10000. يُرجى ملاحظة أن التقسيم إلى أقسام ليس مخصصًا لتسريع
> استعلامات SELECT (يكفي مفتاح ORDER BY لجعل استعلامات النطاق سريعة).
> الأقسام مخصّصة لمعالجة البيانات (DROP PARTITION، وما إلى ذلك)."

<Note>
  هذا الإعداد هو حد أمان، لأن استخدام عدد كبير من الأقسام يُعد من المفاهيم الخاطئة الشائعة.
</Note>

<div id="max_partitions_to_read">
  ## max\_partitions\_to\_read
</div>

<SettingsInfoBlock type="Int64" default_value="-1" />

يحدّد الحد الأقصى لعدد الأقسام التي يمكن الوصول إليها ضمن استعلام واحد.

يمكن تجاوز قيمة الإعداد المحددة عند إنشاء الجدول باستخدام إعداد على مستوى الاستعلام.

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

* عدد صحيح موجب
* `-1` - غير محدود (الافتراضي)

<Note>
  يمكنك أيضًا تحديد إعداد MergeTree [`max_partitions_to_read`](/ar/reference/settings/session-settings/max-partitions#max_partitions_to_read) ضمن إعدادات الجدول.
</Note>
