You just posted an insert from select...
61967416 redo size
This is quite much redo
Printable View
You just posted an insert from select...
61967416 redo size
This is quite much redo
what are you trying to do with this line in your where clause?
AND dstd.so_type_id = dsf.order_type_id || ''
why join a table when all you want is one column?
( technology table, platform table, calendar table)
See if you get lower consistent-gets with the below edit.
also, instead of 4 joins on the calendar table how about
something like this:
PHP Code:/* edited top of select statement ... */
(select report_date
from calendar
where calendar_id = dsf.order_date_id) order_date,
schedule_d.report_date scheduled_Date,
schedule_d.fiscal_year||'-Q'||schedule_d.fiscal_quarter_number Quarter_tag,
substr(schedule_d.fiscal_period_name,1,3) fiscal_month,
(select report_date
from calendar
where calendar_id = dsf.requested_date_id) order_requested_ship_date,
(select Technology_desc
from Technology
where technology_id = dsf.technology_id) Technology,
(select Platform_desc
from platform
where platform_id = dsf.platform_id) Platform_Type,
nvl(dfd.fab_id,1) fab_id,
dfd.operational_strategic_acct strategic_account,
dfd.black_book_sub_account sub_account
FROM
so dsf,
itm did_proj,
sf,
dof,
/* calendar promise_d,*/
/* calendar order_d,*/
calendar schedule_d,
/* calendar order_req_d,*/
/* technology dtd, */
/* platform dpd,*/
fab dfd,
(SELECT component_line_id, item_id, parent_line_id,
nvl(inventory_org_id,1) inventory_org_id,
pick_release_date_id , pick_line_id
FROM component
WHERE config_flag = 'Y' AND ordered_quantity - nvl(cancelled_quantity ,0) > 0) dscf,
(SELECT so_type_id, system_or_nso
FROM so_type WHERE order_type_name != 'Archive') dstd
WHERE dscf.parent_line_id = dsf.line_id
AND dscf.item_id = did_proj.item_id
AND dscf.component_line_id = sf.line_id
and nvl(dof.Opportunity_Number,dsf.Opportunity_Number) = dsf.Opportunity_Number
AND dof.order_number = dsf.order_number
AND dstd.so_type_id = dsf.order_type_id || ''
/*AND promise_d.calendar_id = dsf.promise_date_id*/
AND schedule_d.calendar_id = sf.schedule_date_id
/*AND order_d.calendar_id = dsf.order_date_id*/
/*AND order_req_d.calendar_id = dsf.requested_date_id*/
/*AND dtd.technology_id = dsf.technology_id*/
/*AND dpd.platform_id = dsf.platform_id*/
AND dfd.fab_id = dsf.fab_id