I got this tables
seen_ids
table with ids.source_ids
null engine table where data comestarget_ids
with fresh ids that was not in seen_ids on the moment when it comes.
I need to store only ids that are not in seen_ids:
CREATE materialized view mv_fresh
TO target_ids
AS SELECT
*
FROM source_ids where id not in (select id from seen_ids)
Also Id
adds to seen_ids
, so then it comes next time it is not added to target_ids
.
This is example of what I need to do, what ways do you recommend to check on “not seen recently” ids? This example is probably bad design for large seen_ids
table and large income data.