Created by: eseliger
I have a local batch change that includes a bit over 10000 changesets and I was always annoyed by how slow it is, so I finally took a look into the trace and found that we're still fetching all changesets in the connection, just to filter by repo permissions then. Also, I found some general DB performance things. Commit-wise review is encouraged :) Hint: Tests come at the end of the git history.
List of changes:
?
operator way faster, this got down the duration of some queries like GetChangesetsStats and GetBatchChangeDiffStat (probably also ListChangesets, CountChangesets, GetRewirerMappings and ListChangesetSyncData, as they also use this operator, but I didn't test them explicitly) for my local database with around 20000 changesets. This makes querying changesets by batch change a lot faster, namely around 100ms.