summaryrefslogtreecommitdiff
path: root/GITLAB_PAGES_VERSION
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2017-10-27 14:20:55 +0100
committerSean McGivern <sean@gitlab.com>2017-10-27 14:20:55 +0100
commitba9b4c4de86aa816e5ddc7a9cde9193c43835223 (patch)
tree07523b0355844413bce1c480cd4f1a3b7291c2a8 /GITLAB_PAGES_VERSION
parente9d352612371424592376b81d0a6c5ca234b9fb5 (diff)
downloadgitlab-ce-ba9b4c4de86aa816e5ddc7a9cde9193c43835223.tar.gz
For MRs with many thousands of commits, `SELECT DISTINCT(sha)` will be very slow. What we can't do to fix this: 1. Add an index. Postgres won't use it for DISTINCT without a lot of ceremony. 2. Do the `uniq` in Ruby. That can still be very slow with hundreds of thousands of commits. 3. Use a subquery. We haven't removed the `st_commits` column yet, but we will soon. Until 3 is available to us, we can just do 2, but also add a limit clause. There is no ordering, so this may return different results, but our goal with these MRs is just to get them to load, so it's not a huge deal.
Diffstat (limited to 'GITLAB_PAGES_VERSION')
0 files changed, 0 insertions, 0 deletions