I\'m trying to create a subset of a table (as a materialized view), defined as those records which have a matching record in another materialized view.
For example,
Try this
select * from Users u where exists ( select user_id from Log_mview l where l.user_id = u.user_id ) /
If the sub-query returns a large number of rows WHERE EXISTS can be substantially faster than WHERE ... IN.
WHERE EXISTS
WHERE ... IN