•  
      request #44491 Improve XTS performances on counting
    Infos
    #44491
    Manuel Vacelet (vaceletm)
    2025-09-11 15:46
    2025-09-09 14:37
    46202
    Details
    Improve XTS performances on counting

    Current code is designed to first fetch a limited set of artifact_ids that match the query (WHERE/ORDER BY from TQL) with limit/offset and then re-run the query with a 'COUNT' to get the total size of the dataset.

    However it appears that the COUNT part (countArtifactsIdsMatchingQuery) is consuming as much time as the initial search query (searchArtifactsIdsMatchingQuery).

    Relying on LIMIT/OFFSET is meant to limit the amount of data that transit from the DB to the application code. However, here we are dealing with artifact_ids only (integer) and even a large number of them should not be less efficient that re-running the count query.

    The proposal is to replace the SQL slice and count by a PHP implementation.

    Cross tracker search
    Empty
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Manuel Vacelet (vaceletm)
    Closed
    2025-09-09
    Attachments
    Empty
    References
    Referencing request #44491

    Follow-ups