After some tests, I decided to use the first code that tonkuma suggested:
Quote:
SELECT value
FROM (VALUES 338306 , 338406 , 338506) t(value)
WHERE NOT EXISTS
(SELECT *
FROM database_table dt
WHERE dt.column_name = t.value)
;
|
It seems to have the lowest cost.
Thanks to all of you.