Drupal custom fields do not add indexes to field values by default. This will cause a problem. When you expose this field as a search field in views, the execution will scan the entire table. The performance will be very slow.
You can use the following to test
EXPLAIN SELECT * FROM `node__body` WHERE body_value LIKE "hello"
You can see that the number of rows is the total number. This is because MySQL will perform a full table scan for non-indexed table searches.
Features
Index Support
- text
- text_long
- text_with_summary
- string
- string_long
How to use
- go to /admin/structure/types/manage/yourtypes/fields
- edit field and chose Add Index
- save and run drush entity-updates (https://www.drupal.org/project/devel_entity_updates)
Project information
- Project categories: Developer tools, Performance
5 sites report using this module
- Created by xiukun.zhou on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.

