question

Brendan2012 avatar image
Brendan2012 asked

Heavy MDX Query

Hi, We're using SAP BPC on a .net server and it's calling SAP BW via an MDX query. We've run SQL trace on BW during the MDX query and identified a single SQL statement (attached) that takes on average 30 seconds to process. The underlying table being queried holds 11 million records. Data storage is on XIV and our DB is on a P7 running AIX and Oracle 11g. We would like to reduce run times to sub 5 seconds. We do not believe hardware (CPU, memory, IO) is a constraint, but rather that the query is inefficient and that it takes Oracle time to process all the joins and aggregate the data. We've run a SQL Explain (attached below) to identify the expensive parts of the SQL. Which parts of the SQL are expensive? If we pre-aggregate the table that has 11 million rows will this significantly improve response times? Or is there something else we are overlooking (Oracle tuning, indexes)? Looking at the SQL Explain: - "TABLE ACCESS BY INDEX ROWID" has a high cost (92) but has 0 %CPU - "SORT UNIQUE" and "VIEW" are expensive (25 cost, 88 %CPU). - "HASH JOIN" (128 cost, 10 %CPU) [SQL Statement][1] [SQL Explain][2] We've been looking at this problem for many weeks and have not been able to make much progress. The slow response times are really hurting the business users who run and refresh reports many many times throughout the day, any advice or guidance is appreciated. Thanks for your help Brendan [1]: /storage/temp/340-sql+statement.pdf [2]: /storage/temp/341-sql+explain.pdf
sqloraclemdx
sql statement.pdf (16.3 KiB)
sql explain.pdf (25.5 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Brendan2012 avatar image
Brendan2012 answered
Hi, any ideas out there....? Thanks, Brendan
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.