Select distinct ... inner join vs. select ... where id in (...)
- by Tonio
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, let's say I have a Users table with user_id and name columns, and a Log table, with entry_id, user_id, activity, and timestamp columns.
First I create a materialized view of the Log…