Showing posts with label run. Show all posts
Showing posts with label run. Show all posts

Friday, March 30, 2012

Memory Allocation for Jobs Running under SQL Agent

I use the job processing functionality to do a variety of things by running
DTS packages. One of my DTS packages has been failing as run a .NET
application to convert/modify the data extracted from an Oracle Database in a
previous step. I get an exception "There is insufficient system memory to
run this query." when the application runs under the Agent but not when I run
the same package interactively. Is there some restriction on memory use for
jobs running under the SQL Agent? If this is so is there someway to modify
it?
thanks for any assistance
Mike Mattix
CP Kelco, Inc
Okmulgee, OK
Hi
No. But how much RAM do you have and how much is allocated the SQL Server?
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Mike Mattix" <MikeMattix@.discussions.microsoft.com> wrote in message
news:20484DEE-330A-4ABB-B4D1-29C6CE1AB488@.microsoft.com...
>I use the job processing functionality to do a variety of things by running
> DTS packages. One of my DTS packages has been failing as run a .NET
> application to convert/modify the data extracted from an Oracle Database
> in a
> previous step. I get an exception "There is insufficient system memory to
> run this query." when the application runs under the Agent but not when I
> run
> the same package interactively. Is there some restriction on memory use
> for
> jobs running under the SQL Agent? If this is so is there someway to
> modify
> it?
> thanks for any assistance
> --
> Mike Mattix
> CP Kelco, Inc
> Okmulgee, OK
|||Mike,
Thanks for the reply. The server has 3GB and SQL is setup to dynamically
manage it memory. Min=0, Max=3GB, Min Query= 1GB
Mike Mattix
"Mike Epprecht (SQL MVP)" wrote:

> Hi
> No. But how much RAM do you have and how much is allocated the SQL Server?
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "Mike Mattix" <MikeMattix@.discussions.microsoft.com> wrote in message
> news:20484DEE-330A-4ABB-B4D1-29C6CE1AB488@.microsoft.com...
>
>

Memory Allocation for Jobs Running under SQL Agent

I use the job processing functionality to do a variety of things by running
DTS packages. One of my DTS packages has been failing as run a .NET
application to convert/modify the data extracted from an Oracle Database in
a
previous step. I get an exception "There is insufficient system memory to
run this query." when the application runs under the Agent but not when I ru
n
the same package interactively. Is there some restriction on memory use for
jobs running under the SQL Agent? If this is so is there someway to modify
it?
thanks for any assistance
Mike Mattix
CP Kelco, Inc
Okmulgee, OKHi
No. But how much RAM do you have and how much is allocated the SQL Server?
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Mike Mattix" <MikeMattix@.discussions.microsoft.com> wrote in message
news:20484DEE-330A-4ABB-B4D1-29C6CE1AB488@.microsoft.com...
>I use the job processing functionality to do a variety of things by running
> DTS packages. One of my DTS packages has been failing as run a .NET
> application to convert/modify the data extracted from an Oracle Database
> in a
> previous step. I get an exception "There is insufficient system memory to
> run this query." when the application runs under the Agent but not when I
> run
> the same package interactively. Is there some restriction on memory use
> for
> jobs running under the SQL Agent? If this is so is there someway to
> modify
> it?
> thanks for any assistance
> --
> Mike Mattix
> CP Kelco, Inc
> Okmulgee, OK|||Mike,
Thanks for the reply. The server has 3GB and SQL is setup to dynamically
manage it memory. Min=0, Max=3GB, Min Query= 1GB
Mike Mattix
"Mike Epprecht (SQL MVP)" wrote:

> Hi
> No. But how much RAM do you have and how much is allocated the SQL Server?
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "Mike Mattix" <MikeMattix@.discussions.microsoft.com> wrote in message
> news:20484DEE-330A-4ABB-B4D1-29C6CE1AB488@.microsoft.com...
>
>

Memory Allocation for Jobs Running under SQL Agent

I use the job processing functionality to do a variety of things by running
DTS packages. One of my DTS packages has been failing as run a .NET
application to convert/modify the data extracted from an Oracle Database in a
previous step. I get an exception "There is insufficient system memory to
run this query." when the application runs under the Agent but not when I run
the same package interactively. Is there some restriction on memory use for
jobs running under the SQL Agent? If this is so is there someway to modify
it?
thanks for any assistance
--
Mike Mattix
CP Kelco, Inc
Okmulgee, OKHi
No. But how much RAM do you have and how much is allocated the SQL Server?
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Mike Mattix" <MikeMattix@.discussions.microsoft.com> wrote in message
news:20484DEE-330A-4ABB-B4D1-29C6CE1AB488@.microsoft.com...
>I use the job processing functionality to do a variety of things by running
> DTS packages. One of my DTS packages has been failing as run a .NET
> application to convert/modify the data extracted from an Oracle Database
> in a
> previous step. I get an exception "There is insufficient system memory to
> run this query." when the application runs under the Agent but not when I
> run
> the same package interactively. Is there some restriction on memory use
> for
> jobs running under the SQL Agent? If this is so is there someway to
> modify
> it?
> thanks for any assistance
> --
> Mike Mattix
> CP Kelco, Inc
> Okmulgee, OK|||Mike,
Thanks for the reply. The server has 3GB and SQL is setup to dynamically
manage it memory. Min=0, Max=3GB, Min Query= 1GB
Mike Mattix
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> No. But how much RAM do you have and how much is allocated the SQL Server?
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "Mike Mattix" <MikeMattix@.discussions.microsoft.com> wrote in message
> news:20484DEE-330A-4ABB-B4D1-29C6CE1AB488@.microsoft.com...
> >I use the job processing functionality to do a variety of things by running
> > DTS packages. One of my DTS packages has been failing as run a .NET
> > application to convert/modify the data extracted from an Oracle Database
> > in a
> > previous step. I get an exception "There is insufficient system memory to
> > run this query." when the application runs under the Agent but not when I
> > run
> > the same package interactively. Is there some restriction on memory use
> > for
> > jobs running under the SQL Agent? If this is so is there someway to
> > modify
> > it?
> >
> > thanks for any assistance
> >
> > --
> > Mike Mattix
> > CP Kelco, Inc
> > Okmulgee, OK
>
>

Memory Again.

It's always about the memory.
I have win 2000 advance server, SQL Server 2000 EE, 4G memory, not other
application run on this server. How can I find out the exact memory usage for
the SQL server. I guess the task manager will not show the correct number, so
I used the performance monitor, but not sure which one show the right number.
Anybody can help? Thanks a lot.
Please refer to this http://support.microsoft.com/Default.aspx?id=271624
Thanks
Sunil Agarwal (MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.
"Wind" <Wind@.discussions.microsoft.com> wrote in message
news:C4D15CC5-A22E-41DC-B92C-DF070CC8CB56@.microsoft.com...
> It's always about the memory.
> I have win 2000 advance server, SQL Server 2000 EE, 4G memory, not other
> application run on this server. How can I find out the exact memory usage
> for
> the SQL server. I guess the task manager will not show the correct number,
> so
> I used the performance monitor, but not sure which one show the right
> number.
> Anybody can help? Thanks a lot.

Memory Again.

It's always about the memory.
I have win 2000 advance server, SQL Server 2000 EE, 4G memory, not other
application run on this server. How can I find out the exact memory usage for
the SQL server. I guess the task manager will not show the correct number, so
I used the performance monitor, but not sure which one show the right number.
Anybody can help? Thanks a lot.Please refer to this http://support.microsoft.com/Default.aspx?id=271624
Thanks
--
Sunil Agarwal (MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.
"Wind" <Wind@.discussions.microsoft.com> wrote in message
news:C4D15CC5-A22E-41DC-B92C-DF070CC8CB56@.microsoft.com...
> It's always about the memory.
> I have win 2000 advance server, SQL Server 2000 EE, 4G memory, not other
> application run on this server. How can I find out the exact memory usage
> for
> the SQL server. I guess the task manager will not show the correct number,
> so
> I used the performance monitor, but not sure which one show the right
> number.
> Anybody can help? Thanks a lot.

Memory Again.

It's always about the memory.
I have win 2000 advance server, SQL Server 2000 EE, 4G memory, not other
application run on this server. How can I find out the exact memory usage fo
r
the SQL server. I guess the task manager will not show the correct number, s
o
I used the performance monitor, but not sure which one show the right number
.
Anybody can help? Thanks a lot.Please refer to this http://support.microsoft.com/Default.aspx?id=271624
Thanks
--
Sunil Agarwal (MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.
"Wind" <Wind@.discussions.microsoft.com> wrote in message
news:C4D15CC5-A22E-41DC-B92C-DF070CC8CB56@.microsoft.com...
> It's always about the memory.
> I have win 2000 advance server, SQL Server 2000 EE, 4G memory, not other
> application run on this server. How can I find out the exact memory usage
> for
> the SQL server. I guess the task manager will not show the correct number,
> so
> I used the performance monitor, but not sure which one show the right
> number.
> Anybody can help? Thanks a lot.sql

Monday, March 26, 2012

Membership database installation SQL Express

I am trying to run one SQL Express database for two separate applications that will also use the Membership framework. My database is set up fine and works between both applications 100% as needed with the exception of Membership which I am fairly new to.

From my understanding given the following link

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/PAGHT000022.asp

I need to install membership on the database. So I did the following

(allow remote connections with TCIP/IP and named pipes)

Started SQL and even re-booted

Ran: aspnet_regsql.exe -E -S localhost -A m

I even tried to run it by replacing localhost with MSSQL$SQLEXPRESS

All attempts gave me an error saying it could not connect and most likely because remote connections is disabled.

I think the reason for all this is because I don't actually have the "real" IIS installed but rather I am using the instantiated version that automatically comes up when starting a ASP.NET 2.0 application.

I am assuming I need to set everything up such that I am using the real IIS rather then the default one in visual studio.

Is this correct? Or do I have something else?

Use only aspnet_regsql.exe and create membership services for your database through the wizard.

Hope that helps!

|||I am using aspnet_regsql.exe only regardless of what i do aspnet_regsql.exe says it cant connect and most likely becuase of remote connections being disabled even thought it explicitly turned remote connections on.sql

Wednesday, March 21, 2012

MeasureGroups at different granularity in the UDM

We have run into an issue with Report Builder and was wondering if anyone else has experienced this problem. We have two different measure groups. The first group is transactional at the daily grain and the other is an accounting balance table at the month grain. The measures in the second group are semi-additive. Everything against the cube is working fine. However, when a report model is generated against the cube, queries cannot be built between the semi-additive measures and the date dimension. The transactional table is fine. Has anyone else seen this behavior? I should also note that the month key is the same key as the last day in the month for business reasons. Month account balances should be converted to foreign currencies on the basis of the month end conversion rate and we are only tracking a single conversion rate table. We could always redesign this if needed.

I’m afraid that Report Builder models over a cube can only expose relationships from a measure group to a dimension that are at the key granularity. Other relationships (from the accounting balance measure group in your case) are ignored. The only alternative is to model in the cube as being at the day level (related to the last day of the month), though this would effect how it is seen through other clients.

|||

Thanks for your answer even that's not the answer I was hoping to get. I originally had the Account Balance measure group associated with the last day of the month but the query performance was very poor. By changing the association to the month level, a representative query that was running for minutes returned in less than a second. Even with a NonEmpty crossjoin of six levels, one with 130,000 members and another with 5,000 members! Gee, think AS 2005 is a bit of an improvement over AS 2000? Therefore, switching back is not an option.

Any chance this will be fixed in the future? Because I actually think the interface for Report Builder is more intuitive than ProClarity. We just haven't really found an Adhoc query tool for AS that we really like yet.

sql

Monday, March 12, 2012

MDX with parameters using OleDb?

I'm trying to run an MDX query with a parameter. It works fine with ADOMD.NET, but I can't get it to work using OleDb. (I have to use OleDb because of limitations of the calling application.) Is this possible?

The following code works:

//using Microsoft.AnalysisServices.AdomdClient;

string MDX = "with member [Measures].[Test] as Str(@.Param1) "

+ "SELECT [Measures].[Test] on 0, "

+ "[Product].[Category].[Category].Members on 1 "

+ "from [Adventure Works]";

AdomdConnection conn = new AdomdConnection("Provider=MSOLAP.3;Data Source=localhost;Initial Catalog=Adventure Works DW;Integrated Security=SSPI;Persist Security Info=false;");

conn.Open();

AdomdCommand cmd = new AdomdCommand(MDX, conn);

cmd.Parameters.Add("Param1", "abcde");

System.Data.DataSet ds = new System.Data.DataSet();

AdomdDataAdapter adp = new AdomdDataAdapter(cmd);

adp.Fill(ds);

Console.WriteLine(ds.Tables[0].Rows[0][1]);

conn.Close();

The following code fails:

//using System.Data.OleDb;

string MDX = "with member [Measures].[Test] as Str(@.Param1) "

+ "SELECT [Measures].[Test] on 0, "

+ "[Product].[Category].[Category].Members on 1 "

+ "from [Adventure Works]";

OleDbConnection conn = new OleDbConnection("Provider=MSOLAP.3;Data Source=localhost;Initial Catalog=Adventure Works DW;Integrated Security=SSPI;Persist Security Info=false;");

conn.Open();

OleDbCommand cmd = new OleDbCommand(MDX, conn);

cmd.Parameters.AddWithValue("Param1", "abcde");

System.Data.DataSet ds = new System.Data.DataSet();

OleDbDataAdapter adp = new OleDbDataAdapter(cmd);

adp.Fill(ds); //produces error: "The following system error occurred:The parameter is incorrect. . Error Code = 0x80070057, External Code = 0x00000000:."

Console.WriteLine(ds.Tables[0].Rows[0][1]);

conn.Close();

Try to add @. in front of the parameter name. It seems that ADOMD.NET and OledbClient are not constent in this regard.

cmd.Parameters.AddWithValue("@.Param1", "abcde");

|||

Irina-

I still get the same error even after adding the @. sign. If that code works for you, what version are you running on? Is this maybe an SP2 fix?

|||

Actually I'm getting the same error. Debugging OLEDB provider shows that OledbClient passes it

DBPARAMBINDINFO with NULL parameter name. So it seems like a bug in OledbClient. Currently I don't have access to OledbClient sourses. I'll try to find sorces tomorrow, but can't promise, so may be you should ask the same question on OledbClient forum.

|||

I cross-posted in the forum (I think) you were talking about:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1088407&SiteID=1&mode=1

|||

I haven't heard anything from the other forum, so I'm afraid I'm never going to get an answer on this. Irina, have you had a chance to look at the source? Or should I post this to connect.microsoft.com?

I also ran across the following Books Online page which mentions that you're required to use the ICommandWithParameters interface when doing parameterized MDX with OleDb. I'm not optimistic that will produce any different results, and I haven't really found a good code sample that shows how to implement that interface and use it.
http://msdn2.microsoft.com/en-us/library/ms145518.aspx

|||

reported to connect:

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=251601

MDX with parameters using OleDb?

I'm trying to run an MDX query with a parameter. It works fine with ADOMD.NET, but I can't get it to work using OleDb. (I have to use OleDb because of limitations of the calling application.) Is this possible?

The following code works:

//using Microsoft.AnalysisServices.AdomdClient;

string MDX = "with member [Measures].[Test] as Str(@.Param1) "

+ "SELECT [Measures].[Test] on 0, "

+ "[Product].[Category].[Category].Members on 1 "

+ "from [Adventure Works]";

AdomdConnection conn = new AdomdConnection("Provider=MSOLAP.3;Data Source=localhost;Initial Catalog=Adventure Works DW;Integrated Security=SSPI;Persist Security Info=false;");

conn.Open();

AdomdCommand cmd = new AdomdCommand(MDX, conn);

cmd.Parameters.Add("Param1", "abcde");

System.Data.DataSet ds = new System.Data.DataSet();

AdomdDataAdapter adp = new AdomdDataAdapter(cmd);

adp.Fill(ds);

Console.WriteLine(ds.Tables[0].Rows[0][1]);

conn.Close();

The following code fails:

//using System.Data.OleDb;

string MDX = "with member [Measures].[Test] as Str(@.Param1) "

+ "SELECT [Measures].[Test] on 0, "

+ "[Product].[Category].[Category].Members on 1 "

+ "from [Adventure Works]";

OleDbConnection conn = new OleDbConnection("Provider=MSOLAP.3;Data Source=localhost;Initial Catalog=Adventure Works DW;Integrated Security=SSPI;Persist Security Info=false;");

conn.Open();

OleDbCommand cmd = new OleDbCommand(MDX, conn);

cmd.Parameters.AddWithValue("Param1", "abcde");

System.Data.DataSet ds = new System.Data.DataSet();

OleDbDataAdapter adp = new OleDbDataAdapter(cmd);

adp.Fill(ds); //produces error: "The following system error occurred:The parameter is incorrect. . Error Code = 0x80070057, External Code = 0x00000000:."

Console.WriteLine(ds.Tables[0].Rows[0][1]);

conn.Close();

Try to add @. in front of the parameter name. It seems that ADOMD.NET and OledbClient are not constent in this regard.

cmd.Parameters.AddWithValue("@.Param1", "abcde");

|||

Irina-

I still get the same error even after adding the @. sign. If that code works for you, what version are you running on? Is this maybe an SP2 fix?

|||

Actually I'm getting the same error. Debugging OLEDB provider shows that OledbClient passes it

DBPARAMBINDINFO with NULL parameter name. So it seems like a bug in OledbClient. Currently I don't have access to OledbClient sourses. I'll try to find sorces tomorrow, but can't promise, so may be you should ask the same question on OledbClient forum.

|||

I cross-posted in the forum (I think) you were talking about:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1088407&SiteID=1&mode=1

|||

I haven't heard anything from the other forum, so I'm afraid I'm never going to get an answer on this. Irina, have you had a chance to look at the source? Or should I post this to connect.microsoft.com?

I also ran across the following Books Online page which mentions that you're required to use the ICommandWithParameters interface when doing parameterized MDX with OleDb. I'm not optimistic that will produce any different results, and I haven't really found a good code sample that shows how to implement that interface and use it.
http://msdn2.microsoft.com/en-us/library/ms145518.aspx

|||

reported to connect:

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=251601

Wednesday, March 7, 2012

MDX Query performance issue

I have the following query which takes more than 3 minutes to run. There are just 10,000 records in the Fact table. The largest dimension has about 2000 records in it. How can I optimize it?

SELECT NON EMPTY { [Measures].[Productivity Time in hours - Edited Docs],

[Measures].[Productivity Time in Hours - Typed Docs], [

Measures].[Productivity Time in Hours], [Measures].[Lines Per 1000],

[Measures].[Hours Saved],

[Measures].[Time Saved %],

[Measures].[Typed Lines],

[Measures].[Speech Utilization] } ON COLUMNS,

NON EMPTY {

([Dim Customer].[Customer Name].[Customer Name].ALLMEMBERS *

[Dim Customer].[Dictator Site Name].[Dictator Site Name].ALLMEMBERS *

[Dim MT].[Creator First Name].[Creator First Name].ALLMEMBERS

* [Dim Date].[The Year].[The Year].ALLMEMBERS }

WHERE ( [Dim Date].[The Year].&[2003] : [Dim Date].[The Year].&[2004],

[Dim Date].[The Month].&[January] :[Dim Date].[The Month].&[December])

The problem is with calculated measures that you use in your query. Please provide the expressions for all the calculated measures:

[Measures].[Productivity Time in hours - Edited Docs]

[Measures].[Productivity Time in Hours - Typed Docs]

[Measures].[Productivity Time in Hours], [Measures].[Lines Per 1000]

[Measures].[Hours Saved]

[Measures].[Time Saved %]

[Measures].[Typed Lines]

[Measures].[Speech Utilization]

|||

These are some of the calculations: ProductivityTime, TextLC are base measures.

CREATE MEMBER CURRENTCUBE.[MEASURES].[Productivity Time in Hours]

AS ([Doc Rev Count].[Doc Rev Count].&amp;[1],[Measures].[Productivity Time]) /3600,

FORMAT_STRING = "#",

NON_EMPTY_BEHAVIOR = { [Productivity Time] },

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Productivity Time in hours - Edited Docs]

AS ([Dim Speech].[New Speech Chargable Value].&[Edited],[Doc Rev Count].[Doc Rev Count].&[1],[Measures].[Productivity Time])/3600,

FORMAT_STRING = "#",

NON_EMPTY_BEHAVIOR = { [Productivity Time] },

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Productivity Time in Hours - Typed Docs]

AS ([Dim Speech].[New Speech Chargable Value].&[Typed],[Doc Rev Count].[Doc Rev Count].&1],[Measures].[Productivity Time])/3600,

FORMAT_STRING = "#",

NON_EMPTY_BEHAVIOR = { [Productivity Time] },

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Typed Lines]

