How can we rewrite this query for better performance
Hi All,
The below query is taking more time to run. Any ideas how to improve the performance by rewriting the query using NOT EXITS or any other way...
Help Appreciated.
/* Formatted on 2012/04/25 18:00 (Formatter Plus v4.8.8) */
SELECT vendor_id
FROM po_vendors
WHERE end_date_active IS NULL
AND enabled_flag = 'Y'
and vendor_id NOT IN ( /* Formatted on 2012/04/25 18:25 (Formatter Plus v4.8.8) */
SELECT vendor_id
FROM po_headers_all
WHERE TO_DATE (creation_date) BETWEEN TO_DATE (SYSDATE - 365)
AND TO_DATE (SYSDATE))
Thanks
Try this one :
This will help you for partial fetching of data
SELECT /*+ first_rows(50) no_cpu_costing */
vendor_id
FROM po_vendors
WHERE end_date_active IS NULL
AND enabled_flag = 'Y'
AND vendor_id NOT IN (
SELECT vendor_id
FROM po_headers_all
WHERE TO_DATE (creation_date) BETWEEN TO_DATE (SYSDATE - 365)
AND TO_DATE (SYSDATE))
overall your query is also fine, because, the in this query the subquery always contain less data compare to main query.
Similar Messages
-
Please help to modifiy this query for better performance
Please help to rewrite this query for better performance. This is taking long time to execute.
Table t_t_bil_bil_cycle_change contains 1200000 rows and table t_acctnumberTab countains 200000 rows.
I have created index on ACCOUNT_ID
Query is shown below
update rbabu.t_t_bil_bil_cycle_change a
set account_number =
( select distinct b.account_number
from rbabu.t_acctnumberTab b
where a.account_id = b.account_id
Table structure is shown below
SQL> DESC t_acctnumberTab;
Name Type Nullable Default Comments
ACCOUNT_ID NUMBER(10)
ACCOUNT_NUMBER VARCHAR2(24)
SQL> DESC t_t_bil_bil_cycle_change;
Name Type Nullable Default Comments
ACCOUNT_ID NUMBER(10)
ACCOUNT_NUMBER VARCHAR2(24) YIshan's solution is good. I would avoid updating rows which already have the right value - it's a waste of time.
You should have a UNIQUE or PRIMARY KEY constraint on t_acctnumberTab.account_id
merge rbabu.t_t_bil_bil_cycle_change a
using
( select distinct account_number, account_id
from rbabu.t_acctnumberTab
) t
on ( a.account_id = b.account_id
and decode(a.account_number, b.account_number, 0, 1) = 1
when matched then
update set a.account_number = b.account_number -
How can I rewrite this update stmt to improve its poor performance?
Hi,
I have the following update stmt that runs for over 6 hours. Here is the SQL and its plan:
UPDATE TABLE1
SET mainveh = 'Y'
WHERE (comp#,polnum,a8dtef,a8deef,a8dtac,
DECODE(everif,'Y',10000,0)+auunit*100+vrcdsq)
IN (SELECT comp#,polnum,a8dtef,a8deef,a8dtac,
MAX(DECODE(everif,'Y',10000,0)+auunit*100+vrcdsq)
FROM TABLE1
GROUP BY comp#,polnum,a8dtef,a8deef,a8dtac);
PLAN_TABLE_OUTPUT
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)|
| 0 | UPDATE STATEMENT | | 1 | 108 | | 798K (1)|
| 1 | UPDATE | TABLE1 | | | | |
| 2 | HASH JOIN | | 1 | 108 | 1079M| 798K (1)|
| 3 | TABLE ACCESS FULL | TABLE1 | 21M| 834M| | 224K (1)|
| 4 | VIEW | VW_NSO_1 | 21M| 1364M| | 440K (1)|
| 5 | SORT GROUP BY | | 21M| 794M| 2453M| 440K (1)|
| 6 | TABLE ACCESS FULL| TABLE1 | 21M| 794M| | 224K (1)|I'm using Oracle 10.2.0.3. The TABLE1 table has 21 million rows. The update stmt will update about 15 million rows. How can I rewrite this update stmt so it'll perform better? There is a primary index on all the columns selected in the subquery. That is the only index on TABLE1.
Thank you!
Edited by: user6053424 on Jul 21, 2010 6:59 AMHi,
Thank you for your suggestions. There is an index on the columns in the group by, it is the PK index on TABLE1. I'm suspecting that due to the amount of data to update, the optimizer decided that full table scan is cheaper than index scan. I'm very interested in the GTT idea, but still need some help if I decide to create a GTT from the subquery, because if I just do this:
create global temporary table table1_tmp
on commit preserve rows
as SELECT comp#,polnum,a8dtef,a8deef,a8dtac,
MAX(DECODE(everif,'Y',10000,0)+auunit*100+vrcdsq)
FROM TABLE1
GROUP BY comp#,polnum,a8dtef,a8deef,a8dtac;then the original update stmt still has the DECODE and such in it, I'm not sure how much benefit that'll do to us:
UPDATE TABLE1
SET mainveh = 'Y'
WHERE (comp#,polnum,a8dtef,a8deef,a8dtac,
DECODE(everif,'Y',10000,0)+auunit*100+vrcdsq)
IN (SELECT comp#,polnum,a8dtef,a8deef,a8dtac,???
FROM TABLE1);Your input is greatly appreciated! Thanks! -
How can i improve this query.
Hi guys i am beginner , just wanted to know some info , how can i improve this query ..
select *
from tableA A, viewB B,
where A.key = B.key
and a.criteria1 = '111'
and a.criteria2 = some_funtion(a.key)
one more thing should function should be on left side of equal sign.
will a join make it better or something else is needed more than that .952936 wrote:
Hi guys i am beginner , just wanted to know some info , how can i improve this query ..
select *
from tableA A, viewB B,
where A.key = B.key
and a.criteria1 = '111'
and a.criteria2 = some_funtion(a.key)
one more thing should function should be on left side of equal sign.
will a join make it better or something else is needed more than that .If you are a beginner try to learn the ANSI Syntax. This will help you a lot to write better queries.
Your select would look like this in ANSI.
select *
from tableA A
JOIN viewB B ON A.key = B.key
WHERE a.criteria1 = '111'
and a.criteria2 = some_function(a.key);The good thing here is that this separates the typical joining part of the select from the typical filter criteria.
The other syntax very often let you forget one join. Just because there are so many tables and so many filters, that you just don't notice correctly anymore what was join and what not.
If you notice that the number of column is not what you expect, you can easiely modify the query and compare the results.
example A
Remove View B from the query (temporarily comment it out).
select *
from tableA A
--JOIN viewB B ON A.key = B.key
WHERE a.criteria1 = '111'
and a.criteria2 = some_funtion(a.key)
example B
You notice, that values from A are missing. Maybe because there is no matching key in ViewB? Then change the join to an outer join.
select *
from tableA A
LEFT OUTER JOIN viewB B ON A.key = B.key
WHERE a.criteria1 = '111'
and a.criteria2 = some_funtion(a.key)(The outer keyword is optional, left join would be enough). -
How can i rewrite this code into java?
How can i rewrite this code into a java that has a return value?
this code is written in vb6
Private Function IsOdd(pintNumberIn) As Boolean
If (pintNumberIn Mod 2) = 0 Then
IsOdd = False
Else
IsOdd = True
End If
End Function
Private Sub cmdTryIt_Click()
Dim intNumIn As Integer
Dim blnNumIsOdd As Boolean
intNumIn = Val(InputBox("Enter a number:", "IsOdd Test"))
blnNumIsOdd = IsOdd(intNumIn)
If blnNumIsOdd Then
Print "The number that you entered is odd."
Else
Print "The number that you entered is not odd."
End If
End Sub873221 wrote:
I'm sorry I'am New to Java.Are you new to communication? You don't have to know anything at all about Java to know that "I have an error," doesn't say anything useful.
I'm just trying to get you to think about what your post actually says, and what others will take from it.
what does this error mean? what code should i replace and add? thanks for all response
C:\EvenOdd.java:31: isOdd(int) in EvenOdd cannot be applied to ()
isOdd()=true;
^
C:\EvenOdd.java:35: isOdd(int) in EvenOdd cannot be applied to ()
isOdd()=false;
^
2 errors
Telling you "what code to change it to" will not help you at all. You need to learn Java, read the error message, and think about what it says.
It's telling you exactly what is wrong. At line 31 of EvenOdd.java, you're calling isOdd(), with no arguments, but the isOdd() method requires an int argument. If you stop ant think about it, that should make perfect sense. How can you ask "is it odd?" without specifying what "it" is?
So what is this all about? Is this homework? You googled for even odd, found a solution in some other language, and now you're just trying to translate it to Java rather than actually learning Java well enough to simply write this trivial code yourself? -
Can anyone tell me how can i optimize this query...
Can anyone tell me how can i optimize this query ??? :
Select Distinct eopersona.numident From rscompeten , rscompet , rscv , eopersona , rscurso , rseduca , rsexplab , rsinteres
Where ( ( (LOWER (rscompeten.nombre LIKE '%caracas%') AND ( rscompeten.id = rscompet.idcompeten ) AND ( rscv.id = rscompet.idcv ) AND ( eopersona.id = rscv.idpersona ) )
OR ( (LOWER (rscurso.nombre) LIKE '%caracas%') AND ( rscv.id = rscurso.idcv ) AND ( eopersona.id = rscv.idpersona ) )
OR ( (LOWER (rscurso.lugar) LIKE '%caracas%') AND ( rscv.id = rscurso.idcv ) AND ( eopersona.id = rscv.idpersona ) )
OR ( (LOWER (rseduca.univinst) LIKE '%caracas%)' AND ( rscv.id = rseduca.idcv ) AND ( eopersona.id = rscv.idpersona ) )
OR ( (LOWER (rsexplab.nombempre) LIKE '%caracas%' AND ( rscv.id = rsexplab.idcv ) AND ( eopersona.id = rscv.idpersona ) )
OR ( (LOWER (rsinteres.descrip) LIKE '%caracas%' AND ( rscv.id = rsinteres.idcv ) AND ( eopersona.id = rscv.idpersona ) )
OR ( (LOWER (rscv.cargoasp) LIKE '%caracas%' AND ( eopersona.id = rscv.idpersona ) )
OR ( LOWER (eopersona.ciudad) LIKE '%caracas%' AND ( eopersona.id = rscv.idpersona )
PLEASE IF YOU FIND SOMETHING WRONG.. PLEASE HELP ME.. this query takes me aproximatelly 10 minutes and the database is really small ( with only 200 records on each table )You are querying eight tables, however in any of your OR predicates you're only restricting 3 or 4 of those tables. That means that the remaining 4 or 5 tables are generating cartesian products. (n.b. the cartesian product of 5 tables with 200 rows each results in g 200^5 = 320,000,000,000 rows) Then you casually hide this behind "distinct".
A simple restatement of your requirements looks like this:
Select eopersona.numident
From rscompeten,
rscompet,
rscv,
eopersona
Where LOWER (rscompeten.nombre) LIKE '%caracas%'
AND rscompeten.id = rscompet.idcompeten
AND rscv.id = rscompet.idcv
AND eopersona.id = rscv.idpersona
UNION
Select eopersona.numident
From rscurso ,
rscv,
eopersona
Where LOWER (rscurso.nombre) LIKE '%caracas%'
AND rscv.id = rscurso.idcv
AND eopersona.id = rscv.idpersona
UNION
Select eopersona.numident
From rscurso ,
rscv,
eopersona
Where LOWER (rscurso.lugar) LIKE '%caracas%'
AND rscv.id = rscurso.idcv
AND eopersona.id = rscv.idpersona
UNION
...From there you can eliminate redundancies as desired, but I imagine that the above will perform admirably with the data volumes you describe. -
Tunning sql sub query for better performance
I have been given the task to tune this query for better execution as presently it take a very long time execute i will appreciate if someone can help.
Thank you.
SELECT a.fid_trx_no, a.fid_seq_no,a.bcc_customer_account,
a.bcc_msid,a.fid_trx_date,a.fid_trx_type,
a.fid_trx_initial_amount,a.fid_trx_fidodollar_amount
FROM
SPOT.SPOT_FIDODOLLAR_TRX a
WHERE
a.fid_trx_status = 'PE' AND a.fid_seq_no =
(SELECT MAX(c.fid_seq_no) FROM SPOT.SPOT_FIDODOLLAR_TRX c WHERE c.fid_trx_no = a.fid_trx_no) AND
a.FID_TRX_DATE <
(SELECT MAX(b.FID_TRX_DATE) FROM SPOT.SPOT_FIDODOLLAR_TRX b wHERE
b.bcc_customer_account = a.bcc_customer_account AND fid_trx_type IN
(SELECT par_code FROM SPOT.spot_parameter where par_value=:vAccountType AND par_type='FC')
)Rob...
so many times you post this link.. i think that Oracle should put this link in an obvious place....!!!
Greetings,
Sim -
Dear Sir/Madam
I am trying to update Ios7 for iPhone 4 but there is an unknown error occurred like (-23). My Laptop OS is Windows 08.ios 7 update which can updated and remaining 30minutes are left out. Than after error which can be show as i have mentioned above.
How can i resolved this error? So please help me.
Thanks & Regards,
Vatsal DesaiError 20, 21, 23, 26, 28, 29, 34, 36, 37, 40
These errors typically occur when security software interferes with the restore and update process. Use the steps to troubleshoot security software issues to resolve this issue. In rare cases, these errors may be a hardware issue. If the errors persist on another computer, the device may need service.
Also, check your hosts file to verify that it's not blocking iTunes from communicating with the update server. See the steps under the heading "Blocked by configuration (Mac OS X / Windows) > Rebuild network information > Mac OS X > The hosts file may also be blocking the iTunes Store." If you have software used to perform unauthorized modifications to the iOS device, uninstall this software prior to editing the hosts file to prevent that software from automatically modifying the hosts file again on restart.
all of this from
iTunes: Specific update-and-restore error messages and advanced troubleshooting -
Can u any imrove this query for maximum performance
select g_com_bu_entity bunt_entity
, g_com_rep_cd srep_cd
, effdt from_dt
, eff_status
, g_com_role role
, g_com_pgm prgm
, g_com_district district
, g_com_draw_status draw_status
, decode(g_com_primary_pgm, 'Y',1, 0) pri_prgm_flag
FROM ps_g_com_assign_vw@commissions c1
WHERE effdt =
(SELECT MAX (effdt)
FROM ps_g_com_assign_vw@commissions c2
WHERE c1.g_com_bu_entity = c2.g_com_bu_entity
AND c1.g_com_rep_cd = c2.g_com_rep_cd);
can anyone make it as regular query for maximum performance
Thanks,
SreekanthHi Sreekant,
Try this: If it helps
select g_com_bu_entity bunt_entity
, g_com_rep_cd srep_cd
, effdt from_dt
, eff_status
, g_com_role role
, g_com_pgm prgm
, g_com_district district
, g_com_draw_status draw_status
, decode(g_com_primary_pgm, 'Y',1, 0) pri_prgm_flag
FROM ps_g_com_assign_vw@commissions c1,
(SELECT MAX (effdt) effdt_max
FROM ps_g_com_assign_vw@commissions c2
WHERE c1.g_com_bu_entity = c2.g_com_bu_entity
AND c1.g_com_rep_cd = c2.g_com_rep_cd) t2
WHERE effdt = t2.effdt_max; -
How can i run this query in BI Answers
Hi,
pls tell me how can i run this sql statement in BI Answers....???
select abc_date,abc_asset_desc,sum(nvl(abc_market_val_lcy,0)+nvl(abc_accr_lcy,0)) "total balance" from abc
group by abc_date,abc_asset_desc;any help would be appriciated.... :-)
RegardsStrange question this one.
normally with Answers you pick the columns you want to report on and the BI server will construct the SQL for you.
In this example you would need a star with the abc dimension logical table and a logical fact for abc (these can be in the same table), which has a calculated field for 'Total Balance'.
You then pick the columns you require and Answer and the BI will automatically add the group by.
Adrian
Majendi -
How can i make this query run for a form
This query works fine for a sql report
SELECT *
FROM STUDENTS
WHERE given_name||' '||family_name = :P101_USERNAME
AND password = :P101_PASSWORD;
But i want it to do the same thing for a form but i dont have the option like i do for the report where i can just apply the condition to the process.
Anyone any ideas how i could do this so that when i go to the form this information is already there based on the username and password from the previous page?Assuming that page 101 is your login form, just lookup the primary key of the student based on the values presented in the login page fields, then set and pass this value to the form page.
So you would create a process that runs near the very end of the the login processes on page 101, something like this:
declare
l_student_id students.student_id%TYPE;
begin
select student_id into l_student_id from students where given_name||' '||family_name = :P101_USERNAME and password = :P101_PASSWORD;
-- then set the value of your form page primary key field
:P1_STUDENT_ID := l_student_id;
end;I've done something similar and it works fine for me, although I haven't looked at it recently.
Earl -
How can i write sql query for this result ?
Hello Dear,
Here is the script first.
CREATE TABLE ACC_TEST(
AD_ID NUMBER,
AD_NAME VARCHAR2(50),
AD_SPM_ID NUMBER);
/data are
Insert into ACC_TEST (AD_ID,AD_NAME,AD_SPM_ID) values (136,'Saleh Ahmed',129);
Insert into ACC_TEST (AD_ID,AD_NAME,AD_SPM_ID) values (142,'Hamidur Rahman',136);
Insert into ACC_TEST (AD_ID,AD_NAME,AD_SPM_ID) values (124,'Jasim Uddin',null);
INSERT INTO ACC_TEST (AD_ID,AD_NAME,AD_SPM_ID) VALUES (129,'Sazib',124);I Need The Following Result When I Pass A Value Of Ad_Id. For Example I Pass 142 Then Result Should Be
Select Ad_Id,Ad_Name
From..
where ad_id=142
Ad_Id Ad_Name
136 Saleh Ahmed
129 Sazib
124 Jasim Uddin
If I Pass Ad_Id=136 Then Result Should Be
Ad_Id Ad_Name
129 Sazib
124 Jasim Uddin
If I Pass Ad_Id=129 Then Result Should Be
Ad_Id Ad_Name
124 Jasim Uddin Database 10G XE
Any help will be helpfulHi,
HamidHelal wrote:
WoW ! you acutely got my point. How did you understand that ? lLuck guess. Guessing is usually not the best way to solve problems. It's usually faster and more reliable to say exactly what you want, as well as give an example.
ittle bit more i want to know, if i want to restrict the output not more then 2, what would be sql ?Now you're not even giviing an example!
Maybe you want something like this:
SELECT ad_id
, ad_name
FROM acc_test
WHERE LEVEL BETWEEN 2 AND 3 -- Changed
START WITH ad_id = :target_ad_id
CONNECT BY ad_id = PRIOR ad_spm_id
;which will show jsut the parent and the grandparent of the given row.
I do work with forms developer very much. Sql knowledge is as oracle sql book(cerfitication 9i). But this type of sql isn't available there.
where can i learn this type of sql ? Different sql then ordinary ?Certification is a different topic entirely.
There are books and web sites dealing with more advanced techniques. Sorry, I don't know any well enough to recommend them. Some authors (such as Tom Kyte) are consistently good.
Here are a couple of sites that explain CONNECT BY queries:
http://www.adp-gmbh.ch/ora/sql/connect_by.html
http://www.oradev.com/connect_by.jsp -
How can i construct this query without using CASE statement?
I've a following code. I'm using this script in Hibernet. So, i cannot use CASE there. Because, hibernet doesn't support case in select statement. How can i construct the same thing which will give me the same result without using CASE?
SELECT ofc.FLT_LCL_ORIG_DT
, ofc.CARR_IATA_CD
, ofc.FLT_NBR
, ofc.ORIG_ARPT_CD
, ofc.DEST_ARPT_CD
, sum( ofc.CNCT_PSGR_CNT) AS BOOKED_CNCT_PSGR_CNT
, sum( CASE WHEN o.fsdr_mrkt_cd = 'D' AND d.fsdr_mrkt_cd = 'D' THEN '0'
ELSE to_char(ofc.CNCT_PSGR_CNT,'99') END ) AS BOOKED_INTL_CNCT_PSGR_CNT
, sum(CASE WHEN o.fsdr_mrkt_cd||d.fsdr_mrkt_cd = 'DD'
THEN '0'
ELSE to_char(ofc.CNCT_PSGR_CNT,'99')
END) AS NEW_BCNT
FROM OPS_FLT_CNCT ofc
, STN o
, STN d
WHERE ofc.CNCT_ORIG_ARPT_CD = o.STN_CD
AND ofc.CNCT_DEST_ARPT_CD = d.STN_CD
-- AND TRUNC(ofc.FLT_LCL_ORIG_DT) = trunc(to_date('22-MAY-2007','DD-MON-YYYY'))
AND ofc.CARR_IATA_CD = 'UA'
AND ofc.FLT_NBR = '1218'
AND ofc.ORIG_ARPT_CD = upper('DEN') AND ofc.DEST_ARPT_CD = upper('IAD') GROUP BY ofc.FLT_LCL_ORIG_DT
, ofc.CARR_IATA_CD
, ofc.FLT_NBR
, ofc.ORIG_ARPT_CD
, ofc.DEST_ARPT_CD ;And, the output look like this --
FLT_LCL_O CARR FLT_N ORI DES BOOKED_CNCT_PSGR_CNT BOOKED_INTL_CNCT_PSGR_CNT NEW_BCNT
22-MAY-07 UA 1218 DEN IAD 9 0 0
23-MAY-07 UA 1218 DEN IAD 1 0 0
24-MAY-07 UA 1218 DEN IAD 2 1 1
25-MAY-07 UA 1218 DEN IAD 1 0 0Thnaks in advance for reply.
Regards.
Satyaki De.
#####2 ideas:
1. Inline function to perform the CASE funcionaltity for you
2. Piplelined function to generate the entire dataset
Both will be slower than just using CASE in a query, but we're working around big constraints -
How can i use this color for my Application Background ?? Screen Shot Attached
Hi ,
I can find only plain colors on to Color Picker , but this is line mixed color
How can use this attached Color for my Applications Background Color .
Please find the Screen Shot attached .
please see the background colorAre you trying to apply a gradient background?
In Flex 3 in Application tag:
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
backgroundColor="#666666"
backgroundGradientColors="[#333333, #666666]">
</mx:Application>
In Flex 4 you need to set the backgroundColor and apply a skin for the gradient:
-------------- mySkins/MyAppSkin.mxml -------------
<?xml version="1.0" encoding="utf-8"?>
<!-- containers\application\mySkins\MyAppSkin.mxml -->
<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark">
<fx:Metadata>
[HostComponent("spark.components.Application")]
</fx:Metadata>
<s:states>
<s:State name="normal" />
<s:State name="disabled" />
</s:states>
<!-- fill -->
<s:Rect id="backgroundRect" left="0" right="0" top="0" bottom="0">
<s:fill>
<s:LinearGradient rotation="90">
<s:entries>
<s:GradientEntry color="0x333333" ratio="0" alpha="1"/>
<s:GradientEntry color="0x666666" ratio=".66" alpha="1"/>
</s:entries>
</s:LinearGradient>
</s:fill>
</s:Rect>
<s:Group id="contentGroup" left="10" right="10" top="10" bottom="10">
<s:layout>
<s:VerticalLayout/>
</s:layout>
</s:Group>
</s:Skin>
-------------- test.mxml -------------
<?xml version="1.0"?>
<!-- controls\button\PopUpButtonMenu.mxml -->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
height="100%" width="100%">
<s:SkinnableContainer skinClass="mySkins.MyAppSkin"
width="100%" height="100%"/>
</s:Application>
If this post answers your question or helps, please mark it as such. Thanks!
http://www.chikaradev.com
Adobe Flex Development and Support Services -
How can i tune this query?
Removed the post because of a major logical flaw. Thanks to Boneist for his great idea.
Edited by: user10633418 on Nov 20, 2008 3:21 AMI think I would try rewriting the query to turn the exists clauses into full joins, like:
SELECT mph.MANIF_NBR AS A1,
mph.SHPR_ID AS A5,
mph.MANIF_TYPE AS A4,
mph.LOAD_NBR AS A21,
mph.STAT_CODE AS A7,
mph.CLOSE_DATE AS A10,
mph.SHIP_DATE_TIME AS A24,
mph.UPS_PIKUP_NBR AS A9,
mph.WHSE AS A2,
mph.PIKUP_REC_NBR AS A8,
manh_carr_type_for_manif_nbr(mph.WHSE,mpc.MANIF_NBR) AS A26,
mph.UPS_PLD_UPLOAD_INDIC AS A28,
'PARCELMANIF_CD' AS A29
FROM MANIF_PARCL_HDR mph,
MANIF_PARCL_CARTON mpc,
PARCL_SHPMT ps
WHERE mph.MANIF_NBR = mpc.MANIF_NBR
AND mph.MANIF_NBR = ps.MANIF_NBR
AND mph.WHSE = 'HAN'
AND ps.CD_MASTER_ID IN (1001)
ORDER BY MANIF_PARCL_HDR.MANIF_NBR ASC,
MANIF_PARCL_HDR.MANIF_TYPE ASCand then compare how fast that runs and what the explain plan is, etc.
Maybe you are looking for
-
Block creation of PO when no order is needed
Hi Expert, Do we able to block PO when the material that we order is sufficient enough, no order is needed. Thanks, Pauline
-
IP Address Assignment on VPN Concentrator through AD
Is it possible to assign an IP address on a per-user basis using Active Directory as your authentication method for a group within the 3000 series VPN Concentrator? I know this can be done with ACS/RADIUS, but I do not see any documentation on how th
-
Please help me tuning this query...
Hi all, Can any body suggest some changes (synthatic) so that it can improve its performance... taking too much time... This is a query used in oracle report... SELECT distinct cc.seg1,cc.seg2,cc.seg3,cc.seg4,cc.seg5,cc.seg6,cc.seg7,cc.seg8,cc.code_
-
Automatic start up since Leopard installation
Since installation of Leopard my MacBook has begun automatically starting up at 8:00 PM. My preferences has no check mark for start up at this time. Now that daylight saving time is over it has begun starting up at 7:00 PM. I don't like the idea of i
-
OCFO doesn't display appointments from the past
Hi. We're using Outlook 2003 with the connector. But the connector doesn't show my appointments from the past since i installed Outlook 2003 with the connector. My appointments are in the calendar because I can see them in the webclient. Can somebody