Is it possible? From a single process? DB is on SATA disk. I am using ubuntu 14.04. All tables have 20-60 rows and 6 columns each. I am using transactions.
The current sequence is:
Right now I am getting about 3-4 tables/second.
Conclusion: When I disabled logging my performance became similar to phpmyadmin. So, as Rick James suggested, I guess there is no way to achieve further improvements without a faster storage.
On a spinning drive, you can get about 100 operations per second. CREATE TABLE
might be slower since it involves multiple file operations in the OS. So, I would expect 1000 CREATE TABLEs
to take more than 10 seconds. That's on Ubuntu; longer on Windows.
It is usually poor schema design to make multiple tables that are identical; instead have a single table with an extra column to distinguish the subsets.
INSERTing
40K rows--
INSERTs
with autocommit=ON
-- 400 seconds.INSERTs
of 20-60 rows each, again COMMITted
after each statement -- 10 seconds.INSERT
with 40K rows (if you don't blow out some other limitation) -- possibly less than 1 second.Do not use multi-statement queries; it is a potential security problem. Anyway, it won't help much.