I have a database containing tables with more than 600 million records and a set of stored procedures that make complex search operations on the database.
The performance of the stored procedures is so slow even with suitable indexes on the tables.
The design of the database is a normal relational db design.
I want to change the database design to be multidimensional and use the MDX queries instead of the traditional T-SQL queries but the question is:
Is the MDX query better than the traditional T-SQL query with regard to performance?
and if yes, to what extent will that improve the performance of the queries?
Thanks for any help.
Apples and oranges: An analysis services OLAP cube is a fundamentally different type of storage than a SQL Server database, and they are designed to do different things. Technically MDX is not “faster” than T-SQL, or vice versa — they are just languages, but designed for different needs.
Having said that, a cube is usually what works best for doing numeric analysis of static data, such as aggregating large numbers of sales/transactions/whatever records over time. In contrast, a traditional relational database generally works just fine, if the schema and indexes are well constructed, for search. A simple way to judge: if your SQL queries have to do a lot of
then a cube may help (it’s designed for aggregate math functions – sum() and group by). OTOH if your queries do a lot of
then a cube probably will not help, and I would focus instead on tuning the schema, the queries and indexing, and perhaps table partitioning if the data can be suitably partitioned.
Do you have a clustered index and covering non-clustered indexes that match the queries?