Hi
I have two queries which are slightly different.
One of the queries takes way too much time and resources and I'm wondering if anyone could explain me why, and if possible, how to fix it.
This query is slow.
This query is fast.
I have two queries which are slightly different.
One of the queries takes way too much time and resources and I'm wondering if anyone could explain me why, and if possible, how to fix it.
This query is slow.
Code:
Unseen Movies
SELECT "General Info"."Title", "Additional Info"."Subtitles"
FROM "General Info" INNER JOIN "Additional Info" ON "General Info".id="Additional Info".id
WHERE ("General Info"."Seen" = 0)
ORDER BY "General Info"."Title";
This query is fast.
Code:
Unseen Movies With SubTitles
SELECT "General Info"."Title", "Additional Info"."Subtitles"
FROM "General Info" INNER JOIN "Additional Info" ON "General Info".id="Additional Info".id
WHERE (("Additional Info"."Subtitles" IS NOT NULL) AND ("Additional Info"."Subtitles"<>'') AND
(("General Info"."Seen" = 0)))
ORDER BY "General Info"."Title";