SCHUB Performance test2
Description
select /*+ parallel*/ count(*) count, wdj.status_type, xxen_util.meaning(wdj.status_type,'WIP_JOB_STATUS',700) status, case when wdj.status_type in (1,3,4,6) then 'Y' end active_status, nvl2(wro.date_required,'not null',null) date_required, case when wro.quantity>0 then '>0' else '0' end quantity, case when wro.operation_seq_num>0 then '>0' else '<=0' end operation_seq_num, case when wro.wip_supply_type not in (5,6) then 'Y' end eligible_wip_supply_type from (select greatest(wro.required_quantity-wro.quantity_issued,0) quantity, wro.* from wip_requirement_operations wro) wro, wip_discrete_jobs wdj where --wro.operation_seq_num>0 and wro.organization_id=wdj.organization_id and wro.wip_entity_id=wdj.wip_entity_id group by wdj.status_type, nvl2(wro.date_required,'not null',null), case when wro.quantity>0 then '>0' else '0' end, case when wro.operation_seq_num>0 then '>0' else '<=0' end, case when wro.wip_supply_type not in (5,6) then 'Y' end order by count(*) desc |