Avoid retrieving all rows from information_schema tables

We narrow the search space using a where clause in the query. It is
useful for databases where the number of tables are huge.