Closed simeonvandersteen closed 8 years ago
This appears to be due to a mix of implicit and explicit joins in the actual query.
quilt: [Debug] spindle: SQL: SELECT "i"."id", "i"."classes", "i"."title", "i"."description", "i"."coordinates", "i"."modified", ts_rank_cd("i"."index_en_gb", "query", 32) AS "rank"
FROM
"index" "i", plainto_tsquery('judi dench') "query"
LEFT JOIN
"membership" "cm1" ON ("i"."id" = "cm1"."id" AND "cm1"."collection" = '202260585b944a8bbac21769e07792b5')
WHERE
"i"."score" <= 40 AND
"query" @@ "index_en_gb" AND
"i"."id" IN (
SELECT
"a"."about"
FROM
"about" "a"
INNER JOIN
"index_media" "im" ON ("a"."id" = "im"."id")
INNER JOIN
"media" "m" ON ("im"."media" = "m"."id")
LEFT JOIN
"membership" "cm2" ON ("im"."id" = "cm2"."id" AND "cm2"."collection" = '202260585b944a8bbac21769e07792b5')
WHERE
("cm1"."collection" IS NOT NULL OR "cm2"."collection" IS NOT NULL)
)
ORDER BY "rank" DESC, "i"."score" ASC, "modified" DESC
LIMIT 26
Logs show this: