Invoke-SqlAssessment - IndexFragmentation rule doesn't take partitions into consideration
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start with the Invoke-SqlAssessment IndexFragmentation rule and the query it runs. Reproduce the check against the partitioned pubs database with the provided PowerShell command and configuration, then verify that results identify each partition and include the partition information in the returned message.
Written by the indexing model from the issue text.
Description
If I run the following to check my local pubs database for fragmentation (config.json lowers the threshold to 0) I get three rows per index as it is a partitioned table.
$inst = Connect-DbaInstance -SqlInstance mssql1 -SqlCredential $sqlCred
$inst.databases['pubs'] | Invoke-SqlAssessment -Check IndexFragmentation -Verbose -Configuration .\config.json
If you add sp.partition_number into the query that runs this check you'll be able to see which partitions are fragmented and then this could be appended to the message returned
This was originally posted on the SQLServerPSModule repo but suggested I post here
https://github.com/microsoft/SQLServerPSModule/issues/68
- Dominant language
- PowerShell
- Stars
- 11.2k
- Forks
- 9.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 14
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/sql-server-samples
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
microsoft/sql-server-samples#1499 ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 76/100
microsoft/sql-server-samples#1495 · 3 reactions ·
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
microsoft/sql-server-samples#1341 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 64/100
microsoft/sql-server-samples#276 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 35/100
microsoft/sql-server-samples#1497 ·
All issues in microsoft/sql-server-samples
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
use-agent-os/agent-os#3312 ·
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
HarperFast/documentation#677 ·
-
bug team:backend track:services-maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
cowprotocol/services#4950 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100