Comment 0 for bug 993714

Revision history for this message
astrostl (astrostl) wrote :

I have some DBs with tens of thousands of tables, perhaps 5% of which are MyISAM. When I start Mydumper, it can take 30+ minutes before it actually begins doing backups. Between the MySQL processlist and an strace, it looks like the following:

- Mydumper requests a global READ LOCK
- Once the read lock is granted, it performs a 'SHOW TABLE STATUS' on each table
- Once the TABLE STATUS loops finish, it backs up non-InnoDB tables
- Once non-InnoDB tables are backed up, it releases the READ LOCK

The thing is, with tens of thousands of tables - at least on my abused servers - it can take more than 30 minutes simply to finish the SHOW TABLE STATUS section. Is it necessary for data integrity to have a READ LOCK as Mydumper is collecting engine information? If not, I'd love to see the READ LOCK acquired afterward (status, lock, non-InnoDB, release rather than lock, status, non-InnoDB, release). If it is deemed necessary, would it perhaps be faster to query for table data a la 'select TABLE_SCHEMA, TABLE_NAME, ENGINE from information_schema.tables', if information_schema can provide everything you need?