I have a website with a simple page. On click of a button we execute a MDX query which returns around 200,000 rows with 20 columns. I use following code to execute MDX query using Microsoft.AnalysisServices.AdomdClient library (version is 10.0.0.0 runtime version v2.0.50727)
var connection = new AdomdConnection(connectionString);
var command = new AdomdCommand(query, connection)
{
CommandTimeout = 900
};
connection.ShowHiddenObjects = true;
connection.Open();
var cellSet = command.ExecuteCellSet();
connection.Close();
While the query is executing the memory usgae of the app pool goes very high.
This is the initial state of the memory usage on the server :
After running the query:
I am not sure why the memory usage goes so high and stays like that. I have used profiler on my local box and everything looked ok.
What options I have to figure out what is holding on to the memory?
Is there any explicit way to clear off this memory?
Does ADOMD library always consumes this much memory? Do we have any alternate options to execute MDX queries using C#?
When the memory usgae goes this high, IIS stop processing other queries and the application hosted on same IIS server (using different app pool) also get affected and request takes longer to execute.