Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-6925

Investigate SQL query count executed for a single request

XMLWordPrintable

    • 3
    • 14
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      Switching on sql logging reveals that the custom field ids are queryied over and over again, something which could easily be cached (the id, not the field):

      [INFO] [talledLocalContainer] 2012-12-12 11:33:46,146 http-2990-3 DEBUG admin 693x2069x1 1pl6k6w 0:0:0:0:0:0:0:1%0 /rest/greenhopper/1.0/xboard/plan/backlog/data.json [greenhopper.service.sprint.SprintCustomFieldServiceImpl] Requesting the Default Sprint field
      [INFO] [talledLocalContainer] 2012-12-12 11:33:46,146 http-2990-3 INFO admin 693x2069x1 1pl6k6w 0:0:0:0:0:0:0:1%0 /rest/greenhopper/1.0/xboard/plan/backlog/data.json [atlassian.jira.ofbiz.LoggingSQLInterceptor] 0ms Connection taken. borrowed : 2
      [INFO] [talledLocalContainer] 2012-12-12 11:33:46,148 http-2990-3 INFO admin 693x2069x1 1pl6k6w 0:0:0:0:0:0:0:1%0 /rest/greenhopper/1.0/xboard/plan/backlog/data.json [atlassian.jira.ofbiz.LoggingSQLInterceptor] 1ms "SELECT ID, ENTITY_NAME, ENTITY_ID, PROPERTY_KEY, propertytype FROM PUBLIC.propertyentry WHERE ENTITY_NAME='GreenHopper.properties' AND ENTITY_ID='1' AND PROPERTY_KEY='GreenHopper.Sprint.Default.customfield.id'"
      [INFO] [talledLocalContainer] 2012-12-12 11:33:46,148 http-2990-3 INFO admin 693x2069x1 1pl6k6w 0:0:0:0:0:0:0:1%0 /rest/greenhopper/1.0/xboard/plan/backlog/data.json [atlassian.jira.ofbiz.LoggingSQLInterceptor] 2ms Connection returned. borrowed : 1
      [INFO] [talledLocalContainer] 2012-12-12 11:33:46,148 http-2990-3 INFO admin 693x2069x1 1pl6k6w 0:0:0:0:0:0:0:1%0 /rest/greenhopper/1.0/xboard/plan/backlog/data.json [atlassian.jira.ofbiz.LoggingSQLInterceptor] 0ms Connection taken. borrowed : 2
      [INFO] [talledLocalContainer] 2012-12-12 11:33:46,157 http-2990-3 INFO admin 693x2069x1 1pl6k6w 0:0:0:0:0:0:0:1%0 /rest/greenhopper/1.0/xboard/plan/backlog/data.json [atlassian.jira.ofbiz.LoggingSQLInterceptor] 9ms "SELECT ID, ENTITY_NAME, ENTITY_ID, PROPERTY_KEY, propertytype FROM PUBLIC.propertyentry WHERE ENTITY_NAME='GreenHopper.properties' AND ENTITY_ID='1' AND PROPERTY_KEY='GreenHopper.Sprint.Default.customfield.id'"
      [INFO] [talledLocalContainer] 2012-12-12 11:33:46,158 http-2990-3 INFO admin 693x2069x1 1pl6k6w 0:0:0:0:0:0:0:1%0 /rest/greenhopper/1.0/xboard/plan/backlog/data.json [atlassian.jira.ofbiz.LoggingSQLInterceptor] 10ms Connection returned. borrowed : 1
      [INFO] [talledLocalContainer] 2012-12-12 11:33:46,158 http-2990-3 INFO admin 693x2069x1 1pl6k6w 0:0:0:0:0:0:0:1%0 /rest/greenhopper/1.0/xboard/plan/backlog/data.json [atlassian.jira.ofbiz.LoggingSQLInterceptor] 0ms Connection taken. borrowed : 2
      [INFO] [talledLocalContainer] 2012-12-12 11:33:46,159 http-2990-3 INFO admin 693x2069x1 1pl6k6w 0:0:0:0:0:0:0:1%0 /rest/greenhopper/1.0/xboard/plan/backlog/data.json [atlassian.jira.ofbiz.LoggingSQLInterceptor] 1ms "SELECT propertyvalue FROM PUBLIC.propertynumber WHERE ID='10629'"
      [INFO] [talledLocalContainer] 2012-12-12 11:33:46,159 http-2990-3 INFO admin 693x2069x1 1pl6k6w 0:0:0:0:0:0:0:1%0 /rest/greenhopper/1.0/xboard/plan/backlog/data.json [atlassian.jira.ofbiz.LoggingSQLInterceptor] 1ms Connection returned. borrowed : 1
      [INFO] [talledLocalContainer] 2012-12-12 11:33:46,159 http-2990-3 DEBUG admin 693x2069x1 1pl6k6w 0:0:0:0:0:0:0:1%0 /rest/greenhopper/1.0/xboard/plan/backlog/data.json [greenhopper.service.sprint.SprintCustomFieldServiceImpl] Field ID '10100' has been set -- verifying that the field still exists
      [INFO] [talledLocalContainer] 2012-12-12 11:33:46,160 http-2990-3 DEBUG admin 693x2069x1 1pl6k6w 0:0:0:0:0:0:0:1%0 /rest/greenhopper/1.0/xboard/plan/backlog/data.json [greenhopper.service.sprint.SprintCustomFieldServiceImpl] Default Sprint field with custom field ID '10100' exists
      [INFO] [talledLocalContainer] 2012-12-12 11:33:46,160 http-2990-3 DEBUG admin 693x2069x1 1pl6k6w 0:0:0:0:0:0:0:1%0 /rest/greenhopper/1.0/xboard/plan/backlog/data.json [greenhopper.service.sprint.SprintCustomFieldServiceImpl] Requesting the Default Sprint field
      [INFO] [talledLocalContainer] 2012-12-12 11:33:46,160 http-2990-3 INFO admin 693x2069x1 1pl6k6w 0:0:0:0:0:0:0:1%0 /rest/greenhopper/1.0/xboard/plan/backlog/data.json [atlassian.jira.ofbiz.LoggingSQLInterceptor] 0ms Connection taken. borrowed : 2
      [INFO] [talledLocalContainer] 2012-12-12 11:33:46,161 http-2990-3 INFO admin 693x2069x1 1pl6k6w 0:0:0:0:0:0:0:1%0 /rest/greenhopper/1.0/xboard/plan/backlog/data.json [atlassian.jira.ofbiz.LoggingSQLInterceptor] 1ms "SELECT ID, ENTITY_NAME, ENTITY_ID, PROPERTY_KEY, propertytype FROM PUBLIC.propertyentry WHERE ENTITY_NAME='GreenHopper.properties' AND ENTITY_ID='1' AND PROPERTY_KEY='GreenHopper.Sprint.Default.customfield.id'"
      [INFO] [talledLocalContainer] 2012-12-12 11:33:46,161 http-2990-3 INFO admin 693x2069x1 1pl6k6w 0:0:0:0:0:0:0:1%0 /rest/greenhopper/1.0/xboard/plan/backlog/data.json [atlassian.jira.ofbiz.LoggingSQLInterceptor] 1ms Connection returned. borrowed : 1
      [INFO] [talledLocalContainer] 2012-12-12 11:33:46,161 http-2990-3 INFO admin 693x2069x1 1pl6k6w 0:0:0:0:0:0:0:1%0 /rest/greenhopper/1.0/xboard/plan/backlog/data.json [atlassian.jira.ofbiz.LoggingSQLInterceptor] 0ms Connection taken. borrowed : 2
      [INFO] [talledLocalContainer] 2012-12-12 11:33:46,162 http-2990-3 INFO admin 693x2069x1 1pl6k6w 0:0:0:0:0:0:0:1%0 /rest/greenhopper/1.0/xboard/plan/backlog/data.json [atlassian.jira.ofbiz.LoggingSQLInterceptor] 0ms "SELECT ID, ENTITY_NAME, ENTITY_ID, PROPERTY_KEY, propertytype FROM PUBLIC.propertyentry WHERE ENTITY_NAME='GreenHopper.properties' AND ENTITY_ID='1' AND PROPERTY_KEY='GreenHopper.Sprint.Default.customfield.id'"
      [INFO] [talledLocalContainer] 2012-12-12 11:33:46,162 http-2990-3 INFO admin 693x2069x1 1pl6k6w 0:0:0:0:0:0:0:1%0 /rest/greenhopper/1.0/xboard/plan/backlog/data.json [atlassian.jira.ofbiz.LoggingSQLInterceptor] 1ms Connection returned. borrowed : 1
      [INFO] [talledLocalContainer] 2012-12-12 11:33:46,163 http-2990-3 INFO admin 693x2069x1 1pl6k6w 0:0:0:0:0:0:0:1%0 /rest/greenhopper/1.0/xboard/plan/backlog/data.json [atlassian.jira.ofbiz.LoggingSQLInterceptor] 0ms Connection taken. borrowed : 2
      [INFO] [talledLocalContainer] 2012-12-12 11:33:46,164 http-2990-3 INFO admin 693x2069x1 1pl6k6w 0:0:0:0:0:0:0:1%0 /rest/greenhopper/1.0/xboard/plan/backlog/data.json [atlassian.jira.ofbiz.LoggingSQLInterceptor] 1ms "SELECT propertyvalue FROM PUBLIC.propertynumber WHERE ID='10629'"
      [INFO] [talledLocalContainer] 2012-12-12 11:33:46,164 http-2990-3 INFO admin 693x2069x1 1pl6k6w 0:0:0:0:0:0:0:1%0 /rest/greenhopper/1.0/xboard/plan/backlog/data.json [atlassian.jira.ofbiz.LoggingSQLInterceptor] 1ms Connection returned. borrowed : 1
      

      The total number of selects for a single request alone seems to exceed 60

              Unassigned Unassigned
              miruflin Michael Ruflin
              Votes:
              21 Vote for this issue
              Watchers:
              21 Start watching this issue

                Created:
                Updated: