Archives of the TeradataForum
Message Posted: Tue, 22 Dec 2009 @ 22:20:51 GMT
First of all, it is good to see the DDL so that the issue can be discussed more specifically. Thanks go to the OP who did not leave our requests unanswered.
The above solution provides some insight in what might be the problem with the optimizer in the case when the views are used. I carefully scanned the DDL and, as far as I can tell, the JI can provide the full coverage of the query. However, the optimizer does not seem to be able to figure that out.
When AK ROWID is included in the DDL of JI, the optimizer probably decides that there is partial coverage and it may still use the AK table as well.
In other words, my guess is that the optimizer will use the modified JI and perform ROWID join to AK. ROWID-based join in this case should be fast enough not to notice any performance problems. So, on the practical level, the solution should work.
If we don't overlook something unusual in the definitions, I'd say this is a bug. The view-based query should be fully covered by the original JI without any modifications. Submitting a bug report to Teradata would be in order.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|