Applications Systems

How to filter values in the Top XX Nonclustered Indexes by Fragmentation widget in AppInsight for SQL for SAM

This article describes how to filter the Top XX Nonclustered Indexes by Fragmentation widget to only display indexes over a specific size. This widget is related to AppInsight for SQL within SAM.

First published date

11/8/2018 10:12 PM

Last published date

6/29/2020 5:10 AM

Overview

This article describes how to filter the Top XX Nonclustered Indexes by Fragmentation widget  so it shows indexes over a specific size.  This widget is related to AppInsight for SQL within SAM.

Product section

Server Application Monitor

Resolution

  1. Log in to the Orion Web Console.
  2. Click My Dashboards > Applications > SAM Summary. 
  3. Navigate to the Appinsight for SQL Application Details page.
    1. Click My Dashboards > Applications > SQL Server.
    2. In the All Applications box, click an application .
    3. Click AppInsight for SQL > Default SQL instance. 
  4. Click a Database
  5. Locate the Top Indexes by Fragmentation resources.

    Before Filter
  6. Click Edit in the top corner of the resource.
  7. Enter a filter similar to the illustration below.

    This query filters the resource to only display indexes where the index size is greater than 4MB.


    After Filter


    Where did the Size string come from to create the filter since the column in the resource is Index Size? When you generate the query, you must create it based on the table columns in the database. 

    SELECT TOP 1000 * FROM [dbo].[APM_SqlBbDatabaseandex_CS_Detail]


How do I know which column to use? 

It requires a strong working knowledge of the Orion Database structure to correctly and easily manipulate the widgets to display values according to your preference. See the Orion SDK for reference. 

To learn more, see these related articles: