Skip to content

Improve performance of searching for and auto completing of users

Yorick Peterse requested to merge users-autocomplete into master

This MR improves the performance of searching for users using short search terms, and cleans up some of the users auto completion code. See the individual commits for more details.

EE MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4575

Migration Output

== 20180215181245 UsersNameLowerIndex: migrating ==============================
-- execute("CREATE INDEX CONCURRENTLY index_on_users_name_lower ON users (LOWER(name))")
   -> 0.0078s
== 20180215181245 UsersNameLowerIndex: migrated (0.0079s) =====================

Database Checklist

When adding migrations:

  • Updated db/schema.rb
  • Added a down method so the migration can be reverted
  • Added the output of the migration(s) to the MR body

When adding or modifying queries to improve performance:

  • Included data that shows the performance improvement, preferably in the form of a benchmark
  • Included the output of EXPLAIN (ANALYZE, BUFFERS) of the relevant queries: see commit f01495ba

General Checklist

Edited by Yorick Peterse

Merge request reports

Loading