Improve performance of searching for and auto completing of users
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
-
Changelog entry added, if necessary -
Tests added for this feature/bug - Review
-
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together
Edited by Yorick Peterse