Archives of the TeradataForum
Message Posted: Tue, 07 Jun 2005 @ 21:20:55 GMT
All hail the Teradata hive mind!
I have a question. I was handed a query generated by Microstrategy, that had a select in a subquery, said select having a RANK function in it. The outer query that used the subselect had a where clause on the column defined in the subquery with RANK. Horrendous EXPLAIN of > 800 hours, and when there was enough data, it would die with a spool space error on one of the three product joins. So I changed the SELECT FROM (SELECT) to an ordinary query with the QUALIFY statement to replace the original WHERE clause. Still three product joins in the EXPLAIN, and 30+ hours of cost, but the product joins were reasonable (2 small table X small table, one small table X moderate result set). Great!
However, the person who asked me to look at the query didn't think QUALIFY would be generated by MicroStrategy. I looked it up, and sure enough, it's a Teradata extension to Ansi-99 SQL. So does anybody have any experience implementing this under the Microstrategy covers? Yeah, yeah, I know, use a view (or in this case, lots of views). Any other ideas?
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|