DEV: minor SQL formatting change

Moved join prior to left join to make query less confusing.

Has no material impact on performance.
This commit is contained in:
Sam Saffron 2020-05-12 16:08:34 +10:00
parent 4ea7a7cf67
commit 451e9c4bb9
No known key found for this signature in database
GPG Key ID: B9606168D2FFD9F5

View File

@ -113,11 +113,11 @@ module Jobs
SELECT
posts.id
FROM posts
JOIN topics ON topics.id = posts.topic_id
LEFT JOIN post_search_data pd
ON pd.locale = :locale
AND pd.version = :version
AND pd.post_id = posts.id
INNER JOIN topics ON topics.id = posts.topic_id
WHERE pd.post_id IS NULL
AND posts.deleted_at IS NULL
AND topics.deleted_at IS NULL