I'm for 2nd approach, since new tables are not added every day and usually they are added along with new units.
Also 2nd approach is 1st approach + don't use "SHOW TABLES" query at all. But if you want to check for a temporary table presence, then it will fail.
The goal of optimization was to quickly detect if module-specific database tables exists and perform associated action. However we can check for module presence directly without asking a database.