AS ([Measures].[Text LC],[Dim Speech].[New Speech Chargable Value].&[Typed]),

FORMAT_STRING = "#,#.00",

NON_EMPTY_BEHAVIOR = { [Text LC] },

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Hours taken to type]

AS [Measures].[Text LC]/[Measures].[Typed Lines/Hr over 2 years],

FORMAT_STRING = "#,#.00",

NON_EMPTY_BEHAVIOR = { [Text LC] },

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Typed Lines/Hr over 2 years]

AS [Measures].[Typed Lines over 2 years]/[Measures].[Productivity Time in Hours over 2 years - Typed Docs],

FORMAT_STRING = "#,#.00",

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Typed Lines Over 2 years]

AS SUM(LASTPERIODS(24,[Dim Date].[Month Year]),([Doc Rev Count].[Doc Rev Count].&[1],[Dim Speech].[New Speech Chargable Value].&[Typed],[Measures].[Text LC])),

FORMAT_STRING = "#,#.00",

NON_EMPTY_BEHAVIOR = { [Text LC] },

VISIBLE = 1 ;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Productivity Time in Hours over 2 years - Typed Docs]

AS SUM(LASTPERIODS(24,[Dim Date].[Month Year]),([Dim Speech].[New Speech Chargable Value].&amp;[Typed],[Doc Rev Count].[Doc Rev Count].&amp;[1],[Measures].[Productivity Time]) /3600),

FORMAT_STRING = "#,#.00",

VISIBLE = 1 ;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Time Saved %]

AS ([Measures].[Hours Saved]/[Measures].[Hours taken to type]) * 100,

FORMAT_STRING = "Percent",

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Speech Edited for Rev 1]

AS ([Dim Speech].[New Speech Chargable Value].&[Edited],[Doc Rev Count].[Doc Rev Count].&[1],[Measures].[Text LC]),

FORMAT_STRING = "#,#.00",

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Hours Saved]

AS ([Measures].[Speech Edited for Rev 1] / [Measures].[Typed Lines/Hr over 2 years])

/ ([Measures].[Typed Lines Over 2 years] / [Measures].[Speech Edited Lines/Hr]),

FORMAT_STRING = "#,#.00",

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Lines Per 1000]

AS ([Doc Rev Count].[Doc Rev Count].&[1],[Measures].[Text LC] )/ 1000,

FORMAT_STRING = "#,#.00",

NON_EMPTY_BEHAVIOR = { [Text LC] },

VISIBLE = 1 ;

|||I am afraid I have bad news for you. There are many calculated measures above which have their NON_EMPTY_BEHAVIOR defined incorrectly (for example Productivity Time in Hours, Productivity Time in hours - Edited Docs and others), and therefore should be removed to guarantee correctness of the results. This will make performance worse.|||I had initially put the NON_EMPTY_BEHAVIOR only for those measures where [Measures].[Text LC] or [Measures]. [Productivity Time] appeared in the denominator. But still had issues with performance when the number of dimensions increased.|||Yes - what I tried to say in the previous message, that there doesn't seem to be a solution to your performance problem. NON_EMPTY_BEHAVIOR improves performance of queries similar to yours, but unfortunatelly, it cannot be applied in your case.|||

Is the cross join of too many dimensions causing the performance deterioration? Each dimension at present has about 2000 records . So 2000 * 2000 * 2000 * 2000 does come upto a huge number.

What is the general dimension size that analysis services can handle especially when cross joining multiple dimensions.

The production datawarehouse would have much more records than the current fact table and dimensions have.

Any tips on what can be done to improve performance?

|||

Is there a particular business need for selecting that large of a crossjoin of members? It would seem that even if only a small percentage of the tuples created by the crossjoin have data, that would still produce a cellset that has too much data to be useful (in a report, for example).

Given that I don't know anything about your business requirements, I can't really add much to the discussion, but in a lot of cases, when faced with a "requirement" like this, I push back on the requirement based on the usuability (or unusability) of the result, hoping to get some change to the requirement introduced that will help with the performance of the resulting query (like adding additional filters to the query to reduce the crossjoin, for example).

Dave F.

|||These reports are basically for the management of the organization I work in. They want drilldown reports with percentages and totals regarding documents transcribed for all customers, all sites, all worktypes, all transcriptionists and all doctors for a selected period. I did suggest breaking it down into more manageable chunks but the argument put forth is that analysis services is meant to handle precisely these kind of scenarios with large amounts of data.|||

What type of front-end tool are you using? If it is a pivot-table type of tool (like Excel 2007 or ProClarity), then if your users start at a high-level of detail (like the All level for each of the dimensions listed in your query), I doubt they will ever get down to the level of detail your query seems to indicate (expanding every dimension, for example). So, your performance will likely be okay.

If, however, you are using a reporting tool like Reporting Services, then I'd suggest you implement this a a series of reports to "simulate" the drilldown behavior they might be looking for. This could be done in a number of ways with linked reports, subreports, etc. Would that be possible?

Yes, Analysis Services is built to handle large data sets, aggregations, etc. But your query appears to be closer to a relational query (pulling back a large amount of very detailed data) than a dimensional query...

Dave Fackler

|||

