Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Problem While Joining Views: Intermediate spool being used in stead of View result - forum topic by sayantan.auddy@gmail.com

$
0
0

I am getting spool space error while trying to join 3-5 views that are accessing same underlying tables.
Teradata optimizer is using the intermediate spool result in stead of the actual view output while joining. As a result, it is using much more data which would otherwise be filtered out in the join conditions inside view definiton.
Example: select * from view1 inner join view2 on (<join condition>) inner join view3 on (<join condition3>)
All 3 views access same tables table1 and table2  but with different filter conditions. While joining view1, view2 and view3, in stead of joining three different filtered recordsets from table1 and table2, it is joining table1, table2 thrice and then applying the filters. As these two tables contain huge records, multiple copies of redundant data is being created in spool and the spool space error is thrown.
Can any one suggest how to avoid this situation?
 
Regards,
Sayantan

Forums: 

Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>