Skip to content

Perform "Analyze" on database after import - #7

Open
mrjertop wants to merge 1 commit into
amazeeio:mainfrom
mrjertop:analyze-db-after-import
Open

Perform "Analyze" on database after import#7
mrjertop wants to merge 1 commit into
amazeeio:mainfrom
mrjertop:analyze-db-after-import

Conversation

@mrjertop

Copy link
Copy Markdown

Runs mysqlcheck --analyze after the database import completes.

Logical imports can leave optimizer statistics missing, stale, or inaccurate, which may cause poor query plans and noticeable performance degradation after migration, particularly on larger databases or complex workloads.

This change refreshes table and index statistics immediately after import so MySQL can make better execution-plan decisions.

It also separates the import, analysis, and cleanup phases in the script output, and moves cleanup to occur after the analysis step completes.

@shreddedbacon shreddedbacon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants