I need to get a list of all tables on a server in all databases.
I learned 2 ways to do this.
1). Execute SHOW FULL TABLES from <each database name> WHERE table_type = 'BASE TABLE';
2). Execute SELECT table_name, table_schema FROM information_schema.tables WHERE TABLE_TYPE = "BASE TABLE";
Questions:
1). Is there any other method mentioned above that might work better?
2). Is there a performance difference when executing the above two methods?
3). Which of these two methods is best done?
source share