mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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:
parent
4ea7a7cf67
commit
451e9c4bb9
@ -113,11 +113,11 @@ module Jobs
|
|||||||
SELECT
|
SELECT
|
||||||
posts.id
|
posts.id
|
||||||
FROM posts
|
FROM posts
|
||||||
|
JOIN topics ON topics.id = posts.topic_id
|
||||||
LEFT JOIN post_search_data pd
|
LEFT JOIN post_search_data pd
|
||||||
ON pd.locale = :locale
|
ON pd.locale = :locale
|
||||||
AND pd.version = :version
|
AND pd.version = :version
|
||||||
AND pd.post_id = posts.id
|
AND pd.post_id = posts.id
|
||||||
INNER JOIN topics ON topics.id = posts.topic_id
|
|
||||||
WHERE pd.post_id IS NULL
|
WHERE pd.post_id IS NULL
|
||||||
AND posts.deleted_at IS NULL
|
AND posts.deleted_at IS NULL
|
||||||
AND topics.deleted_at IS NULL
|
AND topics.deleted_at IS NULL
|
||||||
|
Loading…
Reference in New Issue
Block a user