summaryrefslogtreecommitdiff
path: root/changelogs
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2017-08-07 17:21:45 +0200
committerYorick Peterse <yorickpeterse@gmail.com>2017-08-07 17:23:05 +0200
commit3925bbdf4e6429e9909fbe3b02aebea5dd0ac868 (patch)
tree3c7af54ec1f79c67998f9828f88d48fa2264e098 /changelogs
parent81933cfdd3e23d24ae18c0d2f5452ecd9690ab63 (diff)
downloadgitlab-ce-project-url-constrainer-select.tar.gz
Don't SELECT * just to check if a project existsproject-url-constrainer-select
In ProjectUrlConstrainer we use Project.find_by_full_path to check if a project exists. This query however by default would perform a "SELECT *" when we only care about whether or not any rows would be returned. Since find_by_full_path does not return an ActiveRecord::Relation the easiest way to optimise this is to simply perform a "SELECT 1" instead.
Diffstat (limited to 'changelogs')
-rw-r--r--changelogs/unreleased/project-url-constrainer-select.yml4
1 files changed, 4 insertions, 0 deletions
diff --git a/changelogs/unreleased/project-url-constrainer-select.yml b/changelogs/unreleased/project-url-constrainer-select.yml
new file mode 100644
index 00000000000..6d4fc98cac7
--- /dev/null
+++ b/changelogs/unreleased/project-url-constrainer-select.yml
@@ -0,0 +1,4 @@
+---
+title: Don't SELECT * just to check if a project exists
+merge_request:
+author: