-
- Downloads
Revamp finding projects by namespaces
By using a JOIN we can remove the need for using 2 separate queries to find a project by its namespace. Combined with an index (only needed for PostgreSQL) this reduces the query time from ~245 ms (~520 ms for the first call) down to roughly 10 ms (~15 ms for the first call).
Showing
- app/models/project.rb 13 additions, 7 deletionsapp/models/project.rb
- db/migrate/20151007120511_namespaces_projects_path_lower_indexes.rb 17 additions, 0 deletions.../20151007120511_namespaces_projects_path_lower_indexes.rb
- db/schema.rb 1 addition, 1 deletiondb/schema.rb
- spec/benchmarks/models/project_spec.rb 20 additions, 0 deletionsspec/benchmarks/models/project_spec.rb
- spec/models/concerns/case_sensitivity_spec.rb 8 additions, 5 deletionsspec/models/concerns/case_sensitivity_spec.rb
spec/benchmarks/models/project_spec.rb
0 → 100644
Please register or sign in to comment