<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
  <Body>
    <ReportItems>
      <Tablix Name="Tablix1">
        <TablixBody>
          <TablixColumns>
            <TablixColumn>
              <Width>2.73056in</Width>
            </TablixColumn>
            <TablixColumn>
              <Width>1.85611in</Width>
            </TablixColumn>
            <TablixColumn>
              <Width>1.79167in</Width>
            </TablixColumn>
            <TablixColumn>
              <Width>8.69167in</Width>
            </TablixColumn>
          </TablixColumns>
          <TablixRows>
            <TablixRow>
              <Height>0.47833in</Height>
              <TablixCells>
                <TablixCell>
                  <CellContents>
                    <Textbox Name="Textbox13">
                      <CanGrow>true</CanGrow>
                      <KeepTogether>true</KeepTogether>
                      <Paragraphs>
                        <Paragraph>
                          <TextRuns>
                            <TextRun>
                              <Value>="Read\Write Latency for " &amp; UCASE(First(Fields!ServerName.Value, "ServerName"))</Value>
                              <Style>
                                <FontSize>18pt</FontSize>
                                <Color>White</Color>
                              </Style>
                            </TextRun>
                          </TextRuns>
                          <Style>
                            <TextAlign>Left</TextAlign>
                          </Style>
                        </Paragraph>
                      </Paragraphs>
                      <rd:DefaultName>Textbox13</rd:DefaultName>
                      <Style>
                        <Border>
                          <Color>LightGrey</Color>
                          <Style>Solid</Style>
                        </Border>
                        <BackgroundColor>DarkBlue</BackgroundColor>
                        <VerticalAlign>Middle</VerticalAlign>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                    </Textbox>
                    <ColSpan>4</ColSpan>
                  </CellContents>
                </TablixCell>
                <TablixCell />
                <TablixCell />
                <TablixCell />
              </TablixCells>
            </TablixRow>
            <TablixRow>
              <Height>0.425in</Height>
              <TablixCells>
                <TablixCell>
                  <CellContents>
                    <Textbox Name="Textbox28">
                      <CanGrow>true</CanGrow>
                      <KeepTogether>true</KeepTogether>
                      <Paragraphs>
                        <Paragraph>
                          <TextRuns>
                            <TextRun>
                              <Value>Click Here to see the Query  </Value>
                              <ActionInfo>
                                <Actions>
                                  <Action>
                                    <Drillthrough>
                                      <ReportName>ReadWriteLatencyCode</ReportName>
                                    </Drillthrough>
                                  </Action>
                                </Actions>
                              </ActionInfo>
                              <Style>
                                <FontSize>14pt</FontSize>
                                <Color>DarkBlue</Color>
                              </Style>
                            </TextRun>
                            <TextRun>
                              <Value> | </Value>
                              <ActionInfo>
                                <Actions>
                                  <Action>
                                    <Drillthrough>
                                      <ReportName>ReadWriteLatencyCode</ReportName>
                                    </Drillthrough>
                                  </Action>
                                </Actions>
                              </ActionInfo>
                              <Style>
                                <FontSize>14pt</FontSize>
                                <Color>Gray</Color>
                              </Style>
                            </TextRun>
                            <TextRun>
                              <Value xml:space="preserve">  </Value>
                              <ActionInfo>
                                <Actions>
                                  <Action>
                                    <Drillthrough>
                                      <ReportName>ReadWriteLatencyCode</ReportName>
                                    </Drillthrough>
                                  </Action>
                                </Actions>
                              </ActionInfo>
                              <Style>
                                <FontSize>14pt</FontSize>
                                <Color>DarkBlue</Color>
                              </Style>
                            </TextRun>
                            <TextRun>
                              <Value>Go To Report Library</Value>
                              <ActionInfo>
                                <Actions>
                                  <Action>
                                    <Drillthrough>
                                      <ReportName>ReportLibrary</ReportName>
                                    </Drillthrough>
                                  </Action>
                                </Actions>
                              </ActionInfo>
                              <Style>
                                <FontSize>14pt</FontSize>
                                <Color>DarkBlue</Color>
                              </Style>
                            </TextRun>
                            <TextRun>
                              <Value xml:space="preserve">  </Value>
                              <ActionInfo>
                                <Actions>
                                  <Action>
                                    <Drillthrough>
                                      <ReportName>ReadWriteLatencyCode</ReportName>
                                    </Drillthrough>
                                  </Action>
                                </Actions>
                              </ActionInfo>
                              <Style>
                                <FontSize>14pt</FontSize>
                                <Color>DarkBlue</Color>
                              </Style>
                            </TextRun>
                            <TextRun>
                              <Value> |  </Value>
                              <ActionInfo>
                                <Actions>
                                  <Action>
                                    <Drillthrough>
                                      <ReportName>ReadWriteLatencyCode</ReportName>
                                    </Drillthrough>
                                  </Action>
                                </Actions>
                              </ActionInfo>
                              <Style>
                                <FontSize>14pt</FontSize>
                                <Color>Gray</Color>
                              </Style>
                            </TextRun>
                            <TextRun>
                              <Value xml:space="preserve"> </Value>
                              <ActionInfo>
                                <Actions>
                                  <Action>
                                    <Drillthrough>
                                      <ReportName>ReadWriteLatencyCode</ReportName>
                                    </Drillthrough>
                                  </Action>
                                </Actions>
                              </ActionInfo>
                              <Style>
                                <FontSize>14pt</FontSize>
                                <Color>DarkBlue</Color>
                              </Style>
                            </TextRun>
                            <TextRun>
                              <Value>Go To Main Report</Value>
                              <ActionInfo>
                                <Actions>
                                  <Action>
                                    <Drillthrough>
                                      <ReportName>=IIF(First(Fields!ProductMajorVersion.Value, "Version") = 10 and First(Fields!EngineEdition.Value, "ServerProperty") &lt;&gt; 5, "MainReport2008", 
IIF(First(Fields!EngineEdition.Value, "ServerProperty") = 5, Nothing, 
IIF(First(Fields!ProductMajorVersion.Value, "Version") &gt; 10 and First(Fields!EngineEdition.Value, "ServerProperty") &lt;&gt; 5, "MainReport", Nothing)))</ReportName>
                                    </Drillthrough>
                                  </Action>
                                </Actions>
                              </ActionInfo>
                              <Style>
                                <FontSize>14pt</FontSize>
                                <Color>=IIF(First(Fields!ProductMajorVersion.Value, "Version") = 10, "DarkBlue", IIF(First(Fields!EngineEdition.Value, "ServerProperty") = 5, "LightSteelBlue", "DarkBlue"))</Color>
                              </Style>
                            </TextRun>
                          </TextRuns>
                          <Style>
                            <TextAlign>Left</TextAlign>
                          </Style>
                        </Paragraph>
                      </Paragraphs>
                      <rd:DefaultName>Textbox28</rd:DefaultName>
                      <Style>
                        <Border>
                          <Color>LightGrey</Color>
                          <Style>Solid</Style>
                        </Border>
                        <BackgroundColor>LightSteelBlue</BackgroundColor>
                        <VerticalAlign>Middle</VerticalAlign>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                    </Textbox>
                    <ColSpan>4</ColSpan>
                  </CellContents>
                </TablixCell>
                <TablixCell />
                <TablixCell />
                <TablixCell />
              </TablixCells>
            </TablixRow>
            <TablixRow>
              <Height>0.31667in</Height>
              <TablixCells>
                <TablixCell>
                  <CellContents>
                    <Textbox Name="Textbox3">
                      <CanGrow>true</CanGrow>
                      <UserSort>
                        <SortExpression>=Fields!DB.Value</SortExpression>
                      </UserSort>
                      <KeepTogether>true</KeepTogether>
                      <Paragraphs>
                        <Paragraph>
                          <TextRuns>
                            <TextRun>
                              <Value>Database</Value>
                              <Style>
                                <FontSize>14pt</FontSize>
                                <Color>White</Color>
                              </Style>
                            </TextRun>
                          </TextRuns>
                          <Style />
                        </Paragraph>
                      </Paragraphs>
                      <rd:DefaultName>Textbox3</rd:DefaultName>
                      <Style>
                        <Border>
                          <Color>LightGrey</Color>
                          <Style>Solid</Style>
                        </Border>
                        <BackgroundColor>DimGray</BackgroundColor>
                        <VerticalAlign>Middle</VerticalAlign>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                    </Textbox>
                  </CellContents>
                </TablixCell>
                <TablixCell>
                  <CellContents>
                    <Textbox Name="Textbox5">
                      <CanGrow>true</CanGrow>
                      <UserSort>
                        <SortExpression>=Fields!ReadLatency.Value</SortExpression>
                      </UserSort>
                      <KeepTogether>true</KeepTogether>
                      <Paragraphs>
                        <Paragraph>
                          <TextRuns>
                            <TextRun>
                              <Value>Read Latency</Value>
                              <Style>
                                <FontSize>14pt</FontSize>
                                <Color>White</Color>
                              </Style>
                            </TextRun>
                          </TextRuns>
                          <Style />
                        </Paragraph>
                      </Paragraphs>
                      <rd:DefaultName>Textbox5</rd:DefaultName>
                      <Style>
                        <Border>
                          <Color>LightGrey</Color>
                          <Style>Solid</Style>
                        </Border>
                        <BackgroundColor>DimGray</BackgroundColor>
                        <VerticalAlign>Middle</VerticalAlign>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                    </Textbox>
                  </CellContents>
                </TablixCell>
                <TablixCell>
                  <CellContents>
                    <Textbox Name="Textbox7">
                      <CanGrow>true</CanGrow>
                      <UserSort>
                        <SortExpression>=Fields!WriteLatency.Value</SortExpression>
                      </UserSort>
                      <KeepTogether>true</KeepTogether>
                      <Paragraphs>
                        <Paragraph>
                          <TextRuns>
                            <TextRun>
                              <Value>Write Latency</Value>
                              <Style>
                                <FontSize>14pt</FontSize>
                                <Color>White</Color>
                              </Style>
                            </TextRun>
                          </TextRuns>
                          <Style />
                        </Paragraph>
                      </Paragraphs>
                      <rd:DefaultName>Textbox7</rd:DefaultName>
                      <Style>
                        <Border>
                          <Color>LightGrey</Color>
                          <Style>Solid</Style>
                        </Border>
                        <BackgroundColor>DimGray</BackgroundColor>
                        <VerticalAlign>Middle</VerticalAlign>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                    </Textbox>
                  </CellContents>
                </TablixCell>
                <TablixCell>
                  <CellContents>
                    <Textbox Name="Textbox11">
                      <CanGrow>true</CanGrow>
                      <UserSort>
                        <SortExpression>=Fields!physical_name.Value</SortExpression>
                      </UserSort>
                      <KeepTogether>true</KeepTogether>
                      <Paragraphs>
                        <Paragraph>
                          <TextRuns>
                            <TextRun>
                              <Value>Physical Name</Value>
                              <Style>
                                <FontSize>14pt</FontSize>
                                <Color>White</Color>
                              </Style>
                            </TextRun>
                          </TextRuns>
                          <Style />
                        </Paragraph>
                      </Paragraphs>
                      <rd:DefaultName>Textbox11</rd:DefaultName>
                      <Style>
                        <Border>
                          <Color>LightGrey</Color>
                          <Style>Solid</Style>
                        </Border>
                        <BackgroundColor>DimGray</BackgroundColor>
                        <VerticalAlign>Middle</VerticalAlign>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                    </Textbox>
                  </CellContents>
                </TablixCell>
              </TablixCells>
            </TablixRow>
            <TablixRow>
              <Height>0.30833in</Height>
              <TablixCells>
                <TablixCell>
                  <CellContents>
                    <Textbox Name="DB">
                      <CanGrow>true</CanGrow>
                      <KeepTogether>true</KeepTogether>
                      <Paragraphs>
                        <Paragraph>
                          <TextRuns>
                            <TextRun>
                              <Value>=Fields!DB.Value</Value>
                              <Style>
                                <FontSize>14pt</FontSize>
                              </Style>
                            </TextRun>
                          </TextRuns>
                          <Style />
                        </Paragraph>
                      </Paragraphs>
                      <rd:DefaultName>DB</rd:DefaultName>
                      <Style>
                        <Border>
                          <Color>LightGrey</Color>
                          <Style>Solid</Style>
                        </Border>
                        <BackgroundColor>=IIF(ROWNUMBER(NOTHING) MOD 2, "LIGHTBLUE", "SILVER")</BackgroundColor>
                        <VerticalAlign>Middle</VerticalAlign>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                    </Textbox>
                  </CellContents>
                </TablixCell>
                <TablixCell>
                  <CellContents>
                    <Textbox Name="ReadLatency">
                      <CanGrow>true</CanGrow>
                      <KeepTogether>true</KeepTogether>
                      <Paragraphs>
                        <Paragraph>
                          <TextRuns>
                            <TextRun>
                              <Value>=Fields!ReadLatency.Value</Value>
                              <Style>
                                <FontSize>14pt</FontSize>
                                <Color>=IIF(Fields!ReadLatency.Value &gt; 300, "White", IIF(Fields!ReadLatency.Value &lt; 100,"Black", "Black"))</Color>
                              </Style>
                            </TextRun>
                          </TextRuns>
                          <Style />
                        </Paragraph>
                      </Paragraphs>
                      <rd:DefaultName>ReadLatency</rd:DefaultName>
                      <Style>
                        <Border>
                          <Color>LightGrey</Color>
                          <Style>Solid</Style>
                        </Border>
                        <BackgroundColor>=IIF(Fields!ReadLatency.Value &gt; 300, "Red", IIF(Fields!ReadLatency.Value &lt; 100,IIF(ROWNUMBER(NOTHING) MOD 2, "LIGHTBLUE", "SILVER"), "Yellow"))</BackgroundColor>
                        <VerticalAlign>Middle</VerticalAlign>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                    </Textbox>
                  </CellContents>
                </TablixCell>
                <TablixCell>
                  <CellContents>
                    <Textbox Name="WriteLatency">
                      <CanGrow>true</CanGrow>
                      <KeepTogether>true</KeepTogether>
                      <Paragraphs>
                        <Paragraph>
                          <TextRuns>
                            <TextRun>
                              <Value>=Fields!WriteLatency.Value</Value>
                              <Style>
                                <FontSize>14pt</FontSize>
                                <Color>=IIF(Fields!WriteLatency.Value &gt; 300, "White", IIF(Fields!WriteLatency.Value &lt; 100,"Black", "Black"))</Color>
                              </Style>
                            </TextRun>
                          </TextRuns>
                          <Style />
                        </Paragraph>
                      </Paragraphs>
                      <rd:DefaultName>WriteLatency</rd:DefaultName>
                      <Style>
                        <Border>
                          <Color>LightGrey</Color>
                          <Style>Solid</Style>
                        </Border>
                        <BackgroundColor>=IIF(Fields!WriteLatency.Value &gt; 300, "Red", IIF(Fields!WriteLatency.Value &lt; 100,IIF(ROWNUMBER(NOTHING) MOD 2, "LIGHTBLUE", "SILVER"), "Yellow"))</BackgroundColor>
                        <VerticalAlign>Middle</VerticalAlign>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                    </Textbox>
                  </CellContents>
                </TablixCell>
                <TablixCell>
                  <CellContents>
                    <Textbox Name="physical_name">
                      <CanGrow>true</CanGrow>
                      <KeepTogether>true</KeepTogether>
                      <Paragraphs>
                        <Paragraph>
                          <TextRuns>
                            <TextRun>
                              <Value>=Fields!physical_name.Value</Value>
                              <Style>
                                <FontSize>14pt</FontSize>
                              </Style>
                            </TextRun>
                          </TextRuns>
                          <Style />
                        </Paragraph>
                      </Paragraphs>
                      <rd:DefaultName>physical_name</rd:DefaultName>
                      <Style>
                        <Border>
                          <Color>LightGrey</Color>
                          <Style>Solid</Style>
                        </Border>
                        <BackgroundColor>=IIF(ROWNUMBER(NOTHING) MOD 2, "LIGHTBLUE", "SILVER")</BackgroundColor>
                        <VerticalAlign>Middle</VerticalAlign>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                    </Textbox>
                  </CellContents>
                </TablixCell>
              </TablixCells>
            </TablixRow>
            <TablixRow>
              <Height>0.36667in</Height>
              <TablixCells>
                <TablixCell>
                  <CellContents>
                    <Textbox Name="Textbox18">
                      <CanGrow>true</CanGrow>
                      <KeepTogether>true</KeepTogether>
                      <Paragraphs>
                        <Paragraph>
                          <TextRuns>
                            <TextRun>
                              <Value>Source Code From: --From:  https://sqlperformance.com/2013/10/t-sql-queries/io-latency</Value>
                              <Style>
                                <FontSize>14pt</FontSize>
                                <Color>DarkBlue</Color>
                              </Style>
                            </TextRun>
                          </TextRuns>
                          <Style>
                            <TextAlign>Left</TextAlign>
                          </Style>
                        </Paragraph>
                      </Paragraphs>
                      <rd:DefaultName>Textbox18</rd:DefaultName>
                      <Style>
                        <Border>
                          <Color>LightGrey</Color>
                          <Style>Solid</Style>
                        </Border>
                        <BackgroundColor>LightSteelBlue</BackgroundColor>
                        <VerticalAlign>Middle</VerticalAlign>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                    </Textbox>
                    <ColSpan>4</ColSpan>
                  </CellContents>
                </TablixCell>
                <TablixCell />
                <TablixCell />
                <TablixCell />
              </TablixCells>
            </TablixRow>
            <TablixRow>
              <Height>0.35833in</Height>
              <TablixCells>
                <TablixCell>
                  <CellContents>
                    <Textbox Name="Textbox23">
                      <CanGrow>true</CanGrow>
                      <KeepTogether>true</KeepTogether>
                      <Paragraphs>
                        <Paragraph>
                          <TextRuns>
                            <TextRun>
                              <Value>="End Of Report                  Completed By: " &amp; UCASE(User!UserID) &amp; " on " &amp; Globals!ExecutionTime</Value>
                              <Style>
                                <FontSize>14pt</FontSize>
                                <Color>White</Color>
                              </Style>
                            </TextRun>
                          </TextRuns>
                          <Style>
                            <TextAlign>Left</TextAlign>
                          </Style>
                        </Paragraph>
                      </Paragraphs>
                      <rd:DefaultName>Textbox23</rd:DefaultName>
                      <Style>
                        <Border>
                          <Color>LightGrey</Color>
                          <Style>Solid</Style>
                        </Border>
                        <BackgroundColor>DarkBlue</BackgroundColor>
                        <VerticalAlign>Middle</VerticalAlign>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                    </Textbox>
                    <ColSpan>4</ColSpan>
                  </CellContents>
                </TablixCell>
                <TablixCell />
                <TablixCell />
                <TablixCell />
              </TablixCells>
            </TablixRow>
          </TablixRows>
        </TablixBody>
        <TablixColumnHierarchy>
          <TablixMembers>
            <TablixMember />
            <TablixMember />
            <TablixMember />
            <TablixMember />
          </TablixMembers>
        </TablixColumnHierarchy>
        <TablixRowHierarchy>
          <TablixMembers>
            <TablixMember>
              <KeepWithGroup>After</KeepWithGroup>
            </TablixMember>
            <TablixMember>
              <KeepWithGroup>After</KeepWithGroup>
            </TablixMember>
            <TablixMember>
              <KeepWithGroup>After</KeepWithGroup>
            </TablixMember>
            <TablixMember>
              <Group Name="Details" />
            </TablixMember>
            <TablixMember>
              <KeepWithGroup>Before</KeepWithGroup>
            </TablixMember>
            <TablixMember>
              <KeepWithGroup>Before</KeepWithGroup>
            </TablixMember>
          </TablixMembers>
        </TablixRowHierarchy>
        <DataSetName>ReadWrite</DataSetName>
        <Height>2.25333in</Height>
        <Width>15.07001in</Width>
        <Style>
          <Border>
            <Style>None</Style>
          </Border>
        </Style>
      </Tablix>
    </ReportItems>
    <Height>2.375in</Height>
    <Style />
  </Body>
  <Width>15.18333in</Width>
  <Page>
    <PageHeight>96in</PageHeight>
    <LeftMargin>1in</LeftMargin>
    <RightMargin>1in</RightMargin>
    <TopMargin>1in</TopMargin>
    <BottomMargin>1in</BottomMargin>
    <Style />
  </Page>
  <AutoRefresh>0</AutoRefresh>
  <DataSources>
    <DataSource Name="Local">
      <ConnectionProperties>
        <DataProvider>SQL</DataProvider>
        <ConnectString>Data Source=LocalHost;Initial Catalog=master</ConnectString>
        <IntegratedSecurity>true</IntegratedSecurity>
      </ConnectionProperties>
      <rd:SecurityType>Integrated</rd:SecurityType>
      <rd:DataSourceID>2e6efd0b-4cbf-4706-8288-53480c57671f</rd:DataSourceID>
    </DataSource>
  </DataSources>
  <DataSets>
    <DataSet Name="ReadWrite">
      <Query>
        <DataSourceName>Local</DataSourceName>
        <CommandText>--From:  https://sqlperformance.com/2013/10/t-sql-queries/io-latency

SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED


SELECT 
    --virtual file latency
	--@CaptureID,
	CASE 
		WHEN [num_of_reads] = 0 
			THEN 0 
		ELSE ([io_stall_read_ms]/[num_of_reads]) 
	END [ReadLatency],
	CASE 
		WHEN [io_stall_write_ms] = 0 
			THEN 0 
		ELSE ([io_stall_write_ms]/[num_of_writes]) 
	END [WriteLatency],
	CASE 
		WHEN ([num_of_reads] = 0 AND [num_of_writes] = 0)
             THEN 0 
		ELSE ([io_stall]/([num_of_reads] + [num_of_writes])) 
	END [Latency],
	--avg bytes per IOP
	CASE 
		WHEN [num_of_reads] = 0 
			THEN 0 
		ELSE ([num_of_bytes_read]/[num_of_reads]) 
	END [AvgBPerRead],
	CASE 
		WHEN [io_stall_write_ms] = 0 
			THEN 0 
		ELSE ([num_of_bytes_written]/[num_of_writes]) 
	END [AvgBPerWrite],
	CASE 
		WHEN ([num_of_reads] = 0 AND [num_of_writes] = 0)
			THEN 0 
		ELSE (([num_of_bytes_read] + [num_of_bytes_written])/([num_of_reads] + [num_of_writes])) 
	END [AvgBPerTransfer],
	LEFT([mf].[physical_name],2) [Drive],
	DB_NAME([vfs].[database_id]) [DB],
	[vfs].[database_id],
	[vfs].[file_id],
	[vfs].[sample_ms],
	[vfs].[num_of_reads],
	[vfs].[num_of_bytes_read],
	[vfs].[io_stall_read_ms],
	[vfs].[num_of_writes],
	[vfs].[num_of_bytes_written],
	[vfs].[io_stall_write_ms],
	[vfs].[io_stall],
	[vfs].[size_on_disk_bytes]/1024/1024. [size_on_disk_MB],
	[vfs].[file_handle],
	[mf].[physical_name]
