dbTalk Databases Forums  

Inconsistent MDX query performance

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Inconsistent MDX query performance in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Andy
 
Posts: n/a

Default Inconsistent MDX query performance - 10-03-2006 , 11:12 AM






I have got two MDX queries that look very similar.
Each queries a cube on 13 axes.
The members along all axes apart from the first are identical.
In serving the data for one, my SSAS 2005 instance takes a few seconds and
consumes hardly any server resources.
In serving the data for the other the same SSAS 2005 instance chews up all
the RAM on the server and keels over!
The queries are generated programmatically and as such have extremely long
strings with lists of member names.

If anyone can give me some clues as to why I should get such dramatically
different performance from these two queries I would love to hear from you.
Afraid that I cannot field questions about the design of the cubes - I
didn't design them - I just need to get data out of them!

I tried to files with the queries to this post but they are both 211KB in
size so was unable to.

I am probably looking for links to more general resources that will explain
performance
characteristics of processing MDX queries so I can understand the difference
that I am seeing.

Ultimately my objective is to have the query that brings the server down
process as efficiently as the one that doesn't.

TIA



Reply With Quote
  #2  
Old   
Jéjé
 
Posts: n/a

Default Re: Inconsistent MDX query performance - 10-03-2006 , 01:37 PM






look similar but are not similar... so this little difference can explain
some results.

do you access a calculated measure in 1 query and not in the other? (or
different calculated measures with different formulas)
have you try to optimize your aggregation design?


"Andy" <arb70sok (AT) hotmail (DOT) com> wrote

Quote:
I have got two MDX queries that look very similar.
Each queries a cube on 13 axes.
The members along all axes apart from the first are identical.
In serving the data for one, my SSAS 2005 instance takes a few seconds and
consumes hardly any server resources.
In serving the data for the other the same SSAS 2005 instance chews up all
the RAM on the server and keels over!
The queries are generated programmatically and as such have extremely long
strings with lists of member names.

If anyone can give me some clues as to why I should get such dramatically
different performance from these two queries I would love to hear from
you.
Afraid that I cannot field questions about the design of the cubes - I
didn't design them - I just need to get data out of them!

I tried to files with the queries to this post but they are both 211KB in
size so was unable to.

I am probably looking for links to more general resources that will
explain performance
characteristics of processing MDX queries so I can understand the
difference that I am seeing.

Ultimately my objective is to have the query that brings the server down
process as efficiently as the one that doesn't.

TIA




Reply With Quote
  #3  
Old   
amish
 
Posts: n/a

Default Re: Inconsistent MDX query performance - 10-04-2006 , 01:51 AM




Jéjé wrote:

Quote:
look similar but are not similar... so this little difference can explain
some results.

do you access a calculated measure in 1 query and not in the other? (or
different calculated measures with different formulas)
have you try to optimize your aggregation design?


"Andy" <arb70sok (AT) hotmail (DOT) com> wrote in message
news:%235HCBbw5GHA.2264 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
I have got two MDX queries that look very similar.
Each queries a cube on 13 axes.
The members along all axes apart from the first are identical.
In serving the data for one, my SSAS 2005 instance takes a few seconds and
consumes hardly any server resources.
In serving the data for the other the same SSAS 2005 instance chews up all
the RAM on the server and keels over!
The queries are generated programmatically and as such have extremely long
strings with lists of member names.

If anyone can give me some clues as to why I should get such dramatically
different performance from these two queries I would love to hear from
you.
Afraid that I cannot field questions about the design of the cubes - I
didn't design them - I just need to get data out of them!

I tried to files with the queries to this post but they are both 211KB in
size so was unable to.

I am probably looking for links to more general resources that will
explain performance
characteristics of processing MDX queries so I can understand the
difference that I am seeing.

Ultimately my objective is to have the query that brings the server down
process as efficiently as the one that doesn't.

TIA

Is storage settings and aggregate designs are same in both servers?

Regards
Amish Shah



Reply With Quote
  #4  
Old   
Andy
 
Posts: n/a

Default Re: Inconsistent MDX query performance - 10-04-2006 , 03:25 AM



Like I said - I know nothing about the design of these cubes they have just
been 'deliver' to me and now I need to get data out.
If I change the query so that it has only a single member from the first
dimension it runs OK.

So ... I guess that I will use binary division on my 8000+ members to figure
out precisely which member(s) are causing the problem and at that point I
might be able to answer your questions.

Andy


"Jéjé" <willgart_A_ (AT) hotmail_A_ (DOT) com> wrote

Quote:
look similar but are not similar... so this little difference can explain
some results.

do you access a calculated measure in 1 query and not in the other? (or
different calculated measures with different formulas)
have you try to optimize your aggregation design?


"Andy" <arb70sok (AT) hotmail (DOT) com> wrote in message
news:%235HCBbw5GHA.2264 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
I have got two MDX queries that look very similar.
Each queries a cube on 13 axes.
The members along all axes apart from the first are identical.
In serving the data for one, my SSAS 2005 instance takes a few seconds
and
consumes hardly any server resources.
In serving the data for the other the same SSAS 2005 instance chews up
all
the RAM on the server and keels over!
The queries are generated programmatically and as such have extremely
long
strings with lists of member names.

If anyone can give me some clues as to why I should get such dramatically
different performance from these two queries I would love to hear from
you.
Afraid that I cannot field questions about the design of the cubes - I
didn't design them - I just need to get data out of them!

I tried to files with the queries to this post but they are both 211KB in
size so was unable to.

I am probably looking for links to more general resources that will
explain performance
characteristics of processing MDX queries so I can understand the
difference that I am seeing.

Ultimately my objective is to have the query that brings the server down
process as efficiently as the one that doesn't.

TIA






Reply With Quote
  #5  
