Databases Reference
In-Depth Information
FIGURE 38.13
SQL Server Profiler shows the events of your complex query.
compare this figure to Figure 38.12, you'll see that Figure 38.13 is missing the Get Data
from Aggregation event. We didn't hit an aggregation with this query.
Right in the middle of the serialize events, you see a new event: Query Dimension . To
populate the axis rows, the formula engine has to query the storage engine for members
of the Product dimension. The ObjectPath column for the Query Dimension event is
where you can see the name of the dimension being queried.
Changing the Complex Query
Now let's complicate the query some more. To tell the truth, we haven't even scratched
the surface of MDX queries. Queries such as these would appear only in the first few pages
of any respectable MDX topic. However, these queries are about right for illustrating the
inner workings of Analysis Services.
We're not going to change our query very much. We're just going to ask the server to give
us only products that were actually sold in the stores; in other words, the products that
have no NULL sales. (You can find more details about MDX queries in Chapter 11,
“Advanced MDX.”)
SELECT {[Measures].[Store Sales]} ON COLUMNS ,
NON EMPTY [Product].[Product Name].members ON ROWS
FROM Sales
Search WWH ::




Custom Search