• Without more details about the cube it's composition and aggregations etc. and also what you are trying to achieve here, it is almost impossible to help you optimize the query.

    If you're trying to return 50 million rows, isn't it pretty obvious why the query is timing out?