Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f354de33
Commit
f354de33
authored
May 03, 2018
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove order by clause to improve query performance
parent
2963bc01
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
6 deletions
+0
-6
ee/app/finders/geo/repository_verification_finder.rb
ee/app/finders/geo/repository_verification_finder.rb
+0
-6
No files found.
ee/app/finders/geo/repository_verification_finder.rb
View file @
f354de33
...
@@ -5,7 +5,6 @@ module Geo
...
@@ -5,7 +5,6 @@ module Geo
.
with_route
.
with_route
.
joins
(
:repository_state
)
.
joins
(
:repository_state
)
.
where
(
repository_outdated
.
or
(
wiki_outdated
))
.
where
(
repository_outdated
.
or
(
wiki_outdated
))
.
order
(
last_repository_updated_at_asc
)
.
limit
(
batch_size
)
.
limit
(
batch_size
)
end
end
...
@@ -14,7 +13,6 @@ module Geo
...
@@ -14,7 +13,6 @@ module Geo
.
with_route
.
with_route
.
joins
(
left_join_repository_state
)
.
joins
(
left_join_repository_state
)
.
where
(
repository_never_verified
)
.
where
(
repository_never_verified
)
.
order
(
last_repository_updated_at_asc
)
.
limit
(
batch_size
)
.
limit
(
batch_size
)
end
end
...
@@ -64,9 +62,5 @@ module Geo
...
@@ -64,9 +62,5 @@ module Geo
def
repository_never_verified
def
repository_never_verified
repository_state_table
[
:project_id
].
eq
(
nil
)
repository_state_table
[
:project_id
].
eq
(
nil
)
end
end
def
last_repository_updated_at_asc
Gitlab
::
Database
.
nulls_last_order
(
'projects.last_repository_updated_at'
,
'ASC'
)
end
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment