|
Ok furmangg.
Your hint was reasonable.
I am able to say something about these type of stored procedures
I searched in old web entries regarding Analysis Services 2005
COM Dlls are COM objects that act as Visual Basic functions.
I created a (by Visual Studio 10) ATL (C++) library with just one COM class ( with dual interface to be like a VB class) with a simple method "Echo",
because I want to estimate the technology cost
...
STDMETHODIMP CCalc::Echo(DOUBLE value, DOUBLE* retValue)
{
*retValue = value;
return S_OK;
}
...
I added my COM library ( named ASCOMSP ) to Assemblies section of Analysis Services ( I have a 32bit AS2008R2 version installed on my laptop - Core2Duo + 4GB RAM)
By default COM Dlls are disabled. In Analysis Services Properties it needs to turn on 'Feature\ComUdfEnabled'.
I extended the ASSP project in order to host a 'clone' method.
public static double Echo(double value)
{
return value;
}
And finally I compared the fastness of two technologies running the following queries
//MDX
with
member y as sum([Customer].[Customer Geography].MEMBERS, 1)
select Measures.y on 0
from [Adventure Works]
//COM
with
member y as sum([Customer].[Customer Geography].MEMBERS, ASCOMSP.Echo(1))
select Measures.y on 0
from [Adventure Works]
//.NET
with
member y as sum([Customer].[Customer Geography].MEMBERS, ASSP.Echo(1))
select Measures.y on 0
from [Adventure Works]
In my Adventure cube there are 19804 customers.
Durations:
MDX -> 34(ms)
COM -> 171(ms)
.NET -> 614(ms)
In another cube with a dimension with 100000 members, I obtained the following results
Durations:
MDX -> 71(ms)
COM -> 827(ms)
.NET -> 3065(ms)
The cost of marshaling is evident.
Of course in COM we haven't the richness of AdomdServer namespace.
I think that people can adopt it only for specific purpose.
For example my target was to use a stored procedure in weight expression of UPDATE CUBE statement in order to drive
the allocation on leaves, faster as possible
Maybe people can use it to create an 'ad hoc cache' of some complex calculation...
Valter Paiotti
|