Ok so over time we created lots of custom fields, some where deleted, some got a context added to make issues lighter,
however one thing I noticed, and that is well known, after adding a context to a field, the issue that should not have a value anymore are still present in the database.
in one case I have a project with 60k issues but 15 fields are only used on 30k issues,
how do I cleanup all the extra unusable/unwanted rows.
my main concern is that with the number of fields (around 900) the queries on the customfieldvalue table have become slower and during peak hours it is using a lot of our database processing.
I cannot find anything related to cleaning up tables or having jira do it either.
I assume a reindex is not gonna do anything as it is related to rebuilding the lucene index from the database.
Could I iterate with groovy on the issues and just do a issue save without modifying anything to force the database to clean?
Generally its not the amount of data in a Jira database that causes performance problems. More important is the size of the Lucene indexes, particularly the main one (issues). A full reindex should reduce the size of your Lucene issues index if you have used custom field contexts to change the fields in each issue.
I don't recommend deleting rows from customfieldvalue without a full understanding of how other tables use it
Though it is worth looking at the linked issue in https://community.atlassian.com/t5/Jira-questions/Jira-database-schema-change-for-customfieldvalue/qaq-p/743828#M241710
Recommended Learning For You
Level up your skills with Atlassian learning
Learning Path
Become an effective Jira admin
Manage global settings and shared configurations called schemes to achieve goals more quickly.
Streamline Jira administration with effective governance
Improve how you administer and maintain Jira and minimize clutter for users and administrators.
Learning Path
Become an effective Jira software project admin
Set up software projects and configure tools and agile boards to meet your team's needs.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.