[MDEV-6714] mysqldump slow with tables in big databases Created: 2014-09-09 Updated: 2015-06-01 Resolved: 2015-05-30 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Affects Version/s: | 5.5.40, 10.0.14 |
| Fix Version/s: | 10.1.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Stoykov (Inactive) | Assignee: | Vicențiu Ciorbaru |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | mysqldump, verified | ||
| Description |
|
On an environment with more thatn 500000 tables, the mysqldump is slow on dumping separate tables. mysqldump uses the traditional queries like
instead of querying information_schema.tables .
takes 0.0011s, while
takes about 10 seconds. This makes the dumps unnecessary slow. mysqldump could use the information_schema here (after checking the server version), or the server could detect LIKE-Patterns that can only expand to exactly one table name (because there are no wildcards) and use a more intelligent algorithm internally, e.g. use the implementation of information_schema.tables . |
| Comments |
| Comment by Elena Stepanova [ 2015-02-22 ] |
|
Strangely, we've had an opposite report: |
| Comment by Elena Stepanova [ 2015-02-27 ] |
|
Okay, I got the point – it's not about using I_S vs SHOW TABLES, but about being able to use '=' instead of 'LIKE'. |
| Comment by Vicențiu Ciorbaru [ 2015-03-19 ] |
|
All the changes that I've done seem to be backwards compatible to MySQL 5.0 at least. I've followed as much as possible, any previous examples within mysqldump for string formatting. I hope the final patch takes care of any pitfalls. I've also checked the lower_case_table_names variable to see if it has any effect and the code seems to work with both cases. |
| Comment by Vicențiu Ciorbaru [ 2015-05-30 ] |
|
Fixed with: |