On my home machine running Ubuntu 18.04 and MySQL version 8.0.12 with better hardware, table creation, database creation and so on are very slow. On my other computer with older hardware (slower SSD), older version of MySQL (5.7) and Ubuntu 16.04 everything is much faster. I copied the config in /etc/mysql/mysql.conf.d/mysqld.cnf from the faster computer to the slow one but nothing changed. How can I trace from where is this problem coming?
CREATE TABLE blah (id BIGINT UNSIGNED NOT NULL PRIMARY KEY) ENGINE='InnoDB';
finished for roughly 0.12~0.90 seconds and from
SHOW PROFILE for query 7;
'starting', '0.000132' 'checking permissions', '0.000025' 'Opening tables', '0.000877' 'creating table', '0.092163' 'After create', '0.007109' 'query end', '0.000024' 'closing tables', '0.000007' 'freeing items', '0.000019' 'cleaning up', '0.000013'
Which is very slow compared to my work machine where the same query executes for 0.01~0.009. Any ideas on how can I see where is the problem coming from?