I'm using Reporting Services.

I will give Linked reports or a subreports a try. That seems to be the only way out.

The data I want is not the details of each record in the datawarehouse but the aggregates for each customer/ site/ worktype/doctor at each level.

Does the performance of analysis services decrease when more dimensions are involved in a query?

What is the size of dimensions or a cross join between them that analysis services handles efficiently?

|||

> Does the performance of analysis services decrease when more dimensions are involved in a query?

Depends on the scenarios. In your scenario - yes performance decreases with the size of the axis growing.

|||

Dave Fackler wrote:

But your query appears to be closer to a relational query (pulling back a large amount of very detailed data) than a dimensional query...

Dave Fackler

I am in the same situation than Reena33, would you suggest me to change my MDX query for a classical SQL query?

In this case, how can I obtain calcultations like 'SUM( PERIODSTODATE([Time].[Hierarchy].[Year],... )' or 'PARALLELPERIOD(...)'?

Some of my queries need more than 5 hours to be executed...

Julien

|||

I noticed that using WHERE was slower than using SELECT FROM SELECT:

FROM ( SELECT

( {[Dim Date].[The Year].&[2003], [Dim Date].[The Year].&[2004]})

ON COLUMNS

FROM [your Cube])

[Dim Date].[The Month].&[January] :[Dim Date].[The Month].&[December]) is not necesarry because you want each month

another tip: if you are using partition you can try use Exists(), like this:

SELECT NON EMPTY { [Measures].[Productivity Time in hours - Edited Docs],

[Measures].[Productivity Time in Hours - Typed Docs], [

Measures].[Productivity Time in Hours], [Measures].[Lines Per 1000],

[Measures].[Hours Saved],

[Measures].[Time Saved %],

[Measures].[Typed Lines],

[Measures].[Speech Utilization] } ON COLUMNS,

NON EMPTY {

(

Exists([Dim Customer].[Customer Name].[Customer Name].ALLMEMBERS *

[Dim Customer].[Dictator Site Name].[Dictator Site Name].ALLMEMBERS *

[Dim MT].[Creator First Name].[Creator First Name].ALLMEMBERS, , 'Your partition')

* [Dim Date].[The Year].[The Year].ALLMEMBERS ) }

Be carefull that the results will be the same!

(I didn't include the Time Dimension in the Exists function, in my case, it's not correct, because I'm using calculated member over the time.

I hope I could help

MDX Query performance issue

I have the following query which takes more than 3 minutes to run. There are just 10,000 records in the Fact table. The largest dimension has about 2000 records in it. How can I optimize it?

SELECT NONEMPTY { [Measures].[Productivity Time in hours - Edited Docs],

[Measures].[Productivity Time in Hours - Typed Docs], [

Measures].[Productivity Time in Hours], [Measures].[Lines Per 1000],

[Measures].[Hours Saved],

[Measures].[Time Saved %],

[Measures].[Typed Lines],

[Measures].[Speech Utilization] } ONCOLUMNS,

NONEMPTY {

([Dim Customer].[Customer Name].[Customer Name].ALLMEMBERS *

[Dim Customer].[Dictator Site Name].[Dictator Site Name].ALLMEMBERS *

[Dim MT].[Creator First Name].[Creator First Name].ALLMEMBERS

* [Dim Date].[The Year].[The Year].ALLMEMBERS }

WHERE ( [Dim Date].[The Year].&[2003] : [Dim Date].[The Year].&[2004],

[Dim Date].[The Month].&[January] :[Dim Date].[The Month].&[December])

The problem is with calculated measures that you use in your query. Please provide the expressions for all the calculated measures:

[Measures].[Productivity Time in hours - Edited Docs]

[Measures].[Productivity Time in Hours - Typed Docs]

[Measures].[Productivity Time in Hours], [Measures].[Lines Per 1000]

[Measures].[Hours Saved]

[Measures].[Time Saved %]

[Measures].[Typed Lines]

[Measures].[Speech Utilization]

|||

These are some of the calculations: ProductivityTime, TextLC are base measures.

CREATE MEMBER CURRENTCUBE.[MEASURES].[Productivity Time in Hours]

AS ([Doc Rev Count].[Doc Rev Count].&amp;[1],[Measures].[Productivity Time]) /3600,

FORMAT_STRING = "#",

NON_EMPTY_BEHAVIOR = { [Productivity Time] },

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Productivity Time in hours - Edited Docs]

AS ([Dim Speech].[New Speech Chargable Value].&[Edited],[Doc Rev Count].[Doc Rev Count].&[1],[Measures].[Productivity Time])/3600,

FORMAT_STRING = "#",

NON_EMPTY_BEHAVIOR = { [Productivity Time] },

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Productivity Time in Hours - Typed Docs]

AS ([Dim Speech].[New Speech Chargable Value].&[Typed],[Doc Rev Count].[Doc Rev Count].&1],[Measures].[Productivity Time])/3600,

FORMAT_STRING = "#",

NON_EMPTY_BEHAVIOR = { [Productivity Time] },

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Typed Lines]

AS ([Measures].[Text LC],[Dim Speech].[New Speech Chargable Value].&[Typed]),

FORMAT_STRING = "#,#.00",

NON_EMPTY_BEHAVIOR = { [Text LC] },

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Hours taken to type]

AS [Measures].[Text LC]/[Measures].[Typed Lines/Hr over 2 years],

FORMAT_STRING = "#,#.00",

NON_EMPTY_BEHAVIOR = { [Text LC] },

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Typed Lines/Hr over 2 years]

AS [Measures].[Typed Lines over 2 years]/[Measures].[Productivity Time in Hours over 2 years - Typed Docs],

FORMAT_STRING = "#,#.00",

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Typed Lines Over 2 years]

AS SUM(LASTPERIODS(24,[Dim Date].[Month Year]),([Doc Rev Count].[Doc Rev Count].&[1],[Dim Speech].[New Speech Chargable Value].&[Typed],[Measures].[Text LC])),

FORMAT_STRING = "#,#.00",

NON_EMPTY_BEHAVIOR = { [Text LC] },

VISIBLE = 1 ;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Productivity Time in Hours over 2 years - Typed Docs]

AS SUM(LASTPERIODS(24,[Dim Date].[Month Year]),([Dim Speech].[New Speech Chargable Value].&amp;[Typed],[Doc Rev Count].[Doc Rev Count].&amp;[1],[Measures].[Productivity Time]) /3600),

FORMAT_STRING = "#,#.00",

VISIBLE = 1 ;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Time Saved %]

AS ([Measures].[Hours Saved]/[Measures].[Hours taken to type]) * 100,

FORMAT_STRING = "Percent",

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Speech Edited for Rev 1]

AS ([Dim Speech].[New Speech Chargable Value].&[Edited],[Doc Rev Count].[Doc Rev Count].&[1],[Measures].[Text LC]),

FORMAT_STRING = "#,#.00",

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Hours Saved]

AS ([Measures].[Speech Edited for Rev 1] / [Measures].[Typed Lines/Hr over 2 years])

/ ([Measures].[Typed Lines Over 2 years] / [Measures].[Speech Edited Lines/Hr]),

FORMAT_STRING = "#,#.00",

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Lines Per 1000]

AS ([Doc Rev Count].[Doc Rev Count].&[1],[Measures].[Text LC] )/ 1000,

FORMAT_STRING = "#,#.00",

NON_EMPTY_BEHAVIOR = { [Text LC] },

VISIBLE = 1 ;

|||I am afraid I have bad news for you. There are many calculated measures above which have their NON_EMPTY_BEHAVIOR defined incorrectly (for example Productivity Time in Hours, Productivity Time in hours - Edited Docs and others), and therefore should be removed to guarantee correctness of the results. This will make performance worse.|||I had initially put the NON_EMPTY_BEHAVIOR only for those measures where [Measures].[Text LC] or [Measures]. [Productivity Time] appeared in the denominator. But still had issues with performance when the number of dimensions increased.|||Yes - what I tried to say in the previous message, that there doesn't seem to be a solution to your performance problem. NON_EMPTY_BEHAVIOR improves performance of queries similar to yours, but unfortunatelly, it cannot be applied in your case.|||

Is the cross join of too many dimensions causing the performance deterioration? Each dimension at present has about 2000 records . So 2000 * 2000 * 2000 * 2000 does come upto a huge number.

What is the general dimension size that analysis services can handle especially when cross joining multiple dimensions.

The production datawarehouse would have much more records than the current fact table and dimensions have.

Any tips on what can be done to improve performance?

|||

Is there a particular business need for selecting that large of a crossjoin of members? It would seem that even if only a small percentage of the tuples created by the crossjoin have data, that would still produce a cellset that has too much data to be useful (in a report, for example).

