Skip to content
Snippets Groups Projects

Issue #3447145: Improve database performance when computing ModerationStateFieldItemList.

Open Issue #3447145: Improve database performance when computing ModerationStateFieldItemList.
Open M Parker requested to merge issue/drupal-3447145:3447145-improve-db-performance into 11.x
Files
2
@@ -34,6 +34,11 @@ protected function getEntitySchema(ContentEntityTypeInterface $entity_type, $res
$schema[$revision_data_table]['unique keys'] += [
'content_moderation_state__lookup' => $unique_keys,
];
// Add an index on the content_entity_revision_id column to make
// moderation_state computed field lookups faster.
$schema[$revision_data_table]['indexes'] += [
'content_moderation_state__content_entity_revision_id' => ['content_entity_revision_id'],
];
}
return $schema;
Loading