•  
      request #33988 Loading filtered kanban can be slow
    Infos
    #33988
    Manuel Vacelet (vaceletm)
    2024-04-12 10:22
    2023-08-21 13:39
    35602
    Details
    Loading filtered kanban can be slow

    When filter involves cross references (guess) the SQL query can be very slow and takes down the whole thing (because of the number of parallel queries)

    Query that is likely to produce the error:

    SELECT id, last_changeset_id FROM (SELECT c.artifact_id AS id, c.id AS last_changeset_id  FROM tracker_artifact AS artifact
                     INNER JOIN tracker_changeset AS c ON (artifact.last_changeset_id = c.id)  INNER JOIN cross_references AS A_8859
                             ON (artifact.id = A_8859.source_id AND A_8859.source_type = 'plugin_tracker_artifact' AND A_8859.target_id = '82975'
                                 OR
                                 artifact.id = A_8859.target_id AND A_8859.target_type = 'plugin_tracker_artifact' AND A_8859.source_id = '82975'
                             )  INNER JOIN (
                    tracker_changeset_value as CV2
                    INNER JOIN (
                        SELECT distinct(field_id) FROM tracker_semantic_status WHERE tracker_id = '402'
                    ) AS SS
                        ON (CV2.field_id = SS.field_id)
                    INNER JOIN tracker_changeset_value_list AS CVL
                        ON (CV2.id = CVL.changeset_value_id)
                ) ON (CV2.changeset_id = c.id) WHERE (artifact.tracker_id = '402') AND (CVL.bindvalue_id = '15040')) AS R GROUP BY id, last_changeset_id
    
    Kanban
    14.12
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Empty
    New
    Empty
    Attachments
    Empty
    References
    Referenced by request #33988

    Follow-ups

    User avatar
    • Original Submission
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes