Los planes de ejecución gráfica de SQL Server se leen de derecha a izquierda y de arriba a abajo. ¿Hay un orden significativo para la salida generada por SET STATISTICS IO ON
?
La siguiente consulta:
SET STATISTICS IO ON;
SELECT *
FROM Sales.SalesOrderHeader AS soh
JOIN Sales.SalesOrderDetail AS sod ON soh.SalesOrderID = sod.SalesOrderID
JOIN Production.Product AS p ON sod.ProductID = p.ProductID;
Genera este plan:
Y esta STATISTICS IO
salida:
Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'SalesOrderDetail'. Scan count 1, logical reads 1246, physical reads 3, read-ahead reads 1277, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'SalesOrderHeader'. Scan count 1, logical reads 689, physical reads 1, read-ahead reads 685, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'Product'. Scan count 1, logical reads 15, physical reads 1, read-ahead reads 14, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Entonces, reitero: ¿qué da? ¿Existe un orden significativo para la STATISTICS IO
salida o se utiliza algún orden arbitrario?