Execute query run fine with numeric data not give result on string data
Hi master
Sir I use under blow code for execute query
sir when I use numeric data then run fine but when I use character data then not give any result
with numeric run fine
DECLARE
DD VARCHAR2(15);
BEGIN
DD:=10;
set_block_property('emp', default_where, 'where DEPTNO='||DD);
go_block('emp');
execute_query;
set_block_property('emp', default_where, '');
END;
With character not give any result
DECLARE
DD VARCHAR2(15);
BEGIN
DD:='SALESMAN';
set_block_property('emp', default_where, 'where RTRIM(EMPNO)='||DD);
go_block('emp');
execute_query;
set_block_property('emp', default_where, '');
END;
Please give me any idea
bro it is not working on string format coz of the missing quotes. e.g. 'smith' or smith. so the quoted string will be compared. in set_block_property u have to include extra quotes on the variable. e.g.
set_block_property('emp',default_where,'where ename='''||:emp.ename||'');
or with conditional statement
set_block_property('emp',default_where,'where ename='''||:emp.ename||''' and dname='''||dept.deptno||'');
there i included two extra qoutes before joining ename and in the an extra quote to complete to string. if u would like to debug at runtime to show if the qouted string condition is proper then assign the where clause to a variable and message it up.
like
myvariable:='where ename='''||:emp.ename||'';
message(myvariable);
message(myvariable);
set_block_property('emp',default_where,myvariable);
after the string is quoted properly the execute query will work fine, also use the function upper or lower to compare strings.
zaibi.
Similar Messages
-
SDO_ANYINTERACT query runs slower with numerous iterations
hi all,
I have some PL/SQL code within a loop that take longer and longer to run as it iterates through the loop.
I have identified the problem function below. It seems that the SDO_ANYINTERACT takes longer and longer to execute the more it is called.
I have found a bug on metalink 7003151 with indicates a potential memory leak issue. Could this be a cause? I know that this function runs as expected using Oracle Express. The issue is on a development server which has been patched to 10.2.0.4.
FUNCTION SEARCHFORFEATURE(sTABLE VARCHAR2,gGEOM MDSYS.SDO_GEOMETRY, nSEARCH NUMBER) RETURN VARCHAR2 IS
TYPE typNIMSREF IS TABLE OF VARCHAR2(10);
vNIMSREF TYPNIMSREF;
sSQL VARCHAR2(500);
BEGIN
sSQL := 'SELECT NIMSREF FROM ' || sTABLE || ' S WHERE SDO_ANYINTERACT(S.GEOLOC, :gGEOM) = 'TRUE';
EXECUTE IMMEDIATE sSQL BULK COLLECT INTO vNIMSref USING gGEOM;
IF vNIMSREF.COUNT = 1 THEN
RETURN vNIMSREF(1);
ELSIF vNIMSREF.COUNT > 1 THEN
RETURN '-1';
ELSE
RETURN '-2';
END IF;
EXCEPTION -- exception-handling part starts here
WHEN OTHERS THEN
dbms_output.put_line(SQLERRM);
dbms_output.put_line(sSQL);
END SEARCHFORFEATURE;
Thanks in advance
DanielI have run the query in SQLPLUS. As a single call performance is as expected. I ahve included the XPLAN. I have also tried using SDO_RELATE and SDO_INSIDE but it still slows down after a number if interations. I have looked at bug 7003151 but there are not available patches for a window 32bit OS.
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 3399 | 331K| 3 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| WATER_NODES | 3399 | 331K| 3 (0)| 00:00:01 |
|* 2 | DOMAIN INDEX | WATER_NODES_SDX | | | | |
Predicate Information (identified by operation id):
PLAN_TABLE_OUTPUT
2 - access("MDSYS"."SDO_ANYINTERACT"("S"."GEOLOC","MDSYS"."SDO_GEOMETRY"(2003,82086,
NULL,"SDO_ELEM_INFO_ARRAY"(1,1003,4),"SDO_ORDINATE_ARRAY"(123455.9,123456,123456.1,1234
56,123456,123456.1)))='TRUE') -
Attribute Change Run aborted with an error :Not all data indexed for index
Hi,
I have an issue where the master data Attribute Change Run aborted with an error pointing to the BWA:
Attribute Change Run aborted with an error :Not all data indexed for index
we tried to load only 0 data into it,the error still occured.Detail message is following:
not all data was indexed for index 'GBP_BIC:XYCH_098('0' for '114')
creation of The BIA INDEX for infocube 'YBC_SD015' terminated while filling -
I can't seem to run my Playlist under Yahoo Music.. it runs fine with IE 9 but not Firefox 4 .... any idea why? I can run a single song just not my playlist.
Thanks.Had this problem for quite a while but found a work-a-round. I click anywhere in the text I want to delete and insert any character. I am then able to block and delete any text I want to. It's been working great.
-
Hi master
Sir lets suppose I have emp form and I put under blow code in when button press event
When_Button_press
go_block('emp');
enter_query;
:emp.deptno := 10;
execute_query;
but
when I press button then no result no data in any field and curser present in first column or form.
It is my idea the execute query are not run or these command are not run
:emp.deptno := 10;
execute_query;
system not replace data and no run execute_query
please give me idea
Thanking you
Muhammad Fahim AamirHi master
Sir when I use this code with numeric data work fine
DECLARE
DD VARCHAR2(15);
BEGIN
DD:=10;
set_block_property('emp', default_where, 'where
DEPTNO='||DD);
go_block('emp');
execute_query;
set_block_property('emp', default_where, '');
END;
But When use with string data then not give result I
press f8 and show all record
With character not give any result
DECLARE
DD VARCHAR2(15);
BEGIN
DD:='SALESMAN';
set_block_property('emp', default_where, 'where
RTRIM(EMPNO)='||DD);
go_block('emp');
execute_query;
set_block_property('emp', default_where, '');
END;
Please give me any ideaYour problem is in your where clause you do not put the word where in the where clause as it is assumed
I usually declare a variable v_where VARCHAR2(200);
and then assign it my new where clause
v_where := ' RTRIM(EMPNO)='||DD;
GO_BLOCK ('emp');
SET_BLOCK_PROPERTY('emp',default_where, v_where);
EXECUTE_QUERY;
v_where := null; ---clean up
This allows you to easily put your where clause into a message
message(v_where);
so you can see what is really being queried. This is very useful when you are using multiple values to make sure you have all the apostrophes that you need
eg: v_where := v_where := 'item_type <> ''CAT'''||' and user_id = '''||:login.user_id||''''; -
Query runs fine in 9i but results to ORA-01652 unable to extend temp in 10g
Hi,
We are having issues in running a SQL query in 10g. In 9i, it runs fine with no problems but when run in 10g, It takes forever and the temp tablespace grows very large upto 60GB until we get ORA-01652 error due to lack of disk space. This does not occur in 9i, where query runs in only 20 mins and does not take up temp that big. 9i version is 9.2.0.8. 10g is 10.2.0.3Heres the SQL query:
SELECT
J2.EMPLID,
TO_CHAR(J2.EFFDT,'YYYY-MM-DD'),
J2.EFFSEQ,
J2."ACTION",
J2.ACTION_REASON,
TO_CHAR(J2.GRADE_ENTRY_DT,'YYYY-MM-DD'),
J2.COMPRATE,
J2.CHANGE_AMT,
J2.COMP_FREQUENCY,
J2.STD_HOURS,
J2.JOBCODE,
J2.GRADE,
J2.PAYGROUP,
PN2.NATIONAL_ID,
TO_CHAR(PC.CHECK_DT,'YYYY-MM-DD'),
SUM(PO.OTH_EARNS),
To_CHAR(SUM(PO.OTH_EARNS)),
PO.ERNCD,
'3',
TO_CHAR(PC.PAY_END_DT,'YYYY-MM-DD'),
PC.PAYCHECK_NBR
FROM PS_JOB J2,
PS_PERS_NID PN2,
PS_PAY_OTH_EARNS PO,
PS_PAY_CHECK PC
WHERE J2.EMPL_RCD = 0
AND PN2.EMPLID = J2.EMPLID
AND PN2.COUNTRY = 'USA'
AND PN2.NATIONAL_ID_TYPE = 'PR'
AND J2.COMPANY <> '900'
AND J2.EFFDT <= SYSDATE
AND PC.EMPLID = J2.EMPLID
AND PC.COMPANY = PO.COMPANY
AND PC.PAYGROUP = PO.PAYGROUP
AND PC.PAY_END_DT = PO.PAY_END_DT
AND PC.OFF_CYCLE = PO.OFF_CYCLE
AND PC.PAGE_NUM = PO.PAGE_NUM
AND PC.LINE_NUM = PO.LINE_NUM
AND PC.SEPCHK = PO.SEPCHK
AND EXISTS (SELECT ERNCD
FROM PS_P1_CMP_ERNCD P1_CMP
WHERE P1_CMP.ERNCD = PO.ERNCD AND EFF_STATUS = 'A')
GROUP BY J2.EMPLID,
J2.EFFDT,
J2.EFFSEQ,
J2.ACTION,
J2.ACTION_REASON,
J2.GRADE_ENTRY_DT,
J2.COMPRATE,
J2.CHANGE_AMT,
J2.COMP_FREQUENCY,
J2.STD_HOURS,
J2.JOBCODE,
J2.GRADE,
J2.PAYGROUP,
PN2.NATIONAL_ID,
PC.CHECK_DT,
PO.ERNCD,
'3',
PC.PAY_END_DT,
PC.PAYCHECK_NBR -
i have an imac g4 purchased Dec 2003 runnung OS 10.5.8. It runs fine with airport off, but when I turn airport on it freezes with the black page, "restart by holding power key . . ." I swapped the airport extreme card with the one in my ibook G4 (purchased same date and running same OS). No change in operation.
I am running wifi from verizon. Recently changed from mifi2200 to jetpak 4620 in a 3G location. Ibook running fine, desktop freezes. If I can boot desktop in safe mode and get airport turned off in time. then I can reboot regularly and imac runs flawlessly with no wireless.Have run disk utilities and TechTool Pro rebuild etc, but nothing has worked. How do I fine the culprit?the power logix thing was really sad. apple changed so much after 10.4.8 that there wasn't a viable way to patch the software.
That statement is precisely why I don't believe in blindly updating the OS, especially in a non-standard machine.
We can't expect third parties to support us forever, and it is shameful to break something that works fine, except that we updated the OS....
I think that any upgrade or modification to a machine or the OS greatly increases the risk of trouble or incompatibility with current configuration and "new" system files.
After all, the component or software could only be tested as far as the current OS version when the component or software was released.
Beyond that, we are all "beta testing".
Following a beta tester protocol, and applying updates to a cloned system drive first, is a prudent way to approach updates, and not only for older, heavily modified machines.
After 10.4.8 and moreso with Leopard, the focus is primarily on Intel architecture, not PPC architecture.
Like it or not, we are all updating to the abyss of the extinction of our machines, unless we can be satisfied with the last stable version of OS that works well with our hardware and software.
I wish they would include the latest pkgs at least with software update.
Yes, having individual packages, rather than lump "OS X 10.x.x" updates would be nice.
This way, one could update as one sees fit. That is to say, for example, fix the Quicktime, but leave my Network alone, etc., etc.
In all fairness, Apple does provide for some breakdown of updates, but I believe there is much room for improvement, especially, as you point out, with regard to the core services portion of the OS.
Until then, I'll leave Software Update disabled....... -
Hi,
Im unable to open the RPD online getting following error.
Note: Im not done any changes. Its works good till yesterday EOD.
Error:
[NQSError:13037] cannot connect to BI security service,Please make sure this is running properly (with SSL or not) in EM.
[NQSError:37001] could not connect to the oracle BI server instance..
Kindly help me to fix this issue.Hi,
Could you access the answer side.
Could you see the reports.
Do one thing, take a back up of NQS config file from <Oracle Location>\instance\instance1\config\obiserver folder\nqsconfig.ini file.
Copy nqs config file if you have already have a back up.
Restart the services and try once.
http://mkashu.blogspot.com
Regards,
VG -
A javaScript code that runs fine in IE but not in other plz help
Hello friends,
plese help me in getting the code for Opera and Mozilla browsers. The following code runs fine in IE but not in other browsers. it show titlebar in other browsers. What to do disable titlebar in other browsers? plz help
<html>
<head>
<script>
//Frameless Banner Popup
// Set the url of the banner popup window page
//var theURL = "index.htm";
var theURL = "/cgi-bin/login";
// Set the title of the popup window
var title = "Login"
// Set the size of the popup window
var windowWidth = 350; // cannot be less than 100
var windowHeight = 350; // cannot be less than 100
//var windowWidth = window.screen.width; // cannot be less than 100
//var windowHeight = window.screen.height; // cannot be less than 100
// Set the position of the popup window
var windowX = ((window.screen.width/2) - 175);
var windowY = ((window.screen.height/2) - 175);
// Set true to auto-center (positions will be ignored)
var autocenter = false;
// Set true for popup to close when launch page does
var autoclose = false;
var s="width="+windowWidth+",height="+windowHeight;
var beIE=document.all?true:false;
var done=new Object("no");
if(autocenter){
windowX = (window.screen.width-windowWidth)/2;
windowY = (window.screen.height-windowHeight)/2;
function doAgilePopup(){
if (beIE){
agilePopper = window.open("","popAgile","fullscreen,"+s);
agilePopper.blur();
window.focus();
agilePopper.resizeTo(windowWidth,windowHeight);
agilePopper.moveTo(windowX,windowY);
var frameString=""+
"<html>"+
"<head>"+
"<title>"+title+"</title>"+
"</head>"+
"<frameset rows='*,0' framespacing=0 border=0 frameborder=0>"+
"<frame name='top' src='"+theURL+"' scrolling=no>"+
"<frame name='bottom' src='about:blank' scrolling='no'>"+
"</frameset>"+
"</html>"
agilePopper.document.open();
agilePopper.document.write(frameString);
agilePopper.document.close();
}else{
agilePopper=window.open(theURL,"popAgile","scrollbars=no,"+s);
agilePopper.blur();
window.focus();
agilePopper.resizeTo(windowWidth,windowHeight);
agilePopper.moveTo(windowX,windowY);
agilePopper.blur();
if (autoclose){
window.onunload = function(){agilePopper.close();}
done="okay";
</script>
</head>
<BODY onLoad="doAgilePopup(),top.window.close()">
</body>
</html>missing semicolon in end of the variable frameString ,
better write the string in single line thats easy to find the bugs like this.
var frameString=""+
"<html>"+
"<head>"+
"<title>"+title+"</title>"+
"</head>"+
"<frameset rows='*,0' framespacing=0 border=0 frameborder=0>"+
"<frame name='top' src='"+theURL+"' scrolling=no>"+
"<frame name='bottom' src='about:blank' scrolling='no'>"+
"</frameset>"+
"</html>" -
I'll ask this again. I'm running Yosemite, LR 4.4 everything was running fine and I'm not sure if this is connected but when I loaded the last security update from Apple I started getting the "no content" box when I tried to publish to Flickr (Facebook OK), now I can't get it to authorize, I loaded 3rd party JR plug in and still get can't authorize. Can anybody help? Basically LR is useless, it has been nothing but problems.
It would probably be better to continue your previous thread on the same question than to start a new one.
-
Photo clicked with flash does not give clear image
photo clicked with flash does not give clear image
I did some more testing with this, and it appears to be a Gmail problem with iOS iPhoto.
I called Apple support, and this issue was escalated to engeneering.
When sending photos from iPhoto for iOS via Gmail from the iOS device, only the small and medium sized photos can be opened in Mail on the iOS device. The large and original photos do not open in Mail.
This occured across different devices I tested, including iPad 2, 3, and 2 separate iPhone 4S devices. All were updated to the lastest firmware. iPhoto was uninstalled, and reinstalled.
When sending and receiving photos from iPhoto for iOS via iCloud me.com email servers, all the photos of different sizes could be opened in Mail fine on the iOS devices.
It appears that Gmail servers somehow change the way the photos are encoded, and make them not viewable on the iOS device. Very disappointing, since the native Mail program has no problem, and photos sent via gmail or other are fine.
Another iPhoto for iOS glitch! -
Report running fine via se38 , but not with tcode.
I had made a alv report, and had assinged TCODE.
When running via tcode > in selection screen i had given all the input data in selection fields,>After that when clicking the execution button> ITS GOING BACK TO SAP SCREEN.
BUT.
SAME report when running through SE38, its running fine..
I had debugg the program , and what find that when running throug TCOde , After AT-SELECTION SCREEN EVENT , ITS COMING OUT TO SAP MENU WITHOUT TRIGGERING THE START-OF-SELECTION EVENT.
HELP ME...Please follow the steps for creating a transaction for report..
GOTO SE93
Give the transaction code.
Press create button..
Enter the short description..
Choose the radio button which says "Program and selection screen(report transaction)".
Press Enter..
Give the program name..
Remove the Selection screen "1000" if you want.
Save the transaction code.. -
Query running fine in one environment but failing in other environment
Hi,
I have a query which i am trying to execute in two different environments.
Test :- Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
Prod:- Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
Now query executes finely in one environment and fails in other environment.
It gives following error.
ORA-01861: literal does not match format string
01861. 00000 - "literal does not match format string"
The query is too long and contains CHAR-DATE and DATE-CHAR conversions.
The same query works fine on TEST environment and and fails on PROD environment.
Any help related to it would be appreciated.
Thanks,
MaheshMaheshGx wrote:
Hi,
I have a query which i am trying to execute in two different environments.
Test :- Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
Prod:- Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
Now query executes finely in one environment and fails in other environment.
It gives following error.
ORA-01861: literal does not match format string
01861. 00000 - "literal does not match format string"
The query is too long and contains CHAR-DATE and DATE-CHAR conversions.
The same query works fine on TEST environment and and fails on PROD environment.
Any help related to it would be appreciated.
Thanks,
MaheshThat's called a bug. One caused by the person who developed the code. They relied on implicit conversion between strings and dates when
production quality code will always use to_char and to_date functions with a format mask. -
Query runs in management studio but not in SQLAgent job
I have the following query which runs fine in Management Studio but when I put it in a SQLAgent job it fails saying
Error formatting query, probably invalid parameters (SQLState 42000 Error 22050)I have tried changing Quote characters but to no avail.
Does anybody have any idea why this would be happening?
Regards
Ron
declare @servername nvarchar(150)
set @servername = @@servername
declare @mysubject nvarchar(200)
set @mysubject = 'Toners adjusted out '+@servername+'.'
EXEC msdb.dbo.sp_send_dbmail @recipients='[email protected]',
@subject = @mysubject,
@body = 'Toners were adjusted out. View attachment to see the details',
@query = 'use livedatabase;select trc_part, trc_job, trc_qty, trc_inits from livedatabase.dbo.Traces
where trc_part like "TONER%"
and CAST(trc_date as date) = CAST(getdate() as date)
and trc_typ = "O"',
@query_result_width = 600,
@attach_query_result_as_file = 1I have another SQLAgent job that is almost identical in what it does, ie sending an email with a query result and it works fine. See below.
Therefore it can't be permissions or dbmail setup but I cannot see what it is.
--== This is for SQL 2005 and higher. ==--
--== We will create a temporary table to hold the error log detail. ==--
--== Before we create the temporary table, we make sure it does not already exist. ==--
IF OBJECT_ID('tempdb.dbo.ErrorLog') IS Not Null
BEGIN
DROP TABLE tempdb.dbo.ErrorLog
END
--== We have checked for the existence of the temporary table and dropped it if it was there. ==--
--== Now, we can create the table called tempdb.dbo.ErrorLog ==--
CREATE TABLE tempdb.dbo.ErrorLog (Id int IDENTITY (1, 1) NOT NULL,
logdate DATETIME, procInfo VARCHAR(10), ERRORLOG VARCHAR(MAX))
--== We create a 3 column table to hold the contents of the SQL Server Error log. ==--
--== Then we insert the actual data from the Error log into our newly created table. ==--
INSERT INTO tempdb.dbo.ErrorLog
EXEC master.dbo.sp_readerrorlog
--== With our table created and populated, we can now use the info inside of it. ==--
BEGIN
--== Set a variable to get our instance name. ==--
--== We do this so the email we receive makes more sense. ==--
declare @servername nvarchar(150)
set @servername = @@servername
--== We set another variable to create a subject line for the email. ==--
declare @mysubject nvarchar(200)
set @mysubject = 'Deadlock event notification on server
'+@servername+'.'
--== Now we will prepare and send the email. Change the email address to suite your environment. ==--
EXEC msdb.dbo.sp_send_dbmail @recipients='[email protected]',
@subject = @mysubject,
@body = 'Deadlock has occurred. View attachment to see the deadlock info',
@query = 'select logdate, procInfo, ERRORLOG from tempdb.dbo.ErrorLog where Id >= (select TOP 1 Id from tempdb.dbo.ErrorLog WHERE ERRORLOG Like ''%Deadlock encountered%'' order by Id DESC)',
@query_result_width = 600,
@attach_query_result_as_file = 1
END
--== Clean up our process by dropping our temporary table. ==--
DROP TABLE tempdb.dbo.ErrorLog -
SECURITY query running slow with Prompts!!
Hello All,
Version: PeopleSoft HRMS 9 with PeopleTools 8.49.09
DB Version: 10.2.0.3 (Oracle)
My client is running a security query, given below, with and without prompts. Without prompts it is completing in 35 seconds but with prompts (even if the values in the prompts are blank!), the query is taking more than 4-5 hours but not completing!!
SELECT /*+ OPT_PARAM('_optimizer_mjc_enabled', 'false')
opt_param('_optimizer_cartesian_enabled', 'false') opt_param('optimizer_index_caching', 0) opt_param('optimizer_index_cost_adj', 0)*/ B.OPRID, A.EMPLID, A.PWCUK_LEGACY_ID, A.NAME, A.EMPL_STATUS, A.EMPL_CLASS,
to_char(to_date( TO_CHAR(A.HIRE_DT, 'YYYY-MM-DD'), 'yyyy-mm-dd'), 'dd/mm/yyyy'),
to_char(to_date(decode( TO_CHAR(A.REHIRE_DT, 'YYYY-MM-DD'), '',
TO_CHAR(A.HIRE_DT, 'YYYY-MM-DD'), TO_CHAR(A.REHIRE_DT, 'YYYY-MM-DD')), 'yyyy-mm-dd'), 'dd/mm/yyyy'),
to_char(to_date( TO_CHAR(A.TERMINATION_DT, 'YYYY-MM-DD'), 'yyyy-mm-dd'), 'dd/mm/yyyy'), A.DEPTID, A.DEPT_DESCR, A.PWCUK_BUSINESSUNIT, A.PWCUK_BU_DESCR, A.PWCUK_SUBREGION, A.PWCUK_SR_DESCR,
A.PWCUK_REGION, A.PWCUK_R_DESCR, B.ROWSECCLASS, E.CLASSDEFNDESC, C.ROLENAME, D.DESCR,
Case C.ROLENAME When 'UK_OTG_Query_Access' then 'Y' When 'UK_Self_Service_Query_Access' then 'Y' When 'UK_Prtner_Affairs_Query_Acces' then 'Y' When 'UK_SelfServ_Sens_Basic_Query' then 'Y' When 'UK_ESC_Extra_Query_Access' then 'Y' When 'UK_BCI_Query_Access' then 'Y' When 'UK_Self_Service_Non_Sens_Q Acc' then 'Y' Else 'N' END, TO_CHAR(A.EFFDT, 'YYYY-MM-DD'),
TO_CHAR(A.EFFDT, 'YYYY-MM-DD'), D.ROLENAME FROM PS_PWCUK_EMP_C_VW A, PS_PERS_SRCH_QRY A1, PSOPRDEFN B, PS_ROLEU SER_VW C, PSROLEDEFN D, PSCLASSDEFN E WHERE A.EMPLID = A1.EMPLID
AND A1.OPRID = 'kcooper001a' AND ( B.OPRID = A.PWCE_GUID AND B.OPRID = C.OPRID AND C.ROLENAME NOT IN ('Orbit User', 'PWCUK_LOS_ADMIN_PLANNER', 'Query Designer', 'Query User', 'PWCE_EMEA_AUDIT_RLE_NO_BSE_TBL', 'PWCE_REPORT_DIST', 'EOPP_USER', 'PAPP_USER', 'PWCUK_XMLP_REPORT_DEVELOPER', 'GBR_PEOPLE_MANAGER_CONFIG_UPD', 'PWCUK_EX_EMPLOYEE', 'ReportSuperUser', 'PWCE JOBCODE LOAD UTILITY',
'PWCE EMPLOYEE RVW LOAD ACCESS', 'PwCE Bonus Upload Access', 'GBR_EP_SYSADMIN') AND ( C.ROLENAME NOT LIKE 'PWCUK_EP%' OR C.ROLENAME = 'PWCUK_EP_ADMIN') AND C.ROLENAME NOT LIKE 'PWCUK_SP%' AND C.ROLENAME NOT LIKE 'GBR_PMGR%' AND 0 < INSTR(:1, decode(trim(:2), null, ' ', B.OPRID)) AND 0 < INSTR(:3, decode(trim(:4), null, ' ', B.EMPLID)) AND 0 < INSTR(:5, decode(trim(:6), null, ' ', A.PWCUK_LEGACY_ID)) A
ND 0 < INSTR(:7, decode(trim(:8), null, ' ', C.ROLENAME)) AND 0 < INSTR(:9, decode(trim(:10), null, ' ', E.CLASSID)) AND C.ROLENAME = D.ROLENAME AND E.CLASSID = B.ROWSECCLASS ) ORDER BY 4, 20Below are some more useful information I have gathered from DB level for this query:
+--------------------------------------------------------------------------------------------------+
|Plan HV Min Snap Max Snap Execs LIO PIO CPU Elapsed |
+--------------------------------------------------------------------------------------------------+
|770792495 39602 39747 5 1,181,648,326 6,823 7,433.93 7,481.60 |
+--------------------------------------------------------------------------------------------------+
========== PHV = 770792495==========
First seen from "10/19/12 10:00:44" (snap #39602)
Last seen from "10/25/12 11:00:28" (snap #39747)
Execs LIO PIO CPU Elapsed
===== === === === =======
5 1,181,648,326 6,823 7,433.93 7,481.60
Plan hash value: 770792495
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | | | 35 (100)| |
| 1 | SORT ORDER BY | | 1 | 645 | 35 (6)| 00:00:01 |
| 2 | NESTED LOOPS | | 1 | 645 | 34 (3)| 00:00:01 |
| 3 | NESTED LOOPS | | 6 | 1122 | 10 (10)| 00:00:01 |
| 4 | NESTED LOOPS | | 1 | 165 | 5 (0)| 00:00:01 |
| 5 | NESTED LOOPS | | 1 | 122 | 4 (0)| 00:00:01 |
| 6 | NESTED LOOPS | | 1 | 81 | 3 (0)| 00:00:01 |
| 7 | NESTED LOOPS | | 552 | 29256 | 2 (0)| 00:00:01 |
| 8 | INDEX FULL SCAN | PSAPSROLEUSER | 550 | 15950 | 1 (0)| 00:00:01 |
| 9 | TABLE ACCESS BY INDEX ROWID | PS_ROLEXLATOPR | 1 | 24 | 1 (0)| 00:00:01 |
| 10 | INDEX UNIQUE SCAN | PS_ROLEXLATOPR | 1 | | 1 (0)| 00:00:01 |
| 11 | TABLE ACCESS BY INDEX ROWID | PSOPRDEFN | 1 | 28 | 1 (0)| 00:00:01 |
| 12 | INDEX UNIQUE SCAN | PS_PSOPRDEFN | 1 | | 1 (0)| 00:00:01 |
| 13 | TABLE ACCESS BY INDEX ROWID | PSCLASSDEFN | 1 | 41 | 1 (0)| 00:00:01 |
| 14 | INDEX UNIQUE SCAN | PS_PSCLASSDEFN | 1 | | 1 (0)| 00:00:01 |
| 15 | TABLE ACCESS BY INDEX ROWID | PSROLEDEFN | 1 | 43 | 1 (0)| 00:00:01 |
| 16 | INDEX UNIQUE SCAN | PS_PSROLEDEFN | 1 | | 1 (0)| 00:00:01 |
| 17 | VIEW | PS_PERS_SRCH_QRY | 483 | 10626 | 5 (20)| 00:00:01 |
| 18 | SORT UNIQUE | | 483 | 62790 | 5 (20)| 00:00:01 |
| 19 | NESTED LOOPS | | 483 | 62790 | 4 (0)| 00:00:01 |
| 20 | NESTED LOOPS | | 483 | 49749 | 3 (0)| 00:00:01 |
| 21 | NESTED LOOPS | | 1 | 67 | 2 (0)| 00:00:01 |
| 22 | TABLE ACCESS BY INDEX ROWID| PSOPRDEFN | 1 | 40 | 1 (0)| 00:00:01 |
| 23 | INDEX UNIQUE SCAN | PS_PSOPRDEFN | 1 | | 1 (0)| 00:00:01 |
| 24 | TABLE ACCESS BY INDEX ROWID| PS_SJT_OPR_CLS | 1 | 27 | 1 (0)| 00:00:01 |
| 25 | INDEX RANGE SCAN | PS_SJT_OPR_CLS | 1 | | 1 (0)| 00:00:01 |
| 26 | TABLE ACCESS BY INDEX ROWID | PS_SJT_CLASS_ALL | 482 | 17352 | 1 (0)| 00:00:01 |
| 27 | INDEX RANGE SCAN | PS_SJT_CLASS_ALL | 1158 | | 1 (0)| 00:00:01 |
| 28 | INDEX RANGE SCAN | PS_SJT_PERSON | 1 | 27 | 1 (0)| 00:00:01 |
| 29 | VIEW | PS_PWCUK_EMP_C_VW | 1 | 458 | 4 (0)| 00:00:01 |
| 30 | UNION ALL PUSHED PREDICATE | | | | | |
| 31 | TABLE ACCESS BY INDEX ROWID | PS_PWCUK_EMPLOYEES | 1 | 169 | 1 (0)| 00:00:01 |
| 32 | INDEX RANGE SCAN | PS_PWCUK_EMPLOYEES | 1 | | 1 (0)| 00:00:01 |
| 33 | FILTER | | | | | |
| 34 | NESTED LOOPS OUTER | | 1 | 220 | 3 (0)| 00:00:01 |
| 35 | NESTED LOOPS OUTER | | 1 | 208 | 2 (0)| 00:00:01 |
| 36 | TABLE ACCESS BY INDEX ROWID | PS_PWCUK_EX_EMPLS | 1 | 161 | 1 (0)| 00:00:01 |
| 37 | INDEX RANGE SCAN | PS_PWCUK_EX_EMPLS | 1 | | 1 (0)| 00:00:01 |
| 38 | TABLE ACCESS BY INDEX ROWID | PS_PWCE_EP_ROLES | 1 | 47 | 1 (0)| 00:00:01 |
| 39 | INDEX RANGE SCAN | PS_PWCE_EP_ROLES | 1 | | 1 (0)| 00:00:01 |
| 40 | INDEX RANGE SCAN | PS_PWCUK_EMPLOYEES | 1 | 12 | 1 (0)| 00:00:01 |
| 41 | SORT AGGREGATE | | 1 | 23 | | |
| 42 | INDEX RANGE SCAN | PS_PWCE_EP_ROLES | 1 | 23 | 1 (0)| 00:00:01 |
Summary Execution Statistics Over Time
Avg Avg
Snapshot Avg LIO Avg PIO CPU (secs) Elapsed (secs)
Time Execs Per Exec Per Exec Per Exec Per Exec
19-OCT 10:00 1 374,309,812.00 1,469.00 2,286.32 2,291.32
25-OCT 10:00 3 86,033,085.00 1,567.67 543.68 546.11
25-OCT 11:00 1 549,239,259.00 651.00 3,516.56 3,551.96
avg 336,527,385.33 1,229.22 2,115.52 2,129.80
sum 5
Per-Plan Execution Statistics Over Time
Avg Avg
Plan Snapshot Avg LIO Avg PIO CPU (secs) Elapsed (secs)
Hash Value Time Execs Per Exec Per Exec Per Exec Per Exec
770792495 19-OCT 10:00 1 374,309,812.00 1,469.00 2,286.32 2,291.32
25-OCT 10:00 3 86,033,085.00 1,567.67 543.68 546.11
25-OCT 11:00 1 549,239,259.00 651.00 3,516.56 3,551.96
avg 336,527,385.33 1,229.22 2,115.52 2,129.80
sum 5I'm not at all proficient in PeopleSoft.
Please advice how we can get faster runs for this query.
Note: We have already checked all other possibilities, like network, application, web services, etc, and they look normal.
Thanks,
SuddhasatwaIf the hints are there only for the "cost", then I'm sorry to say, but they are useless. Did you say that was not efficient to the Oracle Support ?
I asked earlier if that query already ran in a reasonnable time, is it the case, or always took that time ? Is it a change of behaviour after a db upgrade ?
Have you tried to work with AWR snapshots with a short gap in between ? I mean between the AWR snapshots (every 15 minutes or so), not between the runs of the query.
If there's no values for the bind variables, I assume this is what you mean when you said "no prompts", then Oracle can go much faster because of the few (or no?) data repartition to retrieve.
However, when given values to some (all?) of the bind variables, then all the problem will be on the data repartition. That's why I was asking how you gathered statistics on the involved objects, in other words, the histograms may be wrong somehow.
There's a lot of litterature on this, have a look to the Jonathan Lewis blog for more information.
Anyway, I think there's not enough information here and does not look easy to work on it in that state from the other side of the network.
Nicolas.
Maybe you are looking for
-
Hi all If somebody know how can i get all controls references of VI (including controls that founds in Tabs and Clusters). I need generic method, because i haven't information about VI (reference to VI i get only at run-time). Thanks, Nadav
-
Office 365 ProPlus - App-V: Lync wont autostart
Hi, As the title suggests I have an issue with Lync 2013. Office 2013 is an App-V package pushed from SCCM, when you select the "automatically start Lync when I log onto windows" box nothing happens. I have checked the registry and the correct key is
-
Error when trying multiple inbound interface determination for IDOC
Hi ! I have this scenario: File -> XI -> IDOC. For each source file, I need to send multiple idoc packages, all to the same business system, but each package should be the result of different interface mappings. All mappings have same source and tar
-
Problem with flash player 8 & 9
Hello. I'm french and speak a very bad english. I've problem with my website. It doesn't play with Version 8 and 9 of MACROMEDIA Flash Player. But it's good with Version 7. the adress : www.thedino.eu What could I do? Answer with a very simple englis
-
Hi, can I write a java program (.class file) working with swing and called by jsp page (.jsp)