Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can Teradata Handle LEFT OUTER JOIN + UNION ALL + PPI Access At The Sa

Status
Not open for further replies.

bunwong

IS-IT--Management
Mar 15, 2004
13
HK
We have the following scenarioa and would like to have you advise:
- table BILLED_CALL_RECS, PI = Cust_Num, Subr_Num, PPI column = Call_Start_Date
- table PREPD_CALL_RECS, PI = Cust_Num, Subr_Num, PPI column = Call_Start_Date
- table PREPD_POSTPAID_SUBR, PI = Cust_Num, Subr_Num, no PPI


When execute this sql:

sel * from
dev_biz_adw.prepd_postpaid_subr B inner join
(sel cust_num, subr_num, call_start_date from dev_biz_adw.billed_call_recs
union all
sel cust_num, subr_num, call_start_date from dev_biz_adw.prepd_call_recs) A (cust_num, subr_num, call_start_date) on
a.cust_num = b.cust_num
and a.subr_num = b.subr_num
where a.call_start_date = cast('2005-12-31' as date)

the call tables can make use of PPI to access.

When change the sql from INNER JOIN to LEFT OUTER JOIN, i.e.

sel * from
dev_biz_adw.prepd_postpaid_subr B left outer join
(sel cust_num, subr_num, call_start_date from dev_biz_adw.billed_call_recs
union all
sel cust_num, subr_num, call_start_date from dev_biz_adw.prepd_call_recs) A (cust_num, subr_num, call_start_date) on
a.cust_num = b.cust_num
and a.subr_num = b.subr_num
where a.call_start_date = cast('2005-12-31' as date)

it is found that the query cannot be accessed via PPI but in all-amp operation. However, because the sql is generated by BI tools, tuning the sql by using derived table is not an option.

Can anyone tell why this happen and how to make LEFT OUTER JOIN and UNION ALL can be use with PPI access at the same time?

Thanks in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top