Hi,
I have made some changes to an existing MDX query that was running just fine through a reporting services interface, and it now seems to be taking over an hour and a half to return the correct data.
I have included the MDX query below. Highlighted in bold is the new line I added which seems to cause the query to run slowly.
For information there is a relationship between Delivery Agent and Delivery Agent Type dimensions through a foreign key.
Any help or pointers as to what the issue might be would be greatly appreciated.
Kind Regards,
Juee
SELECT NON EMPTY {[Measures].[Item Charges Count],
[Measures].[Cost Price],
[Measures].[Cost Price Advanced Element]
}
ON COLUMNS, {
(
[Delivery Agent Type].[Agent Type Key].[Agent Type Key].ALLMEMBERS *
[Delivery Agent Type].[Agent Type Description].[Agent Type Description].ALLMEMBERS *
[Delivery Agent].[Agent Description].[Agent Description].ALLMEMBERS *
[Dim Access Type].[Access Type].[Access Type].ALLMEMBERS *
[Dim Line Item].[Line Item Description].[Line Item Description].ALLMEMBERS *
[Dim Line Item].[Line Item Charge Type].[Line Item Charge Type].ALLMEMBERS
)
}DIMENSION PROPERTIES MEMBER_CAPTION,
MEMBER_UNIQUE_NAME ON ROWS FROM
( SELECT
(
{ [Dim Charge State].[Charge State Description].&[Initial state prior to billing],
[Dim Charge State].[Charge State Description].&[Unmediated],
[Dim Charge State].[Charge State Description].&[Mediated],
[Dim Charge State].[Charge State Description].&[Unrated - No chargeband],
[Dim Charge State].[Charge State Description].&[Rated - Chargeband set],
[Dim Charge State].[Charge State Description].&[Unrated - No Tariff],
[Dim Charge State].[Charge State Description].&[Billable to agent],
[Dim Charge State].[Charge State Description].&[Not billable to agent]
}
) ON COLUMNS FROM
( SELECT
(
STRTOSET('[Billable Month].[Month].&[2012-12-01T00:00:00]',
CONSTRAINED) ) ON COLUMNS
FROM
( SELECT( STRTOSET('[Dim Source].[Source Name].[All]', CONSTRAINED) )
ON COLUMNS FROM [Generic Rental Billing DW])))
WHERE ( IIF( STRTOSET('[Dim Source].[Source Name].[All]', CONSTRAINED).Count = 1,
STRTOSET('[Dim Source].[Source Name].[All]', CONSTRAINED),
[Dim Source].[Source Description].currentmember ),
IIF( STRTOSET('[Billable Month].[Month].&[2012-12-01T00:00:00]',
CONSTRAINED).Count = 1,
STRTOSET('[Billable Month].[Month].&[2012-12-01T00:00:00]', CONSTRAINED),
[Supplier Billable Month].[Month Name].currentmember ),
[Dim Charge State].[Charge State Description].CurrentMember )
CELL PROPERTIES VALUE,
BACK_COLOR,
FORE_COLOR,
FORMATTED_VALUE,
FORMAT_STRING,
FONT_NAME,
FONT_SIZE,
FONT_FLAGS