I have the following query
SELECT * FROM TABLA_A
WHERE
CAMPO_1 IN (
SELECT CAMPO_X FROM TABLA_B
)
OR
CAMPO_2 IN (
SELECT CAMPO_X FROM TABLA_B
)
The query works, I hope you can optimize the call of in
since they are equal. I have the doubt if there is a performance penalty, since two calls are made to the same query
Edit
Both TABLA_A
as TABLA_B
can contain duplicate records