![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, There are two aggregate member: 1) MEMBER [CloseFactTime].scope AS 'Aggregate({[CloseFactTime].[2002].[Quarter 3].[July]:[CloseFactTime].[2004].[Quarter 3].[August]})' 2) MEMBER [CloseFactTime].scope AS 'Aggregate({[CloseFactTime].[2002].[Quarter 3].[July].[1]:[CloseFactTime].[2004].[Quarter 3].[August].[31]})' The first one makes the query execution time 3 seconds, while the second one makes the query execution time 30 seconds. They return the same result. When I build the MDX query string, I had to write the query like this: [Time].[2001].[Q1].[Feb].[18] : [Time].[2001].[Q1].[Feb].[28], [Time].[2001].[Q1].[MARCH], [Time].[2001].[Q2] : [Time].[2001].[Q4], [Time].[2002] : [Time].[2003], ...... ..... This will make the query longer, but I think it will be faster. When I build the query in my program, I had to check if the day is in the [Time] dimension. For example, if [Time].[2001].[Q1].[Feb].[18] is not in the [Time] dimension, I had to skip a day. This will make a lot of code to perform the check operation, and it spend some time I think. In other dimension, it is the same case. How can I improve the check operation? Thanks, |
#3
| |||
| |||
|
|
the query 2 aggregate at the day level and the query 1 at the month level. its why the second is slower. but can you explain what you want to do? "Charlie Tong" <wentschao (AT) msn (DOT) com> a écrit dans le message de news: eNRnOH8jEHA.3696 (AT) TK2MSFTNGP15 (DOT) phx.gbl... Hi, There are two aggregate member: 1) MEMBER [CloseFactTime].scope AS 'Aggregate({[CloseFactTime].[2002].[Quarter 3].[July]:[CloseFactTime].[2004].[Quarter 3].[August]})' 2) MEMBER [CloseFactTime].scope AS 'Aggregate({[CloseFactTime].[2002].[Quarter 3].[July].[1]:[CloseFactTime].[2004].[Quarter 3].[August].[31]})' The first one makes the query execution time 3 seconds, while the second one makes the query execution time 30 seconds. They return the same result. When I build the MDX query string, I had to write the query like this: [Time].[2001].[Q1].[Feb].[18] : [Time].[2001].[Q1].[Feb].[28], [Time].[2001].[Q1].[MARCH], [Time].[2001].[Q2] : [Time].[2001].[Q4], [Time].[2002] : [Time].[2003], ...... ..... This will make the query longer, but I think it will be faster. When I build the query in my program, I had to check if the day is in the [Time] dimension. For example, if [Time].[2001].[Q1].[Feb].[18] is not in the [Time] dimension, I had to skip a day. This will make a lot of code to perform the check operation, and it spend some time I think. In other dimension, it is the same case. How can I improve the check operation? Thanks, |
#4
| |||
| |||
|
|
The [Time] dimension is like this: [Time].[2004].[Q1].[August].[1], [Time].[2004].[Q1].[August].[3], [Time].[2004].[Q1].[August].[4], [Time].[2004].[Q1].[August].[6] ... That is, not all continuous days in the [Time] dimension, If i put [Time].[2004].[Q1].[August].[5] in my MDX query, it will throw an exception. So when I build my MDX query, I have to check if [Time].[2004].[Q1].[August].[5] is in the dimension. If so, add it in my mdx query. If not, omit it. Check if something is in the dimension spends a lot of code and some time. Is there any way to overcome it? Thanks, Jéj? <willgart (AT) BBBhotmailAAA (DOT) com>> wrote in message news:OiZjgP8jEHA.1404 (AT) TK2MSFTNGP09 (DOT) phx.gbl... the query 2 aggregate at the day level and the query 1 at the month level. its why the second is slower. but can you explain what you want to do? "Charlie Tong" <wentschao (AT) msn (DOT) com> a écrit dans le message de news: eNRnOH8jEHA.3696 (AT) TK2MSFTNGP15 (DOT) phx.gbl... Hi, There are two aggregate member: 1) MEMBER [CloseFactTime].scope AS 'Aggregate({[CloseFactTime].[2002].[Quarter 3].[July]:[CloseFactTime].[2004].[Quarter 3].[August]})' 2) MEMBER [CloseFactTime].scope AS 'Aggregate({[CloseFactTime].[2002].[Quarter 3].[July].[1]:[CloseFactTime].[2004].[Quarter 3].[August].[31]})' The first one makes the query execution time 3 seconds, while the second one makes the query execution time 30 seconds. They return the same result. When I build the MDX query string, I had to write the query like this: [Time].[2001].[Q1].[Feb].[18] : [Time].[2001].[Q1].[Feb].[28], [Time].[2001].[Q1].[MARCH], [Time].[2001].[Q2] : [Time].[2001].[Q4], [Time].[2002] : [Time].[2003], ...... ..... This will make the query longer, but I think it will be faster. When I build the query in my program, I had to check if the day is in the [Time] dimension. For example, if [Time].[2001].[Q1].[Feb].[18] is not in the [Time] dimension, I had to skip a day. This will make a lot of code to perform the check operation, and it spend some time I think. In other dimension, it is the same case. How can I improve the check operation? Thanks, |
![]() |
| Thread Tools | |
| Display Modes | |
| |