projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4c8977
)
6074: Speed up db query by using octet_length() instead of length(). closes #6223
author
Tom Clegg <tom@curoverse.com>
Wed, 3 Jun 2015 19:39:01 +0000
(15:39 -0400)
committer
Tom Clegg <tom@curoverse.com>
Wed, 3 Jun 2015 19:39:01 +0000
(15:39 -0400)
services/api/app/controllers/application_controller.rb
patch
|
blob
|
history
diff --git
a/services/api/app/controllers/application_controller.rb
b/services/api/app/controllers/application_controller.rb
index 6810d91d4cd6c235751365b1e6d1856a5f6a19b8..e6a02b1e12c67a795cbaa877cc997d7e406f1795 100644
(file)
--- a/
services/api/app/controllers/application_controller.rb
+++ b/
services/api/app/controllers/application_controller.rb
@@
-302,7
+302,7
@@
class ApplicationController < ActionController::Base
model_class.transaction do
limit_query = @objects.
select("(%s) as read_length" %
- limit_columns.map { |s| "length(#{s})" }.join(" + "))
+ limit_columns.map { |s| "
octet_
length(#{s})" }.join(" + "))
new_limit = 0
read_total = 0
limit_query.find_each do |record|