Given that I don't know anything about your business requirements, I can't really add much to the discussion, but in a lot of cases, when faced with a "requirement" like this, I push back on the requirement based on the usuability (or unusability) of the result, hoping to get some change to the requirement introduced that will help with the performance of the resulting query (like adding additional filters to the query to reduce the crossjoin, for example).

Dave F.

|||These reports are basically for the management of the organization I work in. They want drilldown reports with percentages and totals regarding documents transcribed for all customers, all sites, all worktypes, all transcriptionists and all doctors for a selected period. I did suggest breaking it down into more manageable chunks but the argument put forth is that analysis services is meant to handle precisely these kind of scenarios with large amounts of data.|||

What type of front-end tool are you using? If it is a pivot-table type of tool (like Excel 2007 or ProClarity), then if your users start at a high-level of detail (like the All level for each of the dimensions listed in your query), I doubt they will ever get down to the level of detail your query seems to indicate (expanding every dimension, for example). So, your performance will likely be okay.

If, however, you are using a reporting tool like Reporting Services, then I'd suggest you implement this a a series of reports to "simulate" the drilldown behavior they might be looking for. This could be done in a number of ways with linked reports, subreports, etc. Would that be possible?

Yes, Analysis Services is built to handle large data sets, aggregations, etc. But your query appears to be closer to a relational query (pulling back a large amount of very detailed data) than a dimensional query...

Dave Fackler

|||

I'm using Reporting Services.

I will give Linked reports or a subreports a try. That seems to be the only way out.

The data I want is not the details of each record in the datawarehouse but the aggregates for each customer/ site/ worktype/doctor at each level.

Does the performance of analysis services decrease when more dimensions are involved in a query?

What is the size of dimensions or a cross join between them that analysis services handles efficiently?

|||

> Does the performance of analysis services decrease when more dimensions are involved in a query?

Depends on the scenarios. In your scenario - yes performance decreases with the size of the axis growing.

|||

Dave Fackler wrote:

But your query appears to be closer to a relational query (pulling back a large amount of very detailed data) than a dimensional query...

Dave Fackler

I am in the same situation than Reena33, would you suggest me to change my MDX query for a classical SQL query?

In this case, how can I obtain calcultations like 'SUM( PERIODSTODATE([Time].[Hierarchy].[Year],... )' or 'PARALLELPERIOD(...)'?

Some of my queries need more than 5 hours to be executed...

Julien

|||

I noticed that using WHERE was slower than using SELECT FROM SELECT:

FROM ( SELECT

( {[Dim Date].[The Year].&[2003], [Dim Date].[The Year].&[2004]})

ON COLUMNS

FROM [your Cube])

[Dim Date].[The Month].&[January] :[Dim Date].[The Month].&[December]) is not necesarry because you want each month

another tip: if you are using partition you can try use Exists(), like this:

SELECT NONEMPTY { [Measures].[Productivity Time in hours - Edited Docs],

[Measures].[Productivity Time in Hours - Typed Docs], [

Measures].[Productivity Time in Hours], [Measures].[Lines Per 1000],

[Measures].[Hours Saved],

[Measures].[Time Saved %],

[Measures].[Typed Lines],

[Measures].[Speech Utilization] } ONCOLUMNS,

NONEMPTY {

(

Exists([Dim Customer].[Customer Name].[Customer Name].ALLMEMBERS *

[Dim Customer].[Dictator Site Name].[Dictator Site Name].ALLMEMBERS *

[Dim MT].[Creator First Name].[Creator First Name].ALLMEMBERS, , 'Your partition')

* [Dim Date].[The Year].[The Year].ALLMEMBERS ) }

Be carefull that the results will be the same!

(I didn't include the Time Dimension in the Exists function, in my case, it's not correct, because I'm using calculated member over the time.

I hope I could help

MDX Query performance issue

I have the following query which takes more than 3 minutes to run. There are just 10,000 records in the Fact table. The largest dimension has about 2000 records in it. How can I optimize it?

SELECT NON EMPTY { [Measures].[Productivity Time in hours - Edited Docs],

[Measures].[Productivity Time in Hours - Typed Docs], [

Measures].[Productivity Time in Hours], [Measures].[Lines Per 1000],

[Measures].[Hours Saved],

[Measures].[Time Saved %],

[Measures].[Typed Lines],

[Measures].[Speech Utilization] } ON COLUMNS,

NON EMPTY {

([Dim Customer].[Customer Name].[Customer Name].ALLMEMBERS *

[Dim Customer].[Dictator Site Name].[Dictator Site Name].ALLMEMBERS *

[Dim MT].[Creator First Name].[Creator First Name].ALLMEMBERS

* [Dim Date].[The Year].[The Year].ALLMEMBERS }

WHERE ( [Dim Date].[The Year].&[2003] : [Dim Date].[The Year].&[2004],

[Dim Date].[The Month].&[January] :[Dim Date].[The Month].&[December])

The problem is with calculated measures that you use in your query. Please provide the expressions for all the calculated measures:

[Measures].[Productivity Time in hours - Edited Docs]

[Measures].[Productivity Time in Hours - Typed Docs]

[Measures].[Productivity Time in Hours], [Measures].[Lines Per 1000]

[Measures].[Hours Saved]

[Measures].[Time Saved %]

[Measures].[Typed Lines]

[Measures].[Speech Utilization]

|||

These are some of the calculations: ProductivityTime, TextLC are base measures.

CREATE MEMBER CURRENTCUBE.[MEASURES].[Productivity Time in Hours]

AS ([Doc Rev Count].[Doc Rev Count].&amp;[1],[Measures].[Productivity Time]) /3600,

FORMAT_STRING = "#",

NON_EMPTY_BEHAVIOR = { [Productivity Time] },

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Productivity Time in hours - Edited Docs]

AS ([Dim Speech].[New Speech Chargable Value].&[Edited],[Doc Rev Count].[Doc Rev Count].&[1],[Measures].[Productivity Time])/3600,

FORMAT_STRING = "#",

NON_EMPTY_BEHAVIOR = { [Productivity Time] },

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Productivity Time in Hours - Typed Docs]

AS ([Dim Speech].[New Speech Chargable Value].&[Typed],[Doc Rev Count].[Doc Rev Count].&1],[Measures].[Productivity Time])/3600,

FORMAT_STRING = "#",

NON_EMPTY_BEHAVIOR = { [Productivity Time] },

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Typed Lines]

AS ([Measures].[Text LC],[Dim Speech].[New Speech Chargable Value].&[Typed]),

FORMAT_STRING = "#,#.00",

NON_EMPTY_BEHAVIOR = { [Text LC] },

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Hours taken to type]

AS [Measures].[Text LC]/[Measures].[Typed Lines/Hr over 2 years],

FORMAT_STRING = "#,#.00",

NON_EMPTY_BEHAVIOR = { [Text LC] },

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Typed Lines/Hr over 2 years]

AS [Measures].[Typed Lines over 2 years]/[Measures].[Productivity Time in Hours over 2 years - Typed Docs],

FORMAT_STRING = "#,#.00",

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Typed Lines Over 2 years]

AS SUM(LASTPERIODS(24,[Dim Date].[Month Year]),([Doc Rev Count].[Doc Rev Count].&[1],[Dim Speech].[New Speech Chargable Value].&[Typed],[Measures].[Text LC])),

FORMAT_STRING = "#,#.00",

NON_EMPTY_BEHAVIOR = { [Text LC] },

VISIBLE = 1 ;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Productivity Time in Hours over 2 years - Typed Docs]

AS SUM(LASTPERIODS(24,[Dim Date].[Month Year]),([Dim Speech].[New Speech Chargable Value].&amp;[Typed],[Doc Rev Count].[Doc Rev Count].&amp;[1],[Measures].[Productivity Time]) /3600),

FORMAT_STRING = "#,#.00",

VISIBLE = 1 ;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Time Saved %]

AS ([Measures].[Hours Saved]/[Measures].[Hours taken to type]) * 100,

FORMAT_STRING = "Percent",

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Speech Edited for Rev 1]

AS ([Dim Speech].[New Speech Chargable Value].&[Edited],[Doc Rev Count].[Doc Rev Count].&[1],[Measures].[Text LC]),

FORMAT_STRING = "#,#.00",

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Hours Saved]

AS ([Measures].[Speech Edited for Rev 1] / [Measures].[Typed Lines/Hr over 2 years])

/ ([Measures].[Typed Lines Over 2 years] / [Measures].[Speech Edited Lines/Hr]),

FORMAT_STRING = "#,#.00",

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Lines Per 1000]

AS ([Doc Rev Count].[Doc Rev Count].&[1],[Measures].[Text LC] )/ 1000,

FORMAT_STRING = "#,#.00",

NON_EMPTY_BEHAVIOR = { [Text LC] },

VISIBLE = 1 ;

