<p>I mainly use <a href="https://plugins.craftcms.com/inventory" rel="nofollow noreferrer">Inventory</a> plugin for that purpose - it's great, and really useful on larger sites, especially when refactoring/redesigning.</p>
<p>Also here's a handy DB query I often come back to which finds all entries (non-revision and non-draft, but including disabled entries), that use a given matrix block type ID:</p>
<pre class="lang-sql prettyprint-override"><code>SELECT DISTINCT title, craft_content.elementId, enabled
FROM craft_content
INNER JOIN craft_matrixblocks ON ownerId = craft_content.elementId
INNER JOIN craft_elements ON craft_content.elementId = craft_elements.id
WHERE typeId = '8' AND title IS NOT NULL AND revisionId is null AND draftId is null AND dateDeleted is null AND deletedWithOwner is null
</code></pre>
<p>There's also a new plugin called <a href="https://plugins.craftcms.com/entity-diagrams" rel="nofollow noreferrer">Entity Diagrams</a>, which can be completely bonkers but is highly configurable... give it a go it's kind of fun. It shows you visually how your fields and sections relate to each other, like a relational database schema diagram.</p>

CC BY-SA 4.0
2023-03-08T18:10:09.867Z
2023-03-08T18:10:09.867Z
James Smith
<p>It is useful sometimes to have a list, which field at which sections/globals/categories/neo-fields etc is used - so that one can delete or reuse some fields, or change some field settings and keep in mind all the places where there will be changes afterwards.</p>
<p>Is it possible to get this information somehow? I thought to write an SQL-Query for it, but maybe there is some plugin or some build-in Craft feature that already does it.</p>

<field><sections>
Check which field at which sections is used
# Check which field at which sections is used

(Asked by: username_0 on 2023-03-08)

It is useful sometimes to have a list, which field at which sections/globals/categories/neo-fields etc is used - so that one can delete or reuse some fields, or change some field settings and keep in mind all the places where there will be changes afterwards.

Is it possible to get this information somehow? I thought to write an SQL-Query for it, but maybe there is some plugin or some build-in Craft feature that already does it.

**Tags:** field, sections

---

## 1 answers

### Answer by username_1 on 2023-03-08. Score: 3 | Accepted answer

I mainly use Inventory plugin for that purpose - it's great, and really useful on larger sites, especially when refactoring/redesigning.
Also here's a handy DB query I often come back to which finds all entries (non-revision and non-draft, but including disabled entries), that use a given matrix block type ID:
SELECT DISTINCT title, craft_content.elementId, enabled
FROM craft_content
INNER JOIN craft_matrixblocks ON ownerId = craft_content.elementId
INNER JOIN craft_elements ON craft_content.elementId = craft_elements.id
WHERE typeId = '8' AND title IS NOT NULL AND revisionId is null AND draftId is null AND dateDeleted is null AND deletedWithOwner is null

There's also a new plugin called Entity Diagrams, which can be completely bonkers but is highly configurable... give it a go it's kind of fun. It shows you visually how your fields and sections relate to each other, like a relational database schema diagram.


---

