Insert query waiting for in-definite time.
Hi all,
I had a serious problem in my system.
My application gets stuck when trying to insert a huge xml message in a table blob. Usually there is no problem, the insert query goes into wait state just around or after the gather stats running on this table ends.
The table is partitioned one and around 150Gb in size.
I have seen in toad the wait event for this insert query is SQL* net more data from client.
This might be something related to RBS usage of this stuck insert query - in toad the RBS usage start time is same as the end time of gather stats.
But i m unable to figure out why the insert is stuck just after the gather stats ends, i have simulated this issue many times. My oracle version is 9.0.8.
Could somebody help to figure out why this is happening...?
My oracle version is 9.0.8.I doubt this is correct.
Post Operating System (OS) name & version for DB server system.
Post results of SELECT * from v$version.
Now CUT the commands & results & PASTE (post) them back here.
ALTER SESSION SET SQL_TRACE=TRUE;
-- invoke the problem SQL here
ALTER SESSION SET SQL_TRACE=FALSE;
now find the trace file within ./udump folder
tkprof <trace_file.trc> trace_results.txt explain=<username>/<password>
post the contents of trace_results.txt back here
when application "gets stuck" run the following SQL from different session
SELECT DECODE(request,0,'Holder: ','Waiter: ')||sid sess,
id1, id2, lmode, request, type
FROM V$LOCK
WHERE (id1, id2, type) IN
(SELECT id1, id2, type FROM V$LOCK WHERE request>0)
ORDER BY id1, request
/
Similar Messages
-
Vendor evaluation report for a definite time period
Hi Experts,
Vendor Evaluation Summary Report required for the vendors for a definite time period. Output of the report should show the scores of vendors for criteria like Price, Delivery, Quality, Service and summation of all these scores.
Please let me know if any standard report is available which can fulfill my requirement.
Thanks in advance.
Kishore.Hi,
ME6H report is not fulfilling my requirement since i require the output format in the form like vendor, vendor name, plant, price, delivery, service, quality and the summation of scores given to these criterias.
Thanks
Kishore. -
Query waiting for objects...
Hi,
I have a Pl/Sql query which when run is taking a long time to execute.
When i put a trace on it, i found that it is waiting for 2 objects and as soon as the wait is over the query produces the output immediately.
I tried puuting index on tables which had large records as i thought initially that it might be waiting due to full table scan, but its not of much help.
Earlier this query used to run within 5 minutes some 3 months back, but now it is taking about 1 hour daily and when the trace is on, it shows again it is waiting for 2 objects.
What im thinking is that, earlier when the query used to run within 5 minutes the data involved was not that heavy, but since the last 2 months the data is in millions every month.
Could you suggest me a possible solution to this problem of waiting for objects.
Thanks.
Database version being used - Oracle 10gHi,
When i put a trace on it, i found that it is waiting for 2 objects and as soon as the wait is over the query produces the output immediately.'it is waiting for 2 objects?' What exactly do you mean by that?
If you've done a trace then why didn't you post the tkprof output?
Please post the tkprof output (including wait events) and your PL/SQL procedure (or a representative piece of sample code)
Put this tag => before and after your tkprof output/code examples, so it says readable. -
Restrict insertion of records for the second time.
I have a Form with header and Details Block.I make an entry for the first time in both header and details block with some three field combination such as Item code,item category and region
Records are Inserted in the respective tables.Now when i am going to enter in the form with that same three fiel;d combination, INSERT and DELETE should be Restricted.How to Implement the same.hi Amatulla,
As u said i tried ur condition in "When create record".But that fails.
So i tried the same in "When new Block instance".Getting 50% of my Desired Results.
Here's the Condition i gave
IF CNT > 0 THEN
SET_BLOCK_PROPERTY('TI_PPS_DETAILS_V',INSERT_ALLOWED, PROPERTY_FALSE);
SET_BLOCK_PROPERTY('TI_PPS_DETAILS_V',DELETE_ALLOWED, PROPERTY_FALSE);
ELSE
SET_BLOCK_PROPERTY('TI_PPS_DETAILS_V',INSERT_ALLOWED, PROPERTY_TRUE);
SET_BLOCK_PROPERTY('TI_PPS_DETAILS_V',DELETE_ALLOWED, PROPERTY_TRUE);
END IF;
END ;
after this condition is given, i am unable to update the already Entered Record.
The condition is i can update my already entered Record for a given combination.
Can anyone help pls.... -
Can some help me please below query has been running for a long time I am unable to fix it
SELECT lmt.tab, pr.tab6, pr.tab7,
pr.activity_id, pr.resource_id, lmt.tab2,
lmt.tab5, pr.txn_lmt_trans_id, pr.analysis_type,
pr.resource_type, pr.resource_category, pr.resource_sub_cat,
pr.trans_dt, cd.start_dt, cd.end_dt, pr.currency_cd, pr.rt_type,
pr.resource_quantity, pr.resource_amount, pr.foreign_amount,
pr.foreign_currency, 2, 'S', pr.resource_id_from,
hdr.contract_sign_dt, cd.retainage_id, cd.discount_id, 0, 0,
cd.limit_bi_cntrl_flg, hdr.ca_rqst_src, 0, hdr.currency_cd,
hdr.rt_type, 0, 0, pr.bi_distrib_status, pr.gl_distrib_status
FROM ps_c1 lmt, ps_c2 hdr, ps_c3 cd,
ps_c4 pr
WHERE lmt.tab = 836626
AND hdr.tab2 = lmt.tab2
AND cd.tab2 = lmt.tab2
AND cd.tab5 = lmt.tab5
AND cd.pricing_structure = 'RATE'
AND pr.tab6 = cd.tab6_pc
AND pr.tab2 = cd.tab2
AND pr.tab5 = cd.tab5
AND (pr.analysis_type IN ('BIL', 'OLT', 'PMR', 'ROL')
AND pr.bi_distrib_status <> 'I'
OR pr.analysis_type = 'REV'
AND pr.gl_distrib_status IN ('C', 'N'))
AND NOT pr.ca_fee_status IN ('2', '3', '4', '5')
AND 0 >= (SELECT count(*)
FROM ps_ca_lmt4_tao4 lmt4
WHERE lmt4.tab = 836626
AND lmt4.tab6 = pr.tab6
AND lmt4.tab7 = pr.tab7
AND lmt4.activity_id = pr.activity_id
AND lmt4.resource_id = pr.resource_id))
Below is the execution plan
ID PID Operation Name Rows Bytes Cost CPU Cost IO Cost Temp space IN-OUT PQ Dist PStart PStop
0 SELECT STATEMENT 2 598 99885 2G 99823
1 0 NESTED LOOPS
2 1 NESTED LOOPS 1 299 99885 2G 99823
3 2 NESTED LOOPS 1 264 99883 2G 99821
4 3 NESTED LOOPS 3 273 8 114779 8
5 4 INDEX RANGE SCAN ps_c1 6 138 1 8321 1
6 4 TABLE ACCESS BY INDEX ROWID ps_c3 1 68 2 17743 2
7 6 INDEX UNIQUE SCAN ps_c3 1 1 9021 1
8 3 TABLE ACCESS BY INDEX ROWID ps_c4 1 173 33292 671M 33271
9 8 INDEX RANGE SCAN ps_c4 55808 10139 320M 10129
10 9 INDEX UNIQUE SCAN PS_CA_LMT4_TAO4 1 46 0 1050 0
11 2 INDEX UNIQUE SCAN ps_c2 1 1 9021 1
12 1 TABLE ACCESS BY INDEX ROWID ps_c2 1 35 2 17413 2
Can someone please help its really kind of urgentcheck the cardinalities: the CBO expects to access only a few rows and uses a lot of NL joins - and that's probably not the best solution. You could start with a llok at the cardinality of step 5, the index range scan on ps_c1. The CBO expects only 6 rows - is this a good guess? Of course you could just create a plan with rowsource statistics (gather_plan_statistics hint) and compare E- and A-rows.
-
File to Idoc with wait for 30 secs time
Hi Experts,
We have a requirement like, sending a file using MDM adapter to Idoc.
We need to process messgaes coming into ftp one by one to target system ECC with a time interval of 30 seconds.
After 1 msg is processed, wait for 30 seconds and next message have to process.
Please let us know any user defined function code for this.
Thanks in advance...
Soumya ACheck below thread.
File adapter to pick a single file
CONFIGURE FILE ADAPTER ,get files one by one.
Edited by: phani kumar on Jan 6, 2012 12:50 PM -
Wait for a specific time in SAP 4.6
Hi Experts,
Here is my issue.
There is a custom workflow where I need to include one reminder mail task (in between the tasks) after 5 days.
I have created wait step with an infinite wait event.
I gave 5 days in the latest end option of the workflow.
But now, the latest end option has created a new branch which just terminates the workflow.
Is there any way I can swap the Latest End Branch and the Event Triggered Branch.
Or is there any other way to make the workflow wait for 5 days..
Thanks in advance,
SreekanthHi,
Use requested start tab.
Kind regards, Rob Dielemans -
Query needed for sorting by time value
Hi Folks
We have table it consists two columns like below
Job_name varchar2(50)
Scheduled_time date
The filed scheduled time keep date and time value like below
25-Jul-2009 4:00:10 AM
26-Jul-2009 4:00:01 PM
27-Jul-2009 4:00:00 PM
28-Jul-2009 4:05:00 PM
01-Jul-2009 4:06:00 PM
02-Jun-2009 4:15:40 AM
We need output as sorting by time value NOT date value. Expected output to be below
25-Jul-2009 4:00:10 AM
02-Jun-2009 4:15:40 AM
27-Jul-2009 4:00:00 PM
26-Jul-2009 4:00:01 PM
28-Jul-2009 4:05:00 PM
01-Jul-2009 4:06:00 PM
I am using oracle 10G
Thanks in AdvanceHere's how :
SQL> create table job_table (job_name varchar2(50) not null, scheduled_time date);
Table created.
SQL> insert into job_table
2 values ('Job_abc',to_date('25-JUL-2009 04:00:00','DD-MON-YYYY HH24:MI:SS'));
1 row created.
SQL> insert into job_table
2 values ('Job_fdw',to_date('02-JUN-2009 04:15:40','DD-MON-YYYY HH24:MI:SS'));
1 row created.
SQL> insert into job_table
2 values ('Job_fxj',to_date('27-JUL-2009 03:59:00','DD-MON-YYYY HH24:MI:SS'));
1 row created.
SQL> insert into job_table
2 values ('Job_rjt',to_date('20-JUL-2009 14:59:00','DD-MON-YYYY HH24:MI:SS'));
1 row created.
SQL> commit;
Commit complete.
SQL> alter session set nls_date_format='DD-MON-YYYY HH:MI:SS AM';
Session altered.
SQL> select job_name, scheduled_time from job_table
2 order by to_char(scheduled_time,'HH24:MI:SS');
JOB_NAME SCHEDULED_TIME
Job_fxj 27-JUL-2009 03:59:00 AM
Job_abc 25-JUL-2009 04:00:00 AM
Job_fdw 02-JUN-2009 04:15:40 AM
Job_rjt 20-JUL-2009 02:59:00 PM
SQL> -
Insert query takes too much time
I have two select clauses as follows:
"select * from employee" This returns me 6000 rows.
& I have next clause as
"select * from employee where userid in(1,2,3,....,3000)"
This returns me 3000 rows.
Now i have to insert the result of above queries into same extended list view of Visual Basic. But the insert for first query takes 11 seconds while second takes 34 sec. We have evaluated this that this time is for insert query & not for select query.
I want to know that even if the Ist query returns 6000 rows it takes lesser time than the second which is
inserting 3000 rows.
We are using Oracle 8.1.7
Thanks in advanceThe first query can do a straight dump of the table. The second select has to compare every userid to a hardcoded list of 3000 numbers. This will take quite a bit longer. Try rewriting it to
select * from employee where userid between 1 and 3000
It will run much faster then the other query. -
Is there a way to passcode lock my iPhone without waiting for the preset idle time?
Is there a way to passcode lock my iPhone without waiting for the preset time?
My iPhone is set up to require a passcode after 15 minutes of idle time. Normally, this setting works best for me. However, there are times when I would like to lock it immediately, without waiting for the 15 minutes of idle time to pass. Is there a way to do that easily, without changing my settings? I know that I can click the power button to immediately kill the screen, but that just defaults to "slide to open" with no passcode required.
Just to clarify, the idea is to leave my 15 minute setting, since this is the way I like it 98% if the time. I'm just wondering if, let's say I am resting my phone down while a curious person is around, I can quickly pass code lock it, much like I could just click the power button to put it to sleep.Unfortunately, my phone doesn't ask for the passcode when I do this (just slide-to-open). I've searched settings, but I don't see any way to set it up to require the passcode after the screen is locked with the power button.
Do you remember how you set your iPhone up to achieve this? -
Oracle 10g Insert query performs inconsistent as a query vs procedure and p
Database Version: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
No error messages....
I am facing a very weird issue that I have a insert statement in a procedure... pretty much
inert
into oracle_Table
SELECT cr.a AS a,
cr.b AS b,
cr.c AS c,
max(d.column_name) as d
FROM "table 1"@Pmo.World Cr,
[email protected] d
WHERE d."a" = cr."column name"
GROUP BY cr.a,
cr.b,
cr.c
@Pmo.World is a database link to a MSSQL...
The problem I am having right now is, every time I run this insert as a query. Everything works as what it should be... However, when I put this insert into a procedure, it inserts nothing...
Simple test Proceudre:
declare
-- Local variables here
i integer;
begin
inert
into oracle_Table
SELECT cr.a AS a,
cr.b AS b,
cr.c AS c,
max(d.column_name) as d
FROM "table 1"@Pmo.World Cr,
[email protected] d
WHERE d."a" = cr."column name"
GROUP BY cr.a,
cr.b,
cr.c
end;
Thinking about character conversion issue I changed the procedure to
inert
into oracle_Table
SELECT to_char(cr.a) AS a,
to_char(cr.b) AS b,
to_char(cr.c) AS c,
max(d.column_name) as d
FROM "table 1"@Pmo.World Cr,
[email protected] d
WHERE d."a" = cr."column name"
GROUP BY cr.a,
cr.b,
cr.c
Then this Inser works in the procedure... however when I revert it back with the original version that doesnt have to_char... it is working still... then I kept it running for few days... since it runs once per day, it was working for the first 2 days and then stopped working the third day... I verified the source table and every time this procedure runs, source tables were not empty...
It is so confusing because if I manually run the insert as a query, it worked every time I ran it... however if I put that into a procedure, it works from time to time..
Any help is highly apprecaited
Edited by: 986006 on Feb 4, 2013 8:51 AM986006 wrote:
Thanks for the hints up... I have updated my post... As I post the test procedure...it is about the exact the same as the insert query... Every time, the insert would actually insert data into the table but every time I run the test procedure, nothing gets inserted in... It sounds unbelievable but it happens... ThanksYou obviously haven't read the FAQ, or at least you haven't bothered doing what it asks. Help us to help you.
Can you recreate the problem with simpler data on your local machine? If so provide create table and insert statements for test data.
Format your code and place between tags.
At the very least post the *exact* SQL or PL/SQL you are trying to run: what you've posted isn't even valid SQL. -
Insert current date in ASP date/time field
I am trying to create an INSERT record in a database with a
field for the current date. I cannot fimd how to insert the date in
the field by using a default entry or SQL statement. How can I do
this using Dreamweaver for ASP pages? Thanks, JoeFor database server time, use GETDATE or CURRENT_TIMESTAMP in
your query.
For web server time, pass the value from Date() or Now().
"talk2perry" <[email protected]> wrote in
message
news:f4s2i1$3bu$[email protected]..
>I am trying to create an INSERT record in a database with
a field for the
> current date. I cannot fimd how to insert the date in
the field by using a
> default entry or SQL statement. How can I do this using
Dreamweaver for
> ASP
> pages? Thanks, Joe
> -
I can't for the life of me figure out how iCal orders the display of multiple items at the same time. Does anyone have a clue? It's not alphabetical. It's not according the the order of the calendars in the left pane. Is it just random? Any help would be greatly appreciated.
In the focus lost eventhandling start a thread which does
the actual handling.
the new thread waits for a little time (0.1 seconds)
the click event of the button checks for a thread like the one above and tells it not to execute
This way you execute the for the lost focus event only if
the ok button isn't clicked in the same process ... not
realy good, because it kind of relies on the ordering of threads ... but maybe it still works for you? -
How to retrieve multiple columns using "returning" in the Insert query.
hi,
wanted to know how to retrieve multiple columns using "returning" in the Insert Query.
For retrieving one column we write the query as follows:
Insert into TABLE values(1,2,3,4) returning COLUMN1 into PARAMETER
But can we retrive multiple columns in the same query?
am using oracle 10g and coding in .NETHi,
You can definetely get multiple values from a single query using the 'returning' clause.
Eg : insert into emp (empno, ename, job, deptno) values (7324,'ADAM','MARKETING',30) returning ename, deptno into var1, var2; PN : var1 & var2 to be declared as varchar2 & number respectively.
More insight into the 'RETURNING' clause in this link.
http://www.samoratech.com/PLSQL/swArtPLSQLReturn.htm
Regards,
Bhanu. -
Wait for success of flow in PL/SQL
Hi!
I start my flows using the PL/SQL api (createProcess, startProcess). Is there any way to wait for the execution time of the flow in the procedure?
startProcess only starts a background process which executes the flow and terminates successfully after less than a second and returns the focus to my procedure.
I need to call some pl/sql procedures and functions after the (successful) execution of the workflow. Unfortunately I am not able to integrate those procedures into the flow, because workflow does not work correctly with the procedures (RPE-01008 and RPE-01009).
Regards
MichaelHi!
The itemkey is generated by a sequence. Just have a look at the folowing procedure.
Regards
Michael
create or replace procedure start_wf
is
v_itemtype varchar2( 100 ) := 'TOMIS';
v_itemkey varchar2( 100 );
v_job_nr number;
begin
select wf_Seq.nextval()
into v_job_nr
from dual;
v_itemkey := lpad( to_char( v_job_nr ), 5, '0' );
wf_engine.createprocess
itemtype => v_itemtype,
itemkey => v_itemkey,
process => 'MHN_TEST'
-- user_key in varchar2 default null,
-- owner_role in varchar2 default null
wf_engine.setItemAttrNumber
itemtype => v_itemtype,
itemkey => v_itemkey,
aname => 'P01_P_JOB_NR',
avalue => v_job_nr
wf_engine.startprocess
itemtype => v_itemtype,
itemkey => v_itemkey
end;
Maybe you are looking for
-
How do I find the email Microsoft made me create that was different from my normal email?
I had Microsoft 2010 software and because of that, I also have and use OneNote. I had to create an email for microsoft for that, ok, no problem. Then I bought a Surface for which I bought Microsoft 365. During the download program processes, Microso
-
How can I move address book information between Address Book and Entourage?
(I have the same question regarding iCal and Entourage.) I have a lot of important information to enter, info that would be very difficult to relocate. I had some problems with iCal awhile back (it started randomly deleting events), so I am trying to
-
[ANNOUNCE] MyFaces 1.0.9(m9) is now available
From the MyFaces website (http://myfaces.apache.org) ... MyFaces 1.0.9(m9) is now available. The (m9) stands for milestone 9. The license agreement covering JSF and all other JCP based specifications require that we use this terminology and avoid the
-
Why is Safari reloading my pages constantly?
Why is Safari reloading my pages constantly, very annoying. Running OSX 10 and Safari 7,0,4. Started happening today when I turned my mac on. Pages refresh 4 to 5 times per minute and using back page becomes impossible/pointless. I have reset Saf
-
Now that I installed Match and icloud I tried to sync my ipod and the previous songs that i transferred to my lap top from CD's will not transfer to my ipod.