Select rows which are not present in other table
There are basically 4 techniques for this task, all of them standard SQL. NOT EXISTS Often fastest in Postgres. SELECT ip FROM login_log l WHERE NOT EXISTS ( SELECT — SELECT list mostly irrelevant; can just be empty in Postgres FROM ip_location WHERE ip = l.ip ); Also consider: What is easier to read in … Read more