Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Jira pre-indexing query is slow due to slower mysql execution plan Edited

Hi,

One of our Jira instance has index page opening very slowly everytime (unless the query is cached in database). I see the query that is taking longer is as follows and when I compared the execution plan of the query with that of other instances, it is choosing a slower execution plan:

mysql> explain SELECT COUNT(I.ID) FROM jiraissue I WHERE (I.PROJECT IN ('15101', .........'25804') ) AND (I.ARCHIVED = 'Y' );

| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |

| 1 | SIMPLE | I | NULL | range | issue_proj_status | issue_proj_status | 9 | NULL | 440933 | 10.00 | Using index condition; Using where |

On other instances, it is not using index condition and using only where. So, I ran the same query with option ignore index(issue_proj_status) to not use Index condition and then the query is completed fast. 

mysql> explain SELECT COUNT(I.ID) FROM jiraissue I ignore index(issue_proj_status) WHERE (I.PROJECT IN ('15101', .........'25804') ) AND (I.AR
CHIVED = 'Y' );

| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |

| 1 | SIMPLE | I | NULL | ALL | NULL | NULL | NULL | NULL | 4335153 | 5.00 | Using where |


mysql> SELECT COUNT(I.ID) FROM jiraissue I ignore index(issue_proj_status) WHERE (I.PROJECT IN (15101', .........'25804') ) AND (I.ARCHIVED = 'Y' );
+-------------+
| COUNT(I.ID) |
+-------------+
| 0 |
+-------------+
1 row in set (15.03 sec)

The only difference that I could find between the instances is that the number of projects in the issue instance is high (1009). This query runs everytime indexing page is opened and it takes atleast 15 mins of time.

Any ideas on what causing this and how to fix it?

1 answer

0 votes
Fadoua Community Leader Dec 31, 2020

@Jeevan Patnaik 

Did you check your DB and instance configuration? What I mean when we work in Atlassian Tools and the number of projects, issues,....goes up you need to make sure that your Server (where application is sitting) and DB have enough space, JVM,.......same goes with the DB you need to make sure that you are meeting the requirements.

https://confluence.atlassian.com/adminjiraserver/jira-applications-installation-requirements-938846826.html

Please make sure to select your Jira version.

Best,

Fadoua

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you