You can define indexes for your ORM queries using the
$indexes configuration property in your
DataObject subclasses. See the Indexes section for more information.
You can configure the field to use a different filter (such as
StartsWithFilter) using the
TreeDropdownField.search_filter configuration property:
A very common use of
TreeDropdownField is the "Insert Link" feature in the TinyMCE WYSIWYG. Setting this configuration to use another filter and adding an index on
SiteTree can significantly improve performance.
See SearchFilter Modifiers for more information about search filters.
Skipping check and repair during dev/build
When you run
dev/build, there is a step that checks the integrity of the database tables (via
CHECK TABLE) and repairs issues (via
REPAIR TABLE) if possible.
For tables with many records (tens/hundreds of thousands) this can be slow. If you identify that you have some specific
DataObject models with lots of records
which are slowing down your
dev/build, you might want to explicitly skip checks for those:
Note: The entire inheritance chain (both ancestors and descendents) of models in that configuration array will be excluded from the check and repair step.
You can also disable these checks entirely: