Querying a dimension not a cube

A small but significant bit of new functionality in AS2005, pointed out by Ohjoo Kwon on the beta newsgroup: you can now run MDX queries against dimensions as well as cubes. So, for example, you can do the following:

SELECT [MYDIMENSION].MEMBERS ON 0 FROM [$MYDIMENSION]

Why is this useful? Anyone who has written any kind of client interface for AS2K and used the ADOMD catalog object will know how slow it is, and that it’s easier to write queries instead; and similarly in Reporting Services very often you have to write queries to populate lists of valid values for parameters. The problem is that when you run a query on a cube you always have to bring back at least one measure’s worth of data, which is a bit of a waste and potentially time- and resource-consuming. Now you don’t have to bring back any measure data because you can query the dimension instead!

2 thoughts on “Querying a dimension not a cube

  1. Ability to query dimensions is not available to regular users, but only to database administrators. This is a change from current CTP, so in the next CTP you won\’t be able to use this functionality if you are regular user.

Leave a ReplyCancel reply