How to find the total number of sprints and identify the oldest closed sprints

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the server and data center platforms.

Purpose

The total number of sprints, including closed sprints, in your instance can contribute to problems with the closedSprints() JQL function, and overall performance degradation related to slow sprint cache population. 

Solution

If you experience problems, use the following queries to check the total number of sprints, and identify the oldest sprints so they can be deleted if no longer required. 

Find the total number of sprints

Query tested on PostgreSQL and MySQL. You may need to adapt this query for other databases.  

PostgreSQL
SELECT count(*) 
FROM "AO_60DB71_SPRINT" 
where "CLOSED" = true
MySQL
SELECT count(*) 
FROM AO_60DB71_SPRINT 
where CLOSED = 1


Find the oldest sprints

Query tested on PostgreSQL and MySQL. You may need to adapt this query for other databases.  

PostgreSQL
SELECT * 
FROM "AO_60DB71_SPRINT" 
where "CLOSED" = true 
order by "END_DATE"
MySQL
SELECT * 
FROM AO_60DB71_SPRINT 
where CLOSED = true 
order by END_DATE





Last modified on Jan 24, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.