with unique_pairs as (
	select distinct a1.name as character1,
		a2.name as character2
	from achievements a1
		join achievements a2 on a1.id = a2.id
		and a1.name < a2.name
)
select up.character1,
	up.character2
from unique_pairs up
	left join cached c on (
		up.character1 = c.character1
		and up.character2 = c.character2
	)
	or (
		up.character1 = c.character2
		and up.character2 = c.character1
	)
where c.character1 is null
	and c.character2 is null
limit ?