Bug #82348 Importing a tablespace does not update statistics
Submitted: 26 Jul 2016 16:18 Modified: 27 Jul 2016 4:14
Reporter: Davi Arnaut (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.7 OS:Any
Assigned to: CPU Architecture:Any
Tags: Contribution, IMPORT TABLESPACE, innodb_stats_persistent

[26 Jul 2016 16:18] Davi Arnaut
Description:
Index statistics are not being updated for freshly imported tables when persistent statistics is turned off.

This means that queries on such tables might perform rather poorly.

How to repeat:
Set innodb_stats_persistent to OFF and import a tablespace. Check cardinality after import.
[26 Jul 2016 16:19] Davi Arnaut
Update statistics when importing a tablespace regardless of whether persistent stats is enabled

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: Import-tablespace-update-statistics.patch (application/octet-stream, text), 4.46 KiB.

[27 Jul 2016 4:14] Umesh Shastry
Hello Davi,

Thank you for the report and contribution.

Thanks,
Umesh