Old   
Jéjé
 
Posts: n/a

Default Re: Inconsistent MDX query performance - 10-04-2006 , 07:28 AM



well...

sometimes the measure you try to use are not optimize for a large access.
I mean accessing the measure by displaying a large number of members.

Imagine if the measure is something like "number of distinct products" which
is a calculated measure.
then you query this measure to display this by customer (8000+)
then the result will produce a large and long scan of the cube and the
performance dropped.
if querying 1 customer only takes 1 second, in this case doing the same
calculation for 8000+ member can take 8000 seconds!!!!

its why its important to know what you manipulate and if the measures are
optimized for your type of query or not.

"Andy" <arb70sok (AT) hotmail (DOT) com> wrote

Quote:
Like I said - I know nothing about the design of these cubes they have
just been 'deliver' to me and now I need to get data out.
If I change the query so that it has only a single member from the first
dimension it runs OK.

So ... I guess that I will use binary division on my 8000+ members to
figure out precisely which member(s) are causing the problem and at that
point I might be able to answer your questions.

Andy


"Jéjé" <willgart_A_ (AT) hotmail_A_ (DOT) com> wrote in message
news:%23wFRFsx5GHA.1012 (AT) TK2MSFTNGP05 (DOT) phx.gbl...
look similar but are not similar... so this little difference can explain
some results.

do you access a calculated measure in 1 query and not in the other? (or
different calculated measures with different formulas)
have you try to optimize your aggregation design?


"Andy" <arb70sok (AT) hotmail (DOT) com> wrote in message
news:%235HCBbw5GHA.2264 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
I have got two MDX queries that look very similar.
Each queries a cube on 13 axes.
The members along all axes apart from the first are identical.
In serving the data for one, my SSAS 2005 instance takes a few seconds
and
consumes hardly any server resources.
In serving the data for the other the same SSAS 2005 instance chews up
all
the RAM on the server and keels over!
The queries are generated programmatically and as such have extremely
long
strings with lists of member names.

If anyone can give me some clues as to why I should get such
dramatically
different performance from these two queries I would love to hear from
you.
Afraid that I cannot field questions about the design of the cubes - I
didn't design them - I just need to get data out of them!

I tried to files with the queries to this post but they are both 211KB
in size so was unable to.

I am probably looking for links to more general resources that will
explain performance
characteristics of processing MDX queries so I can understand the
difference that I am seeing.

Ultimately my objective is to have the query that brings the server down
process as efficiently as the one that doesn't.

TIA








Reply With Quote
  #6  
Old   
Andy
 
Posts: n/a

Default Re: Inconsistent MDX query performance - 10-04-2006 , 11:56 AM



Thanks for the observation.

Interestingly as I broke my query down bit by bit (basically I chopped the
number of members on my long dimension by two each time) I got to a point
where both halves of the query ran in a "reasonably" time,
consuming reasonable resources on the server but the merged query consumed
all of the RAM and brought the server down (as my original query had).

Hmmmm.

Fortunately because my queries are generated programmatically it is fairly
straightforward for me to break them down into a large number of small
queries rather that a few large queries.
By doing this I can work around the problem.

However my hunch is that there may be a bug in the MDX parser or some other
part of the AS2005 infrastructure whereby it does not cope well with queries
that have extreme numbers of members along one or more dimensions.



"Jéjé" <willgart_A_ (AT) hotmail_A_ (DOT) com> wrote

Quote:
well...

sometimes the measure you try to use are not optimize for a large access.
I mean accessing the measure by displaying a large number of members.

Imagine if the measure is something like "number of distinct products"
which is a calculated measure.
then you query this measure to display this by customer (8000+)
then the result will produce a large and long scan of the cube and the
performance dropped.
if querying 1 customer only takes 1 second, in this case doing the same
calculation for 8000+ member can take 8000 seconds!!!!

its why its important to know what you manipulate and if the measures are
optimized for your type of query or not.

"Andy" <arb70sok (AT) hotmail (DOT) com> wrote in message
news:elzTn645GHA.2264 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
Like I said - I know nothing about the design of these cubes they have
just been 'deliver' to me and now I need to get data out.
If I change the query so that it has only a single member from the first
dimension it runs OK.

So ... I guess that I will use binary division on my 8000+ members to
figure out precisely which member(s) are causing the problem and at that
point I might be able to answer your questions.

Andy


"Jéjé" <willgart_A_ (AT) hotmail_A_ (DOT) com> wrote in message
news:%23wFRFsx5GHA.1012 (AT) TK2MSFTNGP05 (DOT) phx.gbl...
look similar but are not similar... so this little difference can
explain some results.

do you access a calculated measure in 1 query and not in the other? (or
different calculated measures with different formulas)
have you try to optimize your aggregation design?


"Andy" <arb70sok (AT) hotmail (DOT) com> wrote in message
news:%235HCBbw5GHA.2264 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
I have got two MDX queries that look very similar.
Each queries a cube on 13 axes.
The members along all axes apart from the first are identical.
In serving the data for one, my SSAS 2005 instance takes a few seconds
and
consumes hardly any server resources.
In serving the data for the other the same SSAS 2005 instance chews up
all
the RAM on the server and keels over!
The queries are generated programmatically and as such have extremely
long
strings with lists of member names.

If anyone can give me some clues as to why I should get such
dramatically
different performance from these two queries I would love to hear from
you.
Afraid that I cannot field questions about the design of the cubes - I
didn't design them - I just need to get data out of them!

I tried to files with the queries to this post but they are both 211KB
in size so was unable to.

I am probably looking for links to more general resources that will
explain performance
characteristics of processing MDX queries so I can understand the
difference that I am seeing.

Ultimately my objective is to have the query that brings the server
down
process as efficiently as the one that doesn't.

TIA










Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.