Add indexes to menu_entity_index table
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #2927181. --> Reported by: [seanb](https://www.drupal.org/user/545912) >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>In a large site (over 12.000 links and 35.000 nodes) creating a node based view with a relation to <em>menu_entity_index</em> becomes very slow. This is caused by a join on <em>nid = target_id</em> without having a index on the target_id field.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Add more indexes to the <em>menu_entity_index</em> table.</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <ul> <li>Add the indexes to the schema.</li> <li>Create an update hook to fix existing sites.</li> </ul> <h3 id="summary-ui-changes">User interface changes</h3> <p>-</p> <h3 id="summary-api-changes">API changes</h3> <p>-</p> <h3 id="summary-data-model-changes">Data model changes</h3> <p>-</p> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <h3 id="summary-ui-changes">User interface changes</h3> <h3 id="summary-api-changes">API changes</h3> <h3 id="summary-data-model-changes">Data model changes</h3>
issue