ŹR
Size: a a a
ŹR
ŹR
AB
M
ŹR
ŹR
LL
ŹR
M
M
ŹR
LL
M
AB
M
B
subset =
from(a in A,
where: a.id == ^100,
join: ab in "a_b",
on: ab.a_id == a.id,
select: ab.b_id
)
from(b in B,
where: b.id not in subquery(subset),
limit: 5000
)
|> Repo.all()
where: b.id not in subquery(subset) and b.id > max(subquery(subset))
B
M
AB
AB