Root cause is this (sample) query:
SELECT * FROM information_schema.KEY_COLUMN_USAGE WHERE CONSTRAINT_SCHEMA='crs_test' AND TABLE_NAME='COMMODITY' AND REFERENCED_TABLE_NAME IS NOT NULL;
Returns 4 Rows and takes 13,276 Sec. On other Tables the query takes up to 30 sec.
A export of an "empty" DB with about 150 tables and all in all 15000 rows (8MB) runs nearly 1h.
We are using a MariaDB 10.1.12 instance with several databases (> 100) of the same structure.
Changing "innodb_stats_on_metadata" has no effect.
We went back to Heidi version 10.3.0.5771 - this works fine.