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.
- 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.