|||I am afraid I have bad news for you. There are many calculated measures above which have their NON_EMPTY_BEHAVIOR defined incorrectly (for example Productivity Time in Hours, Productivity Time in hours - Edited Docs and others), and therefore should be removed to guarantee correctness of the results. This will make performance worse.|||I had initially put the NON_EMPTY_BEHAVIOR only for those measures where [Measures].[Text LC] or [Measures]. [Productivity Time] appeared in the denominator. But still had issues with performance when the number of dimensions increased.|||Yes - what I tried to say in the previous message, that there doesn't seem to be a solution to your performance problem. NON_EMPTY_BEHAVIOR improves performance of queries similar to yours, but unfortunatelly, it cannot be applied in your case.|||

Is the cross join of too many dimensions causing the performance deterioration? Each dimension at present has about 2000 records . So 2000 * 2000 * 2000 * 2000 does come upto a huge number.

What is the general dimension size that analysis services can handle especially when cross joining multiple dimensions.

The production datawarehouse would have much more records than the current fact table and dimensions have.

Any tips on what can be done to improve performance?

|||

Is there a particular business need for selecting that large of a crossjoin of members? It would seem that even if only a small percentage of the tuples created by the crossjoin have data, that would still produce a cellset that has too much data to be useful (in a report, for example).

Given that I don't know anything about your business requirements, I can't really add much to the discussion, but in a lot of cases, when faced with a "requirement" like this, I push back on the requirement based on the usuability (or unusability) of the result, hoping to get some change to the requirement introduced that will help with the performance of the resulting query (like adding additional filters to the query to reduce the crossjoin, for example).

Dave F.

|||These reports are basically for the management of the organization I work in. They want drilldown reports with percentages and totals regarding documents transcribed for all customers, all sites, all worktypes, all transcriptionists and all doctors for a selected period. I did suggest breaking it down into more manageable chunks but the argument put forth is that analysis services is meant to handle precisely these kind of scenarios with large amounts of data.|||

What type of front-end tool are you using? If it is a pivot-table type of tool (like Excel 2007 or ProClarity), then if your users start at a high-level of detail (like the All level for each of the dimensions listed in your query), I doubt they will ever get down to the level of detail your query seems to indicate (expanding every dimension, for example). So, your performance will likely be okay.

If, however, you are using a reporting tool like Reporting Services, then I'd suggest you implement this a a series of reports to "simulate" the drilldown behavior they might be looking for. This could be done in a number of ways with linked reports, subreports, etc. Would that be possible?

Yes, Analysis Services is built to handle large data sets, aggregations, etc. But your query appears to be closer to a relational query (pulling back a large amount of very detailed data) than a dimensional query...

Dave Fackler

|||

I'm using Reporting Services.

I will give Linked reports or a subreports a try. That seems to be the only way out.

The data I want is not the details of each record in the datawarehouse but the aggregates for each customer/ site/ worktype/doctor at each level.

Does the performance of analysis services decrease when more dimensions are involved in a query?

What is the size of dimensions or a cross join between them that analysis services handles efficiently?

|||

> Does the performance of analysis services decrease when more dimensions are involved in a query?

Depends on the scenarios. In your scenario - yes performance decreases with the size of the axis growing.

|||

Dave Fackler wrote:

But your query appears to be closer to a relational query (pulling back a large amount of very detailed data) than a dimensional query...

Dave Fackler

I am in the same situation than Reena33, would you suggest me to change my MDX query for a classical SQL query?

In this case, how can I obtain calcultations like 'SUM( PERIODSTODATE([Time].[Hierarchy].[Year],... )' or 'PARALLELPERIOD(...)'?

Some of my queries need more than 5 hours to be executed...

Julien

|||

I noticed that using WHERE was slower than using SELECT FROM SELECT:

FROM ( SELECT

( {[Dim Date].[The Year].&[2003], [Dim Date].[The Year].&[2004]})

ON COLUMNS

FROM [your Cube])

[Dim Date].[The Month].&[January] :[Dim Date].[The Month].&[December]) is not necesarry because you want each month

another tip: if you are using partition you can try use Exists(), like this:

SELECT NON EMPTY { [Measures].[Productivity Time in hours - Edited Docs],

[Measures].[Productivity Time in Hours - Typed Docs], [

Measures].[Productivity Time in Hours], [Measures].[Lines Per 1000],

[Measures].[Hours Saved],

[Measures].[Time Saved %],

[Measures].[Typed Lines],

[Measures].[Speech Utilization] } ON COLUMNS,

NON EMPTY {

(

Exists([Dim Customer].[Customer Name].[Customer Name].ALLMEMBERS *

[Dim Customer].[Dictator Site Name].[Dictator Site Name].ALLMEMBERS *

[Dim MT].[Creator First Name].[Creator First Name].ALLMEMBERS, , 'Your partition')

* [Dim Date].[The Year].[The Year].ALLMEMBERS ) }

Be carefull that the results will be the same!

(I didn't include the Time Dimension in the Exists function, in my case, it's not correct, because I'm using calculated member over the time.

I hope I could help

MDX Query performance issue

I have the following query which takes more than 3 minutes to run. There are just 10,000 records in the Fact table. The largest dimension has about 2000 records in it. How can I optimize it?

SELECT NONEMPTY { [Measures].[Productivity Time in hours - Edited Docs],

[Measures].[Productivity Time in Hours - Typed Docs], [

Measures].[Productivity Time in Hours], [Measures].[Lines Per 1000],

[Measures].[Hours Saved],

[Measures].[Time Saved %],

[Measures].[Typed Lines],

[Measures].[Speech Utilization] } ONCOLUMNS,

NONEMPTY {

([Dim Customer].[Customer Name].[Customer Name].ALLMEMBERS *

[Dim Customer].[Dictator Site Name].[Dictator Site Name].ALLMEMBERS *

[Dim MT].[Creator First Name].[Creator First Name].ALLMEMBERS

* [Dim Date].[The Year].[The Year].ALLMEMBERS }

WHERE ( [Dim Date].[The Year].&[2003] : [Dim Date].[The Year].&[2004],

[Dim Date].[The Month].&[January] :[Dim Date].[The Month].&[December])

The problem is with calculated measures that you use in your query. Please provide the expressions for all the calculated measures:

[Measures].[Productivity Time in hours - Edited Docs]

[Measures].[Productivity Time in Hours - Typed Docs]

[Measures].[Productivity Time in Hours], [Measures].[Lines Per 1000]

[Measures].[Hours Saved]

[Measures].[Time Saved %]

[Measures].[Typed Lines]

[Measures].[Speech Utilization]

|||

These are some of the calculations: ProductivityTime, TextLC are base measures.

CREATE MEMBER CURRENTCUBE.[MEASURES].[Productivity Time in Hours]

AS ([Doc Rev Count].[Doc Rev Count].&amp;[1],[Measures].[Productivity Time]) /3600,

FORMAT_STRING = "#",

NON_EMPTY_BEHAVIOR = { [Productivity Time] },

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Productivity Time in hours - Edited Docs]

AS ([Dim Speech].[New Speech Chargable Value].&[Edited],[Doc Rev Count].[Doc Rev Count].&[1],[Measures].[Productivity Time])/3600,

FORMAT_STRING = "#",

NON_EMPTY_BEHAVIOR = { [Productivity Time] },

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Productivity Time in Hours - Typed Docs]

AS ([Dim Speech].[New Speech Chargable Value].&[Typed],[Doc Rev Count].[Doc Rev Count].&1],[Measures].[Productivity Time])/3600,

FORMAT_STRING = "#",

NON_EMPTY_BEHAVIOR = { [Productivity Time] },

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Typed Lines]

AS ([Measures].[Text LC],[Dim Speech].[New Speech Chargable Value].&[Typed]),

FORMAT_STRING = "#,#.00",

NON_EMPTY_BEHAVIOR = { [Text LC] },

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Hours taken to type]

AS [Measures].[Text LC]/[Measures].[Typed Lines/Hr over 2 years],

FORMAT_STRING = "#,#.00",

NON_EMPTY_BEHAVIOR = { [Text LC] },

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Typed Lines/Hr over 2 years]

AS [Measures].[Typed Lines over 2 years]/[Measures].[Productivity Time in Hours over 2 years - Typed Docs],

FORMAT_STRING = "#,#.00",

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Typed Lines Over 2 years]

AS SUM(LASTPERIODS(24,[Dim Date].[Month Year]),([Doc Rev Count].[Doc Rev Count].&[1],[Dim Speech].[New Speech Chargable Value].&[Typed],[Measures].[Text LC])),

FORMAT_STRING = "#,#.00",

NON_EMPTY_BEHAVIOR = { [Text LC] },

VISIBLE = 1 ;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Productivity Time in Hours over 2 years - Typed Docs]

