Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polybase Stats Rebuild Fix #4

Merged
merged 2 commits into from
Oct 27, 2023
Merged

Conversation

marshallwp
Copy link
Owner

Copy of olahallengren#645 as that isn't getting merged into Ola Hallengren's version.

Per Microsoft, statistics for external tables cannot be ALTERED. If a rebuild is required, they must be dropped and re-created. As such, I've updated the code to correctly identify external tables and drop/add stats on them by default. A parameter was added that if change to anything other than REBUILD, will ignore stats maintenance work on external tables.

Added functionality to correctly update statistics on external table.  Per MS, they cannot be ALTERED.  They must be dropped and recreated.    Added variable @ExternalTables.  Default is to REBUILD external table stats.  Any additional values will be ignored.
fixes to original code to only use the current definition, rather than all columns.
@marshallwp marshallwp merged commit 11309e4 into marshallwp:master Oct 27, 2023
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