Sure. I have a table of items for sale with "id" as a primary key.
I'm starting a new feature where we'll track hits on said items on a weekly basis. I've added a table in the DB to do this, because I don't see a Good Way(tm) to get this functionality from our existing software.
New items could be added at any time, so I want to, every hour or so, see if any new listings have been added (which is not a problem). The SQL is designed to add any new listing ID's that are not already in the weekly_views table into the weekly_views table --- IOW, it's basically just a "diff" between the two tables, looking for ID's that have been added to one but not the other.
I'm sure that I could've figured out a PHP way to do this, but I've been attempting to stretch my SQL-fu. The subquery should work, I think, I was just curious why in the world the LOJ, which EXPLAINS just fine and fairly simply, takes so long. I suppose that 928M records "EXPLAINS" a bit ... but I apparently don't understand the LOJ, as I thought it was exclusive instead of inclusive....