AS SUM(LASTPERIODS(24,[Dim Date].[Month Year]),([Dim Speech].[New Speech Chargable Value].&amp;[Typed],[Doc Rev Count].[Doc Rev Count].&amp;[1],[Measures].[Productivity Time]) /3600),

FORMAT_STRING = "#,#.00",

VISIBLE = 1 ;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Time Saved %]

AS ([Measures].[Hours Saved]/[Measures].[Hours taken to type]) * 100,

FORMAT_STRING = "Percent",

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Speech Edited for Rev 1]

AS ([Dim Speech].[New Speech Chargable Value].&[Edited],[Doc Rev Count].[Doc Rev Count].&[1],[Measures].[Text LC]),

FORMAT_STRING = "#,#.00",

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Hours Saved]

AS ([Measures].[Speech Edited for Rev 1] / [Measures].[Typed Lines/Hr over 2 years])

/ ([Measures].[Typed Lines Over 2 years] / [Measures].[Speech Edited Lines/Hr]),

FORMAT_STRING = "#,#.00",

VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Lines Per 1000]

AS ([Doc Rev Count].[Doc Rev Count].&[1],[Measures].[Text LC] )/ 1000,

FORMAT_STRING = "#,#.00",

NON_EMPTY_BEHAVIOR = { [Text LC] },

VISIBLE = 1 ;

|||I am afraid I have bad news for you. There are many calculated measures above which have their NON_EMPTY_BEHAVIOR defined incorrectly (for example Productivity Time in Hours, Productivity Time in hours - Edited Docs and others), and therefore should be removed to guarantee correctness of the results. This will make performance worse.|||I had initially put the NON_EMPTY_BEHAVIOR only for those measures where [Measures].[Text LC] or [Measures]. [Productivity Time] appeared in the denominator. But still had issues with performance when the number of dimensions increased.|||Yes - what I tried to say in the previous message, that there doesn't seem to be a solution to your performance problem. NON_EMPTY_BEHAVIOR improves performance of queries similar to yours, but unfortunatelly, it cannot be applied in your case.|||

Is the cross join of too many dimensions causing the performance deterioration? Each dimension at present has about 2000 records . So 2000 * 2000 * 2000 * 2000 does come upto a huge number.

What is the general dimension size that analysis services can handle especially when cross joining multiple dimensions.

The production datawarehouse would have much more records than the current fact table and dimensions have.

Any tips on what can be done to improve performance?

|||

Is there a particular business need for selecting that large of a crossjoin of members? It would seem that even if only a small percentage of the tuples created by the crossjoin have data, that would still produce a cellset that has too much data to be useful (in a report, for example).

Given that I don't know anything about your business requirements, I can't really add much to the discussion, but in a lot of cases, when faced with a "requirement" like this, I push back on the requirement based on the usuability (or unusability) of the result, hoping to get some change to the requirement introduced that will help with the performance of the resulting query (like adding additional filters to the query to reduce the crossjoin, for example).

Dave F.

|||These reports are basically for the management of the organization I work in. They want drilldown reports with percentages and totals regarding documents transcribed for all customers, all sites, all worktypes, all transcriptionists and all doctors for a selected period. I did suggest breaking it down into more manageable chunks but the argument put forth is that analysis services is meant to handle precisely these kind of scenarios with large amounts of data.|||

What type of front-end tool are you using? If it is a pivot-table type of tool (like Excel 2007 or ProClarity), then if your users start at a high-level of detail (like the All level for each of the dimensions listed in your query), I doubt they will ever get down to the level of detail your query seems to indicate (expanding every dimension, for example). So, your performance will likely be okay.

If, however, you are using a reporting tool like Reporting Services, then I'd suggest you implement this a a series of reports to "simulate" the drilldown behavior they might be looking for. This could be done in a number of ways with linked reports, subreports, etc. Would that be possible?

Yes, Analysis Services is built to handle large data sets, aggregations, etc. But your query appears to be closer to a relational query (pulling back a large amount of very detailed data) than a dimensional query...

Dave Fackler

|||

I'm using Reporting Services.

I will give Linked reports or a subreports a try. That seems to be the only way out.

The data I want is not the details of each record in the datawarehouse but the aggregates for each customer/ site/ worktype/doctor at each level.

Does the performance of analysis services decrease when more dimensions are involved in a query?

What is the size of dimensions or a cross join between them that analysis services handles efficiently?

|||

> Does the performance of analysis services decrease when more dimensions are involved in a query?

Depends on the scenarios. In your scenario - yes performance decreases with the size of the axis growing.

|||

Dave Fackler wrote:

But your query appears to be closer to a relational query (pulling back a large amount of very detailed data) than a dimensional query...

Dave Fackler

I am in the same situation than Reena33, would you suggest me to change my MDX query for a classical SQL query?

In this case, how can I obtain calcultations like 'SUM( PERIODSTODATE([Time].[Hierarchy].[Year],... )' or 'PARALLELPERIOD(...)'?

Some of my queries need more than 5 hours to be executed...

Julien

|||

I noticed that using WHERE was slower than using SELECT FROM SELECT:

FROM ( SELECT

( {[Dim Date].[The Year].&[2003], [Dim Date].[The Year].&[2004]})

ON COLUMNS

FROM [your Cube])

[Dim Date].[The Month].&[January] :[Dim Date].[The Month].&[December]) is not necesarry because you want each month

another tip: if you are using partition you can try use Exists(), like this:

SELECT NONEMPTY { [Measures].[Productivity Time in hours - Edited Docs],

[Measures].[Productivity Time in Hours - Typed Docs], [

Measures].[Productivity Time in Hours], [Measures].[Lines Per 1000],

[Measures].[Hours Saved],

[Measures].[Time Saved %],

[Measures].[Typed Lines],

[Measures].[Speech Utilization] } ONCOLUMNS,

NONEMPTY {

(

Exists([Dim Customer].[Customer Name].[Customer Name].ALLMEMBERS *

[Dim Customer].[Dictator Site Name].[Dictator Site Name].ALLMEMBERS *

[Dim MT].[Creator First Name].[Creator First Name].ALLMEMBERS, , 'Your partition')

* [Dim Date].[The Year].[The Year].ALLMEMBERS ) }

Be carefull that the results will be the same!

(I didn't include the Time Dimension in the Exists function, in my case, it's not correct, because I'm using calculated member over the time.

I hope I could help

MDX Query never finishes

I am populating flatfiles from MDX queries run i SSIS against AS databases.

I have ran in to problems with MDX queries returning large resultsets that never finishes.

The query performed is purchase calculations over different time periods for each member in the customer dimension. There are 6-8 calculated members created and the customer dimension contains about 3,5 million members.

When query is run, after 1-2 hours the server stop allocating memory and starts to get data from cache in intervals. In the end of each interval, memory is dropped. In perfmon it seems to be no activity during long periods

I have given it as long as over 3 days without any result.

Server is 8 x 64bit cpu with 16 gig memory.

Some help in this matter would be much appreciated!

/David

Can you please provide the expressions for the calculated members and what they are intended to do. Perhaps this forum will be able to suggest optimizations. 3.5 million members in the dimension is not that big. While calculations could take some time - it should definitely be in seconds, not in hours.|||

If I am not reading this in the wrong way this is about transforming cube records dimension members to a text file with SSIS.

I am not sure about the API:s that SSIS uses for this task.

Perhaps it is better to write this query in SSRS2005 and use export to csv or xls-files?

Regards

Thomas Ivarsson

|||

Here is one of the MDX queries which never finishes:

WITH
MEMBER [hush?ll?vrigaK?pSen12M?nBeloppV?rde] AS SUM(({LASTPERIODS(12,[Date].[Year - Month].&[200612])}),[Po?ngbelopp]),NON_EMPTY_BEHAVIOR=[Measures].[Po?ngbelopp]
MEMBER [hush?ll?vrigaK?pSen12M?nBes?kV?rde] AS SUM(({LASTPERIODS(12,[Date].[Year - Month].&[200612])}),[AntalBesok]),NON_EMPTY_BEHAVIOR=[Measures].[AntalBesok]

MEMBER [hush?ll?vrigaK?pFgSen12M?nBeloppV?rde] AS SUM(({LASTPERIODS(12,[Date].[Year - Month].&[200512])}),[Po?ngbelopp]),NON_EMPTY_BEHAVIOR=[Measures].[Po?ngbelopp]
MEMBER [hush?ll?vrigaK?pFgSen12M?nBes?kV?rde] AS SUM(({LASTPERIODS(12,[Date].[Year - Month].&[200512])}),[AntalBesok]),NON_EMPTY_BEHAVIOR=[Measures].[AntalBesok]

MEMBER [hush?ll?vrigaK?pFfgSen12M?nBeloppV?rde] AS SUM(({LASTPERIODS(12,[Date].[Year - Month].&[200412])}),[Po?ngbelopp]),NON_EMPTY_BEHAVIOR=[Measures].[Po?ngbelopp]
MEMBER [hush?ll?vrigaK?pFfgSen12M?nBes?kV?rde] AS SUM(({LASTPERIODS(12,[Date].[Year - Month].&[200412])}),[AntalBesok]),NON_EMPTY_BEHAVIOR=[Measures].[AntalBesok]


SELECT {


[hush?ll?vrigaK?pSen12M?nBeloppV?rde],
[hush?ll?vrigaK?pSen12M?nBes?kV?rde] ,

[hush?ll?vrigaK?pFgSen12M?nBeloppV?rde],
[hush?ll?vrigaK?pFgSen12M?nBes?kV?rde],

[hush?ll?vrigaK?pFfgSen12M?nBeloppV?rde],
[hush?ll?vrigaK?pFfgSen12M?nBes?kV?rde]

}
ON 0,
[Kund].[Premiegrupp].children DIMENSION PROPERTIES MEMBER_KEY, MEMBER_CAPTION ON 1

FROM [xxxxxx]
WHERE {[Butik].[Kedja].&[7],
[Butik].[Kedja].&Music,
[Butik].[Kedja].&[2],
[Butik].[Kedja].&[10],
[Butik].[Kedja].&[13],
[Butik].[Kedja].&[16]
}

The following MDX finishes after 30-40 min:

SELECT { [Po?ngbelopp],[AntalBesok] } ON 0,

{nonemptyCrossjoin([Kund].[Premiegrupp].children)} ,

{[Stambutik].[Kedja - Butik].[Kedja].&[14].children})} DIMENSION PROPERTIES MEMBER_KEY, MEMBER_CAPTION,[Stambutik].[Kedja - Butik].[butiksnummer] ON 1 FROM [xxxxx]

