SqlContentEntityStorage::FIELD_MINIMUM_CHUNK_SIZE

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::FIELD_MINIMUM_CHUNK_SIZE

The minimum chunk size for field loading.

This avoids running into database join limits.

When calculating the chunks, the last chunk is appended to the previous one so that the maximum fields to load at once is double this number. This ensures that 26 fields are loaded as a single group of 26, instead of 26 and 1, or that 51 fields are loaded in groups of 25 and 26.

See also

https://dev.mysql.com/doc/refman/9.7/en/join.html

https://sqlite.org/limits.html#max_sql_length

File

core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php, line 60

Class

SqlContentEntityStorage
A content entity database storage implementation.

Namespace

Drupal\Core\Entity\Sql

Code

protected const FIELD_MINIMUM_CHUNK_SIZE = 25;

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.