![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I've noticed an odd behavior that I first thought was a performance optimization but now appears to be a bug. To reproduce, I created a simple MDX listing of the descendants of France in the Adventure Works DW cube. select { [January 2004] } on columns, { Descendants(Geography.Geography.France) } on rows from [adventure works] Next I set an AdomdClient member variable to the first member in the first and second tuples returned. If I ask the first member (France) its ChildCount it returns 1000. If I ask the second member (Charente-Maritime) its parent's ChildCount, it properly returns 17. Both operations took 0 ticks of time. In order to get the first member to tell me the proper ChildCount, I need to use the GetChildren() function which took almost 18 million ticks to return. Here is a summary: m1 and m2 are AdomdClient.Member objects. Values were retrieved in the order displayed. m1.Caption: France m2.Caption: Charente-Maritime m2.Parent.Caption: France m1.ChildCount: 1000 took 0 ticks m2.Parent.ChildCount: 17 took 0 ticks m1.GetChildren.Count: 17 took 17831506 ticks Why does m1.ChildCount return 1000 if it apparently already knows its ChildCount is 17? |
![]() |
| Thread Tools | |
| Display Modes | |
| |