Data denormalization is broken
Liron Shapira
22821

There is a third solution to this problem that is missing from the article. Use metaprogramming in SQL to read the system catalogs and get what you need there. System catalogs or meta-tables are generally available read-only. I do this routinely in PostgreSQL but I first did it in MySQL several years ago:

http://stackoverflow.com/questions/3807950/is-it-possible-to-execute-a-query-for-each-database-in-mysql-databases-and-sum-o