在同一内部查询多次运行的情况下,有什么方法可以自定义以下 SQL 以提高性能?
DELETE FROM interactionrel
WHERE ( from_interact_id IN(SELECT interaction_id
FROM interaction
WHERE instance_pk = ?) )
OR ( to_interact_id IN(SELECT interaction_id
FROM interaction
WHERE instance_pk = ?) )