Commit c188d837 authored by Elger Jonker's avatar Elger Jonker

Attempt to fix DoesNotExist causing speed improvement for...

Attempt to fix DoesNotExist causing speed improvement for rate_organizations_on_moment, sentry 794892913


Former-commit-id: e39a2ecb
parent d1645378
......@@ -1248,12 +1248,9 @@ def get_latest_urlratings_fast(urls: List[Url], when):
if not urls:
return []
sql = '''SELECT
id,
high,
medium,
low,
calculation
# get all columns, instead of naming each of the 20 columns separately, and having the chance that you missed one
# and then django performs a separate lookup query for that value (a few times).
sql = '''SELECT *
FROM map_urlrating
INNER JOIN
(SELECT MAX(id) as id2 FROM map_urlrating or2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment