Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Documentation/sp_BlitzIndex_Checks_by_Priority.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Before adding a new check, make sure to add a Github issue for it first, and hav

If you want to change anything about a check - the priority, finding, URL, or ID - open a Github issue first. The relevant scripts have to be updated too.

CURRENT HIGH CHECKID: 127
If you want to add a new check, start at 128.
CURRENT HIGH CHECKID: 128
If you want to add a new check, start at 129.

| Priority | FindingsGroup | Finding | URL | CheckID |
| -------- | ----------------------- | --------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ------- |
Expand Down Expand Up @@ -36,6 +36,7 @@ If you want to add a new check, start at 128.
| 100 | Indexes Worth Reviewing | Low Fill Factor on Nonclustered Index | https://www.brentozar.com/go/SelfLoathing | 40 |
| 100 | Indexes Worth Reviewing | Medium Active Heap | https://www.brentozar.com/go/SelfLoathing | 45 |
| 100 | Indexes Worth Reviewing | Small Active Heap | https://www.brentozar.com/go/SelfLoathing | 46 |
| 100 | Indexes Worth Reviewing | Heap with PAGE compression | https://vladdba.com/PageCompressedHeaps | 128 |
| 100 | Forced Serialization | Computed Column with Scalar UDF | https://www.brentozar.com/go/serialudf | 99 |
| 100 | Forced Serialization | Check Constraint with Scalar UDF | https://www.brentozar.com/go/computedscalar | 94 |
| 150 | Abnormal Design Pattern | Cascading Updates or Deletes | https://www.brentozar.com/go/AbnormalPsychology | 71 |
Expand Down
26 changes: 24 additions & 2 deletions sp_BlitzIndex.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4382,6 +4382,29 @@ BEGIN
)
OPTION ( RECOMPILE );


RAISERROR(N'check_id 128: Heaps with PAGE compression.', 0,1) WITH NOWAIT;
INSERT #BlitzIndexResults ( check_id, index_sanity_id, Priority, findings_group, finding, [database_name], URL, details, index_definition,
secret_columns, index_usage_summary, index_size_summary )
SELECT 128 AS check_id,
i.index_sanity_id,
100 AS Priority,
N'Indexes Worth Reviewing' AS findings_group,
N'Heap with PAGE compression' AS finding,
[database_name] AS [Database Name],
N'https://vladdba.com/PageCompressedHeaps' AS URL,
N'Should this table be a heap? ' + db_schema_object_indexid AS details,
i.index_definition,
'N/A' AS secret_columns,
i.index_usage_summary,
sz.index_size_summary
FROM #IndexSanity i
JOIN #IndexSanitySize sz ON i.index_sanity_id = sz.index_sanity_id
WHERE i.index_id = 0
AND (i.total_reads > 0 OR i.user_updates > 0) /*it doesn't matter that much if it's not active*/
AND sz.data_compression_desc LIKE '%PAGE%' /*using LIKE here because there are some variations for this value*/
OPTION ( RECOMPILE );

RAISERROR(N'check_id 48: Nonclustered indexes with a bad read to write ratio', 0,1) WITH NOWAIT;
INSERT #BlitzIndexResults ( check_id, index_sanity_id, Priority, findings_group, finding, [database_name], URL, details, index_definition,
secret_columns, index_usage_summary, index_size_summary )
Expand Down Expand Up @@ -4723,8 +4746,7 @@ BEGIN
FROM #ComputedColumns AS cc
WHERE cc.is_function = 1
OPTION ( RECOMPILE );




END /* IF @Mode IN (0, 4) DIAGNOSE priorities 1-100 */

Expand Down
Loading