Table.Join/Merge in Power Query takes extremly long time to process for big tables
Hi,
I tried to simply merge/inner join two big tables(one has 300,000+ rows after filtering and the other has 30,000+ rows after filtering) in PQ. However, for this simple join operation, PQ took at least 10 minutes (I killed the Query Editor after 10
minutes' processing) to load the preview.
Here's how I did the join job: I first loaded tables into the workbook, then did the filtering for each table and at last, used the merge function to do the join based on a same field.
Did I do anything wrong here? Or is there any way to improve the load efficiency?
P.S. no custom SQL was used during the process. I was hoping the so called "Query Folding" can help speed the process, but it seems it didn't work here.
Thanks.
Regards,
Qilong
Hi!
You should import the source tables
in Access. This will speed up the work of
PQ in several times.
Similar Messages
-
Query takes a long time on EBAN table
Hi,
I am trying to execute a simple select statement on EBAN table. This query takes unexpectionally longer time to execute.
Query is :
SELECT banfn bnfpo ernam badat ebeln ebelp
INTO TABLE gt_eban
FROM eban FOR ALL ENTRIES IN gt_ekko_ekpo
WHERE
banfn IN s_banfn AND
ernam IN s_ernam
and ebeln = gt_ekko_ekpo-ebeln AND
ebelp = gt_ekko_ekpo-ebelp.
Structure of gt_ekko_ekpo
TYPES : BEGIN OF ty_ekko_ekpo,
ebeln TYPE ekko-ebeln,
ebelp TYPE ekpo-ebelp,
bukrs TYPE ekko-bukrs,
aedat TYPE ekko-aedat,
lifnr TYPE ekko-lifnr,
ekorg TYPE ekko-ekorg,
ekgrp TYPE ekko-ekgrp,
waers TYPE ekko-waers,
bedat TYPE ekko-bedat,
otb_value TYPE ekko-otb_value,
otb_res_value TYPE ekko-otb_res_value,
matnr TYPE ekpo-matnr,
werks TYPE ekpo-werks,
matkl TYPE ekpo-matkl,
elikz TYPE ekpo-elikz,
wepos TYPE ekpo-wepos,
emlif TYPE ekpo-emlif,
END OF ty_ekko_ekpo.
Structure of GT_EBAN
TYPES : BEGIN OF ty_eban,
banfn TYPE eban-banfn,
bnfpo TYPE eban-bnfpo,
ernam TYPE eban-ernam,
badat TYPE eban-badat,
ebeln TYPE eban-ebeln,
ebelp TYPE eban-ebelp,
END OF ty_eban.
Query seems to be OK to me. But still am not able to figure out the reason for this performance issue.
Please provide your inputs.
Thanks.
RichaHi Richa,
Maybe you are executing the query with S_BANFN empty. Still based on the note 191492 you should change your query on like the following
1st Suggestion:
if gt_ekko_ekpo[] is not initial.
SELECT banfn banfpo INTO TABLE gt_eket
FROM eket FOR ALL ENTRIES IN gt_ekko_ekpo
WHERE
ebeln = gt_ekko_ekpo-ebeln AND
ebelp = gt_ekko_ekpo-ebelp.
if sy-subrc = 0.
delete gt_eket where banfn not in s_banfn.
if gt_eket[] is not initial
SELECT banfn bnfpo ernam badat ebeln ebelp
INTO TABLE gt_eban
FROM eban FOR ALL ENTRIES IN gt_eket
WHERE
banfn = gt_eket-banfn
and banfpo = gt_eket-banfpo.
if sy-subrc = 0.
delete gt_eban where ernam not in s_ernam.
endif.
endif.
endif.
endif.
2nd Suggestion:
if gt_ekko_ekpo[] is not initial.
SELECT banfn banfpo INTO TABLE gt_eket
FROM eket FOR ALL ENTRIES IN gt_ekko_ekpo
WHERE
ebeln = gt_ekko_ekpo-ebeln AND
ebelp = gt_ekko_ekpo-ebelp.
if sy-subrc = 0.
delete gt_eket where banfn not in s_banfn.
if gt_eket[] is not initial
SELECT banfn bnfpo ernam badat ebeln ebelp
INTO TABLE gt_eban
FROM eban FOR ALL ENTRIES IN gt_eket
WHERE
banfn = gt_eket-banfn
and banfpo = gt_eket-banfpo
and ernam in s_ernam.
endif.
endif.
endif.
Hope this helps.
Regards,
R -
SUS - Some Clients Take a Long Time to Check for Updates
We have the newest XSERVE, running 10.6, with 12GB of RAM. We use it as our software update server and for some reason, some clients take a long time to check for updates. I'm talking anywhere from an 30 mins to an hour. I can't figure it out. Some clients are quick, some are extremely long.
Now if I tell the client to just check Apple for updates, it takes a few seconds.
Can anyone offer any suggestions?
Thanks.After another restart, firefox has begun throwing errors when starting from terminal. the error reported is:
/opt/kde/bin/skim: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
This is printed 5 times, then gives up and firefox loads quickly after. So this appears to be an issue with skim and libpng similar to other problems being reported.
Some research uncovered that skim is no longer supported and is part of my kdemod3 install, however until this update it was working fine under kdemod4. -
Hi,
I built a query with 4 tables inside (load from Oracle DB and two of them are quite big, more than millions of rows). After filtering, I tried to build relationships between tables using Table.Join formula. However, the process took extremly long time to
bring out results (I ended the process after 15 mins' processing). There's a status bar kept updating while the query was processing, which is showed as . I suppose
this is because the query folding didn't working, so PQ had to load all the data to local memory first then do the opertion, instead of doing all the work on the source system side. Am I right? If yes, is there any ways to solve this issue?
Thanks.
Regards,
QilongHi Curt,
Here's the query that I'm refering,
let
Source = Oracle.Database("reporting"),
AOLOT_HISTS = Source{[Schema="GEN",Item="MVIEW$_AOLOT_HISTS"]}[Data],
WORK_WEEK = Source{[Schema="GEN",Item="WORK_WEEK"]}[Data],
DEVICES = Source{[Schema="GEN",Item="MVIEW$_DEVICES"]}[Data],
AO_LOTS = Source{[Schema="GEN",Item="MVIEW$_AO_LOTS"]}[Data],
Filter_WorkWeek = Table.SelectRows(WORK_WEEK, each ([WRWK_YEAR] = 2015) and (([WORK_WEEK] = 1) or ([WORK_WEEK] = 2) or ([WORK_WEEK] = 3))),
Filter_AlotHists = Table.SelectRows(AOLOT_HISTS, each ([STEP_NAME] = "BAKE" or [STEP_NAME] = "COLD TEST-IFLEX" or [STEP_NAME] = "COLD TEST-MFLEX") and ([OUT_QUANTITY] <> 0)),
#"Added Custom" = Table.AddColumn(Filter_AlotHists, "Custom", each Table.SelectRows(Filter_WorkWeek, (table2Row) => [PROCESS_END_TIME] >= table2Row[WRWK_START_DATE] and [PROCESS_END_TIME] <= table2Row[WRWK_END_DATE])),
#"Expand Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"WRWK_YEAR", "WORK_WEEK", "WRWK_START_DATE", "WRWK_END_DATE"}, {"WRWK_YEAR", "WORK_WEEK",
"WRWK_START_DATE", "WRWK_END_DATE"}),
Filter_AolotHists_byWeek = Table.SelectRows(#"Expand Custom", each ([WORK_WEEK] <> null)),
SelectColumns_AolotHists = Table.SelectColumns(Filter_AolotHists_byWeek,{"ALOT_NUMBER", "STEP_NAME", "PROCESS_START_TIME", "PROCESS_END_TIME", "START_QUANTITY", "OUT_QUANTITY", "REJECT_QUANTITY",
"WRWK_FISCAL_YEAR", "WRWK_WORK_WEEK_NO"}),
Filter_Devices= Table.SelectRows(DEVICES, each ([DEPARTMENT] = "TEST1")),
SelectColumns_Devices = Table.SelectColumns(Filter_Devices,{"DEVC_NUMBER", "PCKG_CODE"}),
Filter_AoLots = Table.SelectRows(AO_LOTS, each Text.Contains([DEVC_NUMBER], "MC09XS3400AFK") or Text.Contains([DEVC_NUMBER], "MC09XS3400AFKR2") or Text.Contains([DEVC_NUMBER], "MC10XS3412CHFK") or Text.Contains([DEVC_NUMBER],
"MC10XS3412CHFKR2")),
SelectColumns_AoLots = Table.SelectColumns(Filter_AoLots,{"ALOT_NUMBER", "DEVC_NUMBER", "TRACECODE", "WAFERLOTNUMBER"}),
TableJoin = Table.Join(SelectColumns_AolotHists, "ALOT_NUMBER", Table.PrefixColumns(SelectColumns_AoLots, "AoLots"), "AoLots.ALOT_NUMBER"),
TableJoin1 = Table.Join(TableJoin, "AoLots.DEVC_NUMBER", Table.PrefixColumns(SelectColumns_Devices, "Devices"), "Devices.DEVC_NUMBER")
in
TableJoin1
Could you please give me some hints why it needs so long to process?
Thanks. -
Query takes very long time and analyze table hangs
Hi
One of the oracle query taking very long time (ie more than a day) and affecting business requirment of getting the report in time.
I tried to analyze the table with compute statistics option, however it hangs/runs forever on one of the huge table?
Please let me know how to troubleshoot this issueHi,
What's your Oracle version?
You should use DBMS_STATS package not ANALYZE..
Regards, -
Time_out Dump on this query take too long time
hi experts,
in my report a query taking too long time
pl. provide performance tips or suggestions
select mkpf~mblnr mkpf~mjahr mkpf~usnam mkpf~vgart
mkpf~xabln mkpf~xblnr mkpf~zshift mkpf~frbnr
mkpf~bktxt mkpf~bldat mkpf~budat mkpf~cpudt
mkpf~cputm mseg~anln1 mseg~anln2 mseg~aplzl
mseg~aufnr mseg~aufpl mseg~bpmng mseg~bprme
mseg~bstme mseg~bstmg mseg~bukrs mseg~bwart
mseg~bwtar mseg~charg mseg~dmbtr mseg~ebeln
mseg~ebelp mseg~erfme mseg~erfmg mseg~exbwr
mseg~exvkw mseg~grund mseg~kdauf mseg~kdein
mseg~kdpos mseg~kostl mseg~kunnr mseg~kzbew
mseg~kzvbr mseg~kzzug mseg~lgort mseg~lifnr
mseg~matnr mseg~meins mseg~menge mseg~lsmng
mseg~nplnr mseg~ps_psp_pnr mseg~rsnum mseg~rspos
mseg~shkzg mseg~sobkz mseg~vkwrt mseg~waers
mseg~werks mseg~xauto mseg~zeile mseg~SGTXT
into table itab
from mkpf as mkpf
inner join mseg as mseg
on mkpf~MBLNR = mseg~mblnr
and mkpf~mjahr = mseg~mjahrno the original query is, i use where clouse with conditions.
select mkpf~mblnr mkpf~mjahr mkpf~usnam mkpf~vgart
mkpf~xabln mkpf~xblnr mkpf~zshift mkpf~frbnr
mkpf~bktxt mkpf~bldat mkpf~budat mkpf~cpudt
mkpf~cputm mseg~anln1 mseg~anln2 mseg~aplzl
mseg~aufnr mseg~aufpl mseg~bpmng mseg~bprme
mseg~bstme mseg~bstmg mseg~bukrs mseg~bwart
mseg~bwtar mseg~charg mseg~dmbtr mseg~ebeln
mseg~ebelp mseg~erfme mseg~erfmg mseg~exbwr
mseg~exvkw mseg~grund mseg~kdauf mseg~kdein
mseg~kdpos mseg~kostl mseg~kunnr mseg~kzbew
mseg~kzvbr mseg~kzzug mseg~lgort mseg~lifnr
mseg~matnr mseg~meins mseg~menge mseg~lsmng
mseg~nplnr mseg~ps_psp_pnr mseg~rsnum mseg~rspos
mseg~shkzg mseg~sobkz mseg~vkwrt mseg~waers
mseg~werks mseg~xauto mseg~zeile mseg~SGTXT
into table itab
from mkpf as mkpf
inner join mseg as mseg
on mkpf~MBLNR = mseg~mblnr
and mkpf~mjahr = mseg~mjahr
WHERE mkpf~budat IN budat
AND mkpf~usnam IN usnam
AND mkpf~vgart IN vgart
AND mkpf~xblnr IN xblnr
AND mkpf~zshift IN p_shift
AND mseg~bwart IN bwart
AND mseg~matnr IN matnr
AND mseg~werks IN werks
AND mseg~lgort IN lgort
AND mseg~charg IN charg
AND mseg~sobkz IN sobkz
AND mseg~lifnr IN lifnr
AND mseg~kunnr IN kunnr. -
Hi,
I have a simple query that takes a long time and sometimes hangs. I want to know if there are any orders that were shipped but are not in the ra_interface_lines_all table for one reason or another. The query is
select source_header_number from wsh_delivery_details
where inv_interfaced_flag = 'Y'
and released_status = 'C'
and oe_interfaced_flag = 'Y'
and creation_date > 'DD-MON=YYYY'
and source_header_number not in (select interface_line_attribute1 from
ra_interface_lines_all
where ship_date_actual >'DD-MON-YYYY')
Thanks
A/AFollow the thread posted to generate an execution plan. Ideally you run your statement with SQL tracing enabled and run the tkprof utility on the trace file generated as outlined in the thread.
Without further information it's just guess-work. And by the way, as already mentioned, use the TO_DATE function for DATE type literals or use the ANSI DATE literal format: DATE 'YYYY-MM-DD', otherwise you are depending on the NLS settings of the client executing the query. So:
Could you please post an properly formatted explain plan output using DBMS_XPLAN.DISPLAY including the "Predicate Information" section below the plan to provide more details regarding your statement. Please use the \[code\] and \[code\] tags to enhance readability of the output provided:
In SQL*Plus:
SET LINESIZE 130
EXPLAIN PLAN FOR <your statement>;
SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);Note that the package DBMS_XPLAN.DISPLAY is only available from 9i on.
In previous versions you could run the following in SQL*Plus (on the server) instead:
@?/rdbms/admin/utlxplsA different approach in SQL*Plus:
SET AUTOTRACE ON EXPLAIN
<run your statement>;will also show the execution plan.
In order to get a better understanding where your statement spends the time you might want to turn on SQL trace as described here:
[When your query takes too long|http://forums.oracle.com/forums/thread.jspa?threadID=501834]
and post the "tkprof" output here, too.
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/
Edited by: Randolf Geist on Sep 23, 2008 4:08 PM
Added DATE type caveat -
I updated my ipad to 7.1 this weekend. I am using the same wireless network, etc.....nothing else has changed but it takes an extremely long time to load itunes on the ipad. Everything from the store itself and the items I have purchased take anything rom 3 to 5 minutes to load.
I have reset the ipad, reset the "network" from the router to the option on the ipad.
Any other suggestions?Check App Store
1. Tap "Settings"
2. Tap "iTunes & App Stores"
3. Tap on your Apple ID
4.Tap "View Apple ID"
5. Enter your user name and password.
6. Tap "Country/Region."
7. Tap "Change Country/Region"
8. Select the country/region where you are located.
9. Tap "Done".
Note: If the change doesn't take effect, sign out of account and sign in again. -
Query optimization - Query is taking long time even there is no table scan in execution plan
Hi All,
The below query execution is taking very long time even there are all required indexes present.
Also in execution plan there is no table scan. I did a lot of research but i am unable to find a solution.
Please help, this is required very urgently. Thanks in advance. :)
WITH cte
AS (
SELECT Acc_ex1_3
FROM Acc_ex1
INNER JOIN Acc_ex5 ON (
Acc_ex1.Acc_ex1_Id = Acc_ex5.Acc_ex5_Id
AND Acc_ex1.OwnerID = Acc_ex5.OwnerID
WHERE (
cast(Acc_ex5.Acc_ex5_92 AS DATETIME) >= '12/31/2010 18:30:00'
AND cast(Acc_ex5.Acc_ex5_92 AS DATETIME) < '01/31/2014 18:30:00'
SELECT DISTINCT R.ReportsTo AS directReportingUserId
,UC.UserName AS EmpName
,UC.EmployeeCode AS EmpCode
,UEx1.Use_ex1_1 AS PortfolioCode
SELECT TOP 1 TerritoryName
FROM UserTerritoryLevelView
WHERE displayOrder = 6
AND UserId = R.ReportsTo
) AS BranchName
,GroupsNotContacted AS groupLastContact
,GroupCount AS groupTotal
FROM ReportingMembers R
INNER JOIN TeamMembers T ON (
T.OwnerID = R.OwnerID
AND T.MemberID = R.ReportsTo
AND T.ReportsTo = 1
INNER JOIN UserContact UC ON (
UC.CompanyID = R.OwnerID
AND UC.UserID = R.ReportsTo
INNER JOIN Use_ex1 UEx1 ON (
UEx1.OwnerId = R.OwnerID
AND UEx1.Use_ex1_Id = R.ReportsTo
INNER JOIN (
SELECT Accounts.AssignedTo
,count(DISTINCT Acc_ex1_3) AS GroupCount
FROM Accounts
INNER JOIN Acc_ex1 ON (
Accounts.AccountID = Acc_ex1.Acc_ex1_Id
AND Acc_ex1.Acc_ex1_3 > '0'
AND Accounts.OwnerID = 109
GROUP BY Accounts.AssignedTo
) TotalGroups ON (TotalGroups.AssignedTo = R.ReportsTo)
INNER JOIN (
SELECT Accounts.AssignedTo
,count(DISTINCT Acc_ex1_3) AS GroupsNotContacted
FROM Accounts
INNER JOIN Acc_ex1 ON (
Accounts.AccountID = Acc_ex1.Acc_ex1_Id
AND Acc_ex1.OwnerID = Accounts.OwnerID
AND Acc_ex1.Acc_ex1_3 > '0'
INNER JOIN Acc_ex5 ON (
Accounts.AccountID = Acc_ex5.Acc_ex5_Id
AND Acc_ex5.OwnerID = Accounts.OwnerID
WHERE Accounts.OwnerID = 109
AND Acc_ex1.Acc_ex1_3 NOT IN (
SELECT Acc_ex1_3
FROM cte
GROUP BY Accounts.AssignedTo
) TotalGroupsNotContacted ON (TotalGroupsNotContacted.AssignedTo = R.ReportsTo)
WHERE R.OwnerID = 109
Please mark it as an answer/helpful if you find it as useful. Thanks, Satya Prakash JugranHi All,
Thanks for the replies.
I have optimized that query to make it run in few seconds.
Here is my final query.
select ReportsTo as directReportingUserId,
UserName AS EmpName,
EmployeeCode AS EmpCode,
Use_ex1_1 AS PortfolioCode,
BranchName,
GroupInfo.groupTotal,
GroupInfo.groupLastContact,
case when exists
(select 1 from ReportingMembers RM
where RM.ReportsTo = UserInfo.ReportsTo
and RM.MemberID <> UserInfo.ReportsTo
) then 0 else UserInfo.ReportsTo end as memberid1,
(select code from Regions where ownerid=109 and name=UserInfo.BranchName) as BranchCode,
ROW_NUMBER() OVER (ORDER BY directReportingUserId) AS ROWNUMBER
FROM
(select distinct R.ReportsTo, UC.UserName, UC.EmployeeCode,UEx1.Use_ex1_1,
(select top 1 TerritoryName
from UserTerritoryLevelView
where displayOrder = 6
and UserId = R.ReportsTo) as BranchName,
Case when R.ReportsTo = Accounts.AssignedTo then Accounts.AssignedTo else 0 end as memberid1
from ReportingMembers R
INNER JOIN TeamMembers T ON (T.OwnerID = R.OwnerID AND T.MemberID = R.ReportsTo AND T.ReportsTo = 1)
inner join UserContact UC on (UC.CompanyID = R.OwnerID and UC.UserID = R.ReportsTo )
inner join Use_ex1 UEx1 on (UEx1.OwnerId = R.OwnerID and UEx1.Use_ex1_Id = R.ReportsTo)
inner join Accounts on (Accounts.OwnerID = 109 and Accounts.AssignedTo = R.ReportsTo)
union
select distinct R.ReportsTo, UC.UserName, UC.EmployeeCode,UEx1.Use_ex1_1,
(select top 1 TerritoryName
from UserTerritoryLevelView
where displayOrder = 6
and UserId = R.ReportsTo) as BranchName,
Case when R.ReportsTo = Accounts.AssignedTo then Accounts.AssignedTo else 0 end as memberid1
from ReportingMembers R
--INNER JOIN TeamMembers T ON (T.OwnerID = R.OwnerID AND T.MemberID = R.ReportsTo)
inner join UserContact UC on (UC.CompanyID = R.OwnerID and UC.UserID = R.ReportsTo)
inner join Use_ex1 UEx1 on (UEx1.OwnerId = R.OwnerID and UEx1.Use_ex1_Id = R.ReportsTo)
inner join Accounts on (Accounts.OwnerID = 109 and Accounts.AssignedTo = R.ReportsTo)
where R.MemberID = 1
) UserInfo
inner join
select directReportingUserId, sum(Groups) as groupTotal, SUM(GroupsNotContacted) as groupLastContact
from
select distinct R.ReportsTo as directReportingUserId, Acc_ex1_3 as GroupName, 1 as Groups,
case when Acc_ex5.Acc_ex5_92 between GETDATE()-365*10 and GETDATE() then 1 else 0 end as GroupsNotContacted
FROM ReportingMembers R
INNER JOIN TeamMembers T
ON (T.OwnerID = R.OwnerID AND T.MemberID = R.ReportsTo AND T.ReportsTo = 1)
inner join Accounts on (Accounts.OwnerID = 109 and Accounts.AssignedTo = R.ReportsTo)
inner join Acc_ex1 on (Acc_ex1.OwnerID = 109 and Acc_ex1.Acc_ex1_Id = Accounts.AccountID and Acc_ex1.Acc_ex1_3 > '0')
inner join Acc_ex5 on (Acc_ex5.OwnerID = 109 and Acc_ex5.Acc_ex5_Id = Accounts.AccountID )
--where TerritoryID in ( select ChildRegionID RegionID from RegionWithSubRegions where OwnerID =109 and RegionID = 729)
union
select distinct R.ReportsTo as directReportingUserId, Acc_ex1_3 as GroupName, 1 as Groups,
case when Acc_ex5.Acc_ex5_92 between GETDATE()-365*10 and GETDATE() then 1 else 0 end as GroupsNotContacted
FROM ReportingMembers R
INNER JOIN TeamMembers T
ON (T.OwnerID = R.OwnerID AND T.MemberID = R.ReportsTo)
inner join Accounts on (Accounts.OwnerID = 109 and Accounts.AssignedTo = R.ReportsTo)
inner join Acc_ex1 on (Acc_ex1.OwnerID = 109 and Acc_ex1.Acc_ex1_Id = Accounts.AccountID and Acc_ex1.Acc_ex1_3 > '0')
inner join Acc_ex5 on (Acc_ex5.OwnerID = 109 and Acc_ex5.Acc_ex5_Id = Accounts.AccountID )
--where TerritoryID in ( select ChildRegionID RegionID from RegionWithSubRegions where OwnerID =109 and RegionID = 729)
where R.MemberID = 1
) GroupWiseInfo
group by directReportingUserId
) GroupInfo
on UserInfo.ReportsTo = GroupInfo.directReportingUserId
Please mark it as an answer/helpful if you find it as useful. Thanks, Satya Prakash Jugran -
Takes a long time when waiting for plsq: package_name. while editing
Hallo,
in APPS-Environment we have over 30.000 Packages. When editing plsql code
an trying to write a package.function call , sql-developer tries to display the available functions and procedures for the given package after typing the "DOT" and display that. That takes very long. What's happen ?
Regards
UweIt's loading the code insight. Since you have such a large number of objects you may want to turn this off.
sqldeveloper -J-Dsdev.insight=false
-kris -
Report query takes a long time
Hi,
The following query has been running for almost half an hour.
What am I doing wrong?
Thanks for any help.
A/A
Code
SELECT msi.segment1 item_number
,msi.inventory_item_id
,msi.organization_id
,msi.description description
,(get_trns_quantity(msi.inventory_item_id,msi.organization_id)
- GET_DEVIATED_QUANTITY(msi.inventory_item_id,msi.organization_id)) current_inventory
,get_committed_quantity(msi.inventory_item_id,msi.organization_id) quantity_reserved
,inventory_level
,((inventory_level + get_committed_quantity(msi.inventory_item_id,msi.organization_id)
-(get_trns_quantity(msi.inventory_item_id,msi.organization_id)))
+ GET_DEVIATED_QUANTITY(msi.inventory_item_id,msi.organization_id)) prod_needs
,get_today_quantity( msi.inventory_item_id,msi.organization_id ) Today
, nil.no_of_weeks no_of_weeks
FROM mtl_system_items_b msi
, nfpc_inventory_level nil
WHERE
--oola.ordered_item_id = msi.inventory_item_id
msi.item_type='FG'
AND msi.lot_control_code = 2
AND msi.inventory_item_status_code = 'Active'
AND msi.organization_id = 221 --:P_ORGANIZATION_ID
AND nil.inventory_item_id (+) = msi.inventory_item_id
AND nil.organization_id (+) = msi.organization_id
AND (get_trns_quantity(msi.inventory_item_id,msi.organization_id) <> 0
OR get_committed_quantity(msi.inventory_item_id,msi.organization_id) <> 0
OR (inventory_level + get_committed_quantity(msi.inventory_item_id,msi.organization_id)
-(get_trns_quantity(msi.inventory_item_id,msi.organization_id))) <> 0
ORDER BY msi.segment1
Edited by: asgar_amin on Mar 4, 2009 12:35 PMThanks for your response guys. I got it working. It takes only two minutes now.
I have another question though.
How do I incorporate some date changes in the report. I have to subtract one day from the 'REQUEST_DATE' if the request date falls on a Saturday, two days if it falls on a Sunday and three days if it falls on a Monday.
How do I incorporate these changes in the report. -
Power on takes a long time!
My system config is as follows;
Based on 0769-DAQ: T2310(1.46GHz), 512MB RAM, 120GB 5400rpm HD, 15.4in 1280x800 LCD, Intel X3100, CDRW/DVDRW, Intel 802.11abg wireless, Bluetooth, Modem, 10/100 Ethernet, UltraNav, Secure chip, Camera, 6c Li-Ion, WinXP SP3.
The problem is that when I press the Power-on button to switch the Notebook on, the power LED comes on and goes off after 5 secs. When I do it the second time, LED comes on and it takes the system to come up with Lenovo screen more than 2-3 mins. Especially it happens in a cold start. AFter that the booting and the system performance is absolutely fine.
Can anybody help me get over this nagging issue (3 moonths old)? Please.....
thanks in advance,
Vinaysounds like power button or cord is defective.
it's better you to call lenovo support line for possible hardware replacement. -
CUCM 9.1.2 DRS backup takes extremely long time to complete
Anybody else noticed that DRS backups from CUCM 9.1.2 to a Windows SFTP server (ex: OpenSSH) takes up to 6-7 hours to complete?
Backup to a Linux SFTP server runs fine.
All backup worked fine on Windows or Linux with CUCM 9.1.1.Hi Sebastien,
Can you try taking the backup on a machine in the same subnet as cucm and see if the issue persists? Have you tried restarting the DRF MA and LA services yet? Openssh is one of the supported options for DRS backup so you can engage TAC if the issue persists. -
Hi All,
Working in EBS Version 11.5.10.2
The below query takes a long time, Please i need some help in this issue
select ood.organization_name
,to_char(cd.transaction_date,'RRRR/MM/DD HH24:MI:SS') trx_date
,gcc.segment1||'.'||gcc.segment2||'.'||gcc.segment3||'.'||gcc.segment4||'.'||gcc.segment5||'.'||gcc.segment6||'.'||gcc.segment7 account
,cd.base_transaction_value
,decode(transaction_type_name,
'Resource transaction',resource_code,
'WIP Assy Completion', (select msi.segment1 from mtl_system_items_b msi where msi.inventory_item_id = cd.primary_item_id and msi.organization_id = cd.organization_id)
,(select msi.segment1 from mtl_system_items_b msi where msi.inventory_item_id = cd.inventory_item_id and msi.organization_id = cd.organization_id)
) item_sub_element
,cd.transaction_type_name
,cd.operation_seq_num
,cd.department_code
,cd.resource_seq_num
,cd.subinventory_code
,cd.line_type_name accounting_type
,cd.primary_uom
,cd.primary_quantity
,cd.wip_entity_name job
,cd.basis
,cd.line_id line
,(select wsg.schedule_group_name from wip_schedule_groups wsg
where wsg.schedule_group_id = wdj.schedule_group_id
and wsg.organization_id = wdj.organization_id
) schedule_group_name
,(select msib.segment1 from mtl_system_items_b msib
where msib.inventory_item_id = wdj.primary_item_id
and msib.organization_id = wdj.organization_id
) assembly
,decode(wdj.status_type,3,'Released',4,'Complete',6,'On-Hold',14,'Pending Close',15,'Failed Close',12,'Closed') job_status
,wdj.date_released
,wdj.date_completed job_completion_date
,wdj.date_closed job_closed_date
,decode(wdj.job_type,1,'Standard',3,'Non-Standard') job_type
,wdj.class_code job_class
,cd.reason_name
,cd.reference
from cst_distribution_v cd
,org_organization_definitions ood
,gl_code_combinations gcc
,wip_discrete_jobs wdj
where cd.organization_id = ood.organization_id
and cd.reference_account = gcc.code_combination_id
and cd.wip_entity_id = wdj.wip_entity_id
and cd.organization_id = wdj.organization_id
and cd.transaction_date between to_date(fdate, 'RRRR/MM/DD HH24:MI:SS') and to_date(tdate, 'RRRR/MM/DD HH24:MI:SS')
and cd.organization_id = nvl(p_org_id, cd.organization_id)
Regards
VijayThanks Pravin,
You are right,but after created the function based
index also it is going for FTS.
for example ,i created this sample table.
create index pp_idx1 on pp(substr(mobile_no,-10,4))
My DB Version :- 10.2
Optimizer_mode=FIRST_ROWS
If you can help me.
Thanks,
ChitrasenInstead of:
select * from <table_name> where substr(called_calling_no,-10,4)=9904;Try to stay with the same datatype. Don't rely in implizit type conversions.
select * from <table_name> where substr(called_calling_no,-10,4)='9904'; -
Migration of Microsoft SQL Server 7.0 Takes A Long Time
I just installed Migration Workbench yesterday and tried to run
it. It seems take a long time trying to load source tables.
(Almost 6-7 hours!) But no error message showed up. I finally had
to cancel it. Is it normal? Please advice.
- Brian Luo
nullThanks, that definitely would help.
- Brian
Oracle Migration Workbench Team wrote:
: Hi Brian,
: The full production version will be available on the 8.1.6
: release 2 CD early next year.
: The release that is downloadable now from Technet is very close
: to production. We have a number of customers who have already
: completed full migrations with this release. If you encounter
any
: issues please foward them on and we will deal with them asap.
: By the way, for our next release we have added a check into the
: SQL Server 6.5 and SQL Server 7.0 plugin that checks what
version
: of SQL Server you are connecting to. It will report an error if
: you are connecting to an incompatible version. I guess this
would
: have saved you some time.
: Regards
: John
: Brian Luo (guest) wrote:
: : Thanks for your response. I was using 1.2.2.2 to migrate a
SQL
: : Server 7.0 schema. But I found in this thread that it only
: : supports migration from SQL Server 6.5. I just downloaded the
: : beta version of Migration Workbench 1.2.4. It seems to be
: : working. I wonder when the official version that supports SQL
: : Server 7.0 will be available?
: : - Brian
: : Oracle Migration Workbench Team wrote:
: : : Hi Brian,
: : : This is not normal behavior. Unless the schema you are
trying
: : to
: : : migrate is huge e.g. hundreds of tables and stored
: procedures,
: : : the workbench should be able to load it un under 1 hour.
: : : Does your schema have a lot of stored procedures and
tables?
: : : Are you using any foreign character sets?
: : : Regards
: : : John
: : : Brian Luo (guest) wrote:
: : : : I just installed Migration Workbench yesterday and tried
to
: : run
: : : : it. It seems take a long time trying to load source
tables.
: : : : (Almost 6-7 hours!) But no error message showed up. I
: finally
: : : had
: : : : to cancel it. Is it normal? Please advice.
: : : : - Brian Luo
: : : Oracle Technology Network
: : : http://technet.oracle.com
: Oracle Technology Network
: http://technet.oracle.com
null
Maybe you are looking for
-
Status of coreapplication_obips1 is STOP
Hi all, Trying to start coreapplication_obips1 component but I was unable to do it. When I boot up my machine, the initial status of opmn is: C:\Oracle\Middleware\instances\instance1\bin>opmnctl status Processes in Instance: instance1new ------------
-
Nano "iPod service error" cured...?
I had to set up a Nano for a client, and he was having the same issues everyone else has been having (service errors, not recognized in iTunes, etc.) Here's what I did to get it to work (after 3 hours of troubleshooting)(by the way, this was posted i
-
Hi all, Please let me know the process to track or find all the SAP Standard and custom objects. that got changed from a specific point of time. Is there any function module or any table where this change log is maintained.? I just only need the deta
-
Hi there, I have been trying to rename some files and it became a mess. I undone it, and now i could use some help please I am tired of trying things myself. And i am certainly not a hero when it comes to anything with programs. I have a directory wi
-
I forgot my passcode to my iPad. How do I recover it?
I forgot my passcode to my iPad. How do I recover it?