Permalink
Browse files
Optimize get_total_number_of_warcs query; address #241.
- Loading branch information...
Showing
with
5 additions
and
1 deletion.
-
+5
−1
app/helpers/dashboards_helper.rb
|
@@ -75,7 +75,11 @@ def get_largest_collection_title |
|
|
|
end |
|
|
|
|
|
|
|
def get_total_number_of_warcs |
|
|
|
WasapiFile.distinct.count(:filename) |
|
|
|
total_warcs = <<-QUERY |
|
|
|
SELECT COUNT(*) FROM (SELECT DISTINCT "wasapi_files"."filename" |
|
|
|
FROM "wasapi_files") AS temp; |
|
|
|
QUERY |
|
|
|
ActiveRecord::Base.connection.execute(total_warcs).first.first.second |
|
|
|
end |
|
|
|
|
|
|
|
def get_total_number_of_collections |
|
|
0 comments on commit
5a1c4f2