FROM [sys].[dm_io_virtual_file_stats](NULL,NULL) AS vfs
JOIN [sys].[master_files] [mf] 
    ON [vfs].[database_id] = [mf].[database_id] 
    AND [vfs].[file_id] = [mf].[file_id]
ORDER BY [Latency] DESC;</CommandText>
      </Query>
      <Fields>
        <Field Name="ReadLatency">
          <DataField>ReadLatency</DataField>
          <rd:TypeName>System.Int64</rd:TypeName>
        </Field>
        <Field Name="WriteLatency">
          <DataField>WriteLatency</DataField>
          <rd:TypeName>System.Int64</rd:TypeName>
        </Field>
        <Field Name="Latency">
          <DataField>Latency</DataField>
          <rd:TypeName>System.Int64</rd:TypeName>
        </Field>
        <Field Name="AvgBPerRead">
          <DataField>AvgBPerRead</DataField>
          <rd:TypeName>System.Int64</rd:TypeName>
        </Field>
        <Field Name="AvgBPerWrite">
          <DataField>AvgBPerWrite</DataField>
          <rd:TypeName>System.Int64</rd:TypeName>
        </Field>
        <Field Name="AvgBPerTransfer">
          <DataField>AvgBPerTransfer</DataField>
          <rd:TypeName>System.Int64</rd:TypeName>
        </Field>
        <Field Name="Drive">
          <DataField>Drive</DataField>
          <rd:TypeName>System.String</rd:TypeName>
        </Field>
        <Field Name="DB">
          <DataField>DB</DataField>
          <rd:TypeName>System.String</rd:TypeName>
        </Field>
        <Field Name="database_id">
          <DataField>database_id</DataField>
          <rd:TypeName>System.Int16</rd:TypeName>
        </Field>
        <Field Name="file_id">
          <DataField>file_id</DataField>
          <rd:TypeName>System.Int16</rd:TypeName>
        </Field>
        <Field Name="sample_ms">
          <DataField>sample_ms</DataField>
          <rd:TypeName>System.Int64</rd:TypeName>
        </Field>
        <Field Name="num_of_reads">
          <DataField>num_of_reads</DataField>
          <rd:TypeName>System.Int64</rd:TypeName>
        </Field>
        <Field Name="num_of_bytes_read">
          <DataField>num_of_bytes_read</DataField>
          <rd:TypeName>System.Int64</rd:TypeName>
        </Field>
        <Field Name="io_stall_read_ms">
          <DataField>io_stall_read_ms</DataField>
          <rd:TypeName>System.Int64</rd:TypeName>
        </Field>
        <Field Name="num_of_writes">
          <DataField>num_of_writes</DataField>
          <rd:TypeName>System.Int64</rd:TypeName>
        </Field>
        <Field Name="num_of_bytes_written">
          <DataField>num_of_bytes_written</DataField>
          <rd:TypeName>System.Int64</rd:TypeName>
        </Field>
        <Field Name="io_stall_write_ms">
          <DataField>io_stall_write_ms</DataField>
          <rd:TypeName>System.Int64</rd:TypeName>
        </Field>
        <Field Name="io_stall">
          <DataField>io_stall</DataField>
          <rd:TypeName>System.Int64</rd:TypeName>
        </Field>
        <Field Name="size_on_disk_MB">
          <DataField>size_on_disk_MB</DataField>
          <rd:TypeName>System.Decimal</rd:TypeName>
        </Field>
        <Field Name="file_handle">
          <DataField>file_handle</DataField>
          <rd:TypeName>System.Byte[]</rd:TypeName>
        </Field>
        <Field Name="physical_name">
          <DataField>physical_name</DataField>
          <rd:TypeName>System.String</rd:TypeName>
        </Field>
      </Fields>
    </DataSet>
    <DataSet Name="ServerName">
      <Query>
        <DataSourceName>Local</DataSourceName>
        <CommandText>Select @@servername AS 'ServerName'</CommandText>
      </Query>
      <Fields>
        <Field Name="ServerName">
          <DataField>ServerName</DataField>
          <rd:TypeName>System.String</rd:TypeName>
        </Field>
      </Fields>
    </DataSet>
    <DataSet Name="Version">
      <Query>
        <DataSourceName>Local</DataSourceName>
        <CommandText>SELECT  SERVERPROPERTY('ProductMajorversion') AS 'ProductMajorVersion'</CommandText>
      </Query>
      <Fields>
        <Field Name="ProductMajorVersion">
          <DataField>ProductMajorVersion</DataField>
          <rd:TypeName>System.Object</rd:TypeName>
        </Field>
      </Fields>
    </DataSet>
    <DataSet Name="ServerProperty">
      <Query>
        <DataSourceName>Local</DataSourceName>
        <CommandText>SELECT ServerProperty('EngineEdition') AS 'EngineEdition'</CommandText>
      </Query>
      <Fields>
        <Field Name="EngineEdition">
          <DataField>EngineEdition</DataField>
          <rd:TypeName>System.Object</rd:TypeName>
        </Field>
      </Fields>
    </DataSet>
  </DataSets>
  <rd:ReportUnitType>Inch</rd:ReportUnitType>
  <rd:ReportID>69524464-6acd-4faa-9d53-d16492558d3f</rd:ReportID>
</Report>