In my case, I solved this problem by rewriting the request,
SELECT *
FROM contactperson
WHERE EXISTS(
SELECT *
FROM person
WHERE contactperson.personId = person.id)
at
SELECT *
FROM contactperson
WHERE personId = (
SELECT id
FROM person
WHERE contactperson.personId = person.id)
It returns the same result and is more easily rewritten in relational algebra with the help of union.
Ewoud source
share