Skip to content

Commit d4a6f59

Browse files
authored
Merge pull request getredash#1540 from yaningzhu/faster-get-mysql-schema
[MySQL] Change: faster retrieval of schema
2 parents 054cf97 + 853e613 commit d4a6f59

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

query_runner/mysql.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,7 @@ def _get_tables(self, schema):
9393
col.table_name,
9494
col.column_name
9595
FROM `information_schema`.`columns` col
96-
INNER JOIN
97-
(SELECT table_schema,
98-
TABLE_NAME
99-
FROM information_schema.tables
100-
WHERE table_type <> 'SYSTEM VIEW' AND table_schema NOT IN ('performance_schema', 'mysql')) tables ON tables.table_schema = col.table_schema
101-
AND tables.TABLE_NAME = col.TABLE_NAME;
96+
WHERE col.table_schema NOT IN ('information_schema', 'performance_schema', 'mysql');
10297
"""
10398

10499
results, error = self.run_query(query, None)

0 commit comments

Comments
 (0)