•  
      request #12471 Add missing index on ugroup_user
    Infos
    #12471
    Marie Ange Garnier (marieange)
    2018-10-31 17:00
    2018-10-30 13:34
    12889
    Details
    Add missing index on ugroup_user

    The following query does not always use index of primary key on user_group table:

    SELECT ug.*
    FROM ugroup_user AS ug_u
           INNER JOIN user USING (user_id)
           INNER JOIN ugroup AS ug USING (ugroup_id)
           INNER JOIN groups AS g USING (group_id)
           LEFT JOIN user_group USING (group_id, user_id)
           INNER JOIN forgeconfig ON (forgeconfig.name = 'access_mode')
    WHERE ug_u.user_id = '10430' AND (
        (
            forgeconfig.value = 'restricted'
              AND
            (
                user_group.group_id IS NOT NULL
                  OR
                user.status = 'A' AND g.access IN ('public', 'unrestricted')
                  OR
                user.status = 'R' AND g.access = 'unrestricted'
                )
            )
          OR
        (
            forgeconfig.value <> 'restricted'AND
            (
                user_group.group_id IS NOT NULL OR g.access <> ('private')
                )
            )
        );

     

     

    Other
    All
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Marie Ange Garnier (marieange)
    Closed
    2018-10-31
    Attachments
    Empty
    References
    Referencing request #12471
    Referenced by request #12471

    Artifact Tracker v5

    Follow-ups

    • User avatar
      Thomas Gerbet (tgerbet)2018-10-31 17:00
      gerrit #13004 integrated in Tuleap 10.6.99.115.

      • Status changed from Under implementation to Closed
      • Connected artifacts
      • Close date set to 2018-10-31
    • 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