Change record status: 
Project: 
Introduced in branch: 
10.0.x
Introduced in version: 
10.0.0
Description: 

For PostgreSQL the tables "path_alias" and "path_alias_revision" have on the columns "path" and "alias" a GIST index. The page /admin/content should now be a lot faster for sites with a lot of nodes (> 50K).

For PostgreSQL can now GIST indexes be created. GIST indexes are useful for full test search. For more info: https://www.postgresql.org/docs/12/datatype-textsearch.html.

The schema API does not allow indexes to specify what kind of index they are. To make it possible to add GIST indexes the decision has been made that an index is a GIST index when the index name ends with _gist.

Schema API for a table with a GIST index:

$table_specification = [
  'fields' => [
    'test_field_text'  => [
      'type' => 'text',
      'not null' => TRUE,
    ],
  ],
  'indexes' => [
    'test_field_gist' => ['test_field_text'],
  ],
];

Creating a GIST index in code:

\Drupal::database()->schema()->addIndex('path_alias', 'path_alias__path_gist', ['path'], []);
Impacts: 
Site builders, administrators, editors
Module developers