The language is swedish and the meanings are [Kund]=[Customer], [Butik]=[Store], [Po?ngbelopp]=[Amount], [Antal bes?k]=[number of visits]

To use SSIS for this type task usually works fine, some small problems with datatypes though. I will look in to how SSRS works thanks for the tip.

|||

OK, I got it (Butik is a slang for Store in Russian too, I never knew it had Swedish origin!). First query has many problems with it, so I think we should start with the second query. The syntax for set on ROWS seems to be wrong, but I assume that you really want to do NonEmptyCrossJoin(Customers, Some stores). Given that there is usually strong affinity between customers and stores, the relationship is almost many to one, sometimes called "many to few", I expect much less than 3.5 million rows in the resultset. Can you tell how many rows are in the result for that query ?

When you look into Profiler, what do you see ? How long did it take to scan partition ? How long does serialization of the result takes ? I hope you are using OLEDB and not ADOMD.NET here too, because consuming big results in ADOMD.NET is not as optimal as in OLEDB...

|||

Thank you for your quick reply.

I the second query is actually not a problem, I just submitted it as a reference that works fine. But it returns about the same number of rows as the first one. This join includes a factless fact which describes the most frequently visited store, and therefore the result is bigger than an ordinary [Customer]-[Store] relation. I forgot to mention [Stambutik]=[favourite Store]

The problem i have is with the first query, and I am very interested in the problems you found there.

|||For me 30-40 minutes to execute a query is the problem. The second query doesn't have any calculations, of course once you start doing SUM(PeriodsToDate()) the running time increases greatly (although I wonder whether you use SP2). Can you please answer the questions from the previous post.|||

I use a DataReader source SSIS using an OLEDB connection. SP2 is not installed.

I have no data for the time to scan partitions, serialization takes 5 min of min total execution-time. the [favourite store] is related to sales via a many-to-many relation and . I also noticed I forgot to include the "WHERE {lastperiods(12,[Date].[Year - Month].[Month].&[200612])}"

|||So what exactly do you see in the profiler when you run the query. How many rows do you get back (both questions apply to the second query).|||

Now I have set up a new partition scheme for the cube so the second query executes considerably faster.

The second query executes in 15 min,

What I see in SQLprofiler is:

Calculate Non Empty: 5 min duration

and a few Query Subcube events.

994 916 rows returned.

The first query still never finishes.

It has a lot of Query Subcube events.

I hope this helps you.

Saturday, February 25, 2012

MDX Query above 8000 characters

Hi,

I have a MDX query which is of an aprox length of 10000 characters. I
have to execute the query from within the stored procedure in sql. To
run this query I use the openrowset method.

If the length of my query is less than 8000 characters my query
executes perfectly, but the moment it exceeds 8000 characters it stop
working. Please suggest a solution for the same.

Sample Code:

declare @.mdxqry varchar(8000)
declare @.SearchCond varchar(8000)

set @.SearchCond = @.SearchCond + '
[ProductsAccounts].CurrentMember.properties("AS Date") <= "' + @.TDate
+ '" '

set @.mdxqry = '''WITH ' +
'MEMBER [Measures].[Difference] as ''''[Measures].[Expected Interest
Amount] - [Measures].[Adjusted Interest]'''' ' +
'MEMBER [Measures].[Loan Closed within Report Period] as ' +
''iif(cdate([ProductsAccounts].CurrentMember.properties("Closed
Date")) < cdate("' + @.ToDate + '"), "Yes", "No")'' +
'MEMBER [Measures].[ClosedBeforeLastInstallment] as
''''iif([Measures].[Loan Closed Before Last Instal]=1, "Yes", "No")''''
' +
'SELECT ' +
'{[Measures].[Expected Interest Amount], [Measures].[Adjusted
Interest], [Measures].[Difference], ' +
'[Measures].[Zero Interest Transactions],
[Measures].[ClosedBeforeLastInstallment], ' +
'[Measures].[Loan Closed within Report Period]} ON 0, '

set @.mdxqry = @.mdxqry +
'{Filter([ProductsAccounts].[Account Id].Members, (' + @.SearchCond +
'))} on 2, ' +
@.BranchFilter +
'FROM InterestAnalysis'''

set @.mdxqry = 'SELECT a.* FROM
OpenRowset(''MSOLAP'',''DATASOURCE="SERVERNAME"; Initial
Catalog="DATABASENAME";'',' + @.mdxqry + ') as a'

exec(@.mdxqry)

I have already tried splitting my query into smalled chunks and
executing it, but still I face the same problem.

This is how I have Done it:

declare @.mdxqry1 varchar(8000)
declare @.mdxqry2 varchar(8000)
declare @.SearchCond varchar(8000)

set @.SearchCond = @.SearchCond + '
[ProductsAccounts].CurrentMember.properties("AS Date") <= "' + @.TDate
+ '" '

set @.mdxqry1 = '''WITH ' +
'MEMBER [Measures].[Difference] as ''''[Measures].[Expected Interest
Amount] - [Measures].[Adjusted Interest]'''' ' +
'MEMBER [Measures].[Loan Closed within Report Period] as ' +
''iif(cdate([ProductsAccounts].CurrentMember.properties("Closed
Date")) < cdate("' + @.ToDate + '"), "Yes", "No")'' +
'MEMBER [Measures].[ClosedBeforeLastInstallment] as
''''iif([Measures].[Loan Closed Before Last Instal]=1, "Yes", "No")''''
'

set @.mdxqry2 = 'SELECT ' +
'{[Measures].[Expected Interest Amount], [Measures].[Adjusted
Interest], [Measures].[Difference], ' +
'[Measures].[Zero Interest Transactions],
[Measures].[ClosedBeforeLastInstallment], ' +
'[Measures].[Loan Closed within Report Period]} ON 0, '

set @.mdxqry2 = @.mdxqry2 +
'{Filter([ProductsAccounts].[Account Id].Members, (' + @.SearchCond +
'))} on 2, ' +
@.BranchFilter +
'FROM InterestAnalysis'''

set @.mdxqry2 = 'SELECT a.* FROM
OpenRowset(''MSOLAP'',''DATASOURCE="SERVERNAME"; Initial
Catalog="DATABASENAME";'',' + @.mdxqry + ') as a'

exec(@.mdxqry1 + @.mdxqry2)

Thanks in Advance

Charuvarchar is limited to 8000 characters, but EXEC can take several varchar parameters concatenated together.

Try breaking @.mdxqry into several strings that you know will be below the 8k limit (@.mdxqry1, @.mdxqry2, ...@.mdxqryN). Then call it like this:

exec (@.mdxqry1 + @.mdxqry2 + ... @.mdxqryN)|||I have already tried breaking up the varchar into multiple variables but the same problem exists...Please see if there is any other solution...

Thanks
Charu|||I have already tried breaking up the varchar into multiple variables but the same problem exists...How? Not according to the code you posted.