# Indexing by Custom Field in Craft CMS

DevFeed: [Indexing by Custom Field in Craft CMS](<https://devfeed.tech/articles/indexing-by-custom-field-in-craft-cms-31273.md>)

Original publisher: [Read original article](<https://nystudio107.com/blog/indexing-by-custom-field-in-craft-cms>)

Author: andrew@nystudio107.com (Andrew Welch)

Published: 2023-06-28T17:13:00Z

Content type: tutorial

Language: en

Sources: [nystudio107 | Articles on modern web development.](<https://devfeed.tech/sources/nystudio107-articles-on-modern-web-development.md>)

Topics: [Content Management System](<https://devfeed.tech/topics/cms.md>), [Database](<https://devfeed.tech/topics/database.md>), [migration](<https://devfeed.tech/topics/migration.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [cms](<https://devfeed.tech/tags/cms.md>), [content](<https://devfeed.tech/tags/content.md>), [craft](<https://devfeed.tech/tags/craft.md>), [custom](<https://devfeed.tech/tags/custom.md>), [custom-fields](<https://devfeed.tech/tags/custom-fields.md>), [database](<https://devfeed.tech/tags/database.md>), [fields](<https://devfeed.tech/tags/fields.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [indexes](<https://devfeed.tech/tags/indexes.md>), [indexing](<https://devfeed.tech/tags/indexing.md>), [insights](<https://devfeed.tech/tags/insights.md>), [learn](<https://devfeed.tech/tags/learn.md>), [make](<https://devfeed.tech/tags/make.md>), [migration](<https://devfeed.tech/tags/migration.md>), [performance](<https://devfeed.tech/tags/performance.md>)

## AI overview

A tutorial on adding database indexes for custom fields in Craft CMS through a content migration. It explains that Craft CMS does not automatically index custom fields, so queries filtering on those fields may not scale well as datasets grow.

## Source excerpt

Learn how to make a content migration to add database indexes for custom fields in Craft CMS