Help in Delete operation
I have a problem when deleting rows from a table. When I created the database the following delete statement worked fine, but now it takes a lot to complete. To delete 600 rows it takes more than 10 minutes. Maybe the transaction log is full, but i don't know how to check the space assigned to it or where is it.
The delete operation is the following one.
DELETE FROM event_TTT WHERE event_TTT.event_id IN
(SELECT event.event_id FROM event WHERE event_TTT.event_id=event.event_id and event.MM_id=1328)
Thank you for your information about statistics. After reading some papers and after checking that automatic statistics are being gathered in my system, I think that my tables do not fulfill the requirements to gather statistics manually ("statistics on tables which are significantly modified during the day"). Maybe I'm wrong. I'll continue reading about this.
Anyway, I've new data about my delete operation. I think it is very slow, but I'll give you the details:
DELETE FROM event_track e
WHERE EXISTS
SELECT
NULL
FROM event e1
WHERE e1.event_id = e.event_id
AND e1.pdep_mission_id = 1328
AND ROWNUM = 1
The is an index on e1.pdep_mission_id.
e1.event_id and e.event_id are primary keys.
Number of rows on e = 117000.
Number of rows on e1 = 120000
Number or rows to delete = 3500
This is the execution plan (with autotrace):
Plan hash value: 660928614
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | DELETE STATEMENT | | 1 | 254 | 217K (1)| 00:31:20 |
| 1 | DELETE | EVENT_TRACK | | | | |
|* 2 | FILTER | | | | | |
| 3 | TABLE ACCESS FULL | EVENT_TRACK | 119K| 28M| 667 (3)| 00:00:06 |
|* 4 | COUNT STOPKEY | | | | | |
|* 5 | TABLE ACCESS BY INDEX ROWID| EVENT | 1 | 9 | 2 (0)| 00:00:01 |
|* 6 | INDEX UNIQUE SCAN | PK_EVENT271 | 1 | | 1 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - filter( EXISTS (SELECT 0 FROM "PDEP"."EVENT" "E1" WHERE ROWNUM=1 AND
"E1"."EVENT_ID"=:B1 AND "E1"."PDEP_MISSION_ID"=1305))
4 - filter(ROWNUM=1)
5 - filter("E1"."PDEP_MISSION_ID"=1305)
6 - access("E1"."EVENT_ID"=:B1)
Estadísticas
11207 recursive calls
26273 db block gets
24517966 consistent gets
23721872 physical reads
4316076 redo size
932 bytes sent via SQL*Net to client
1105 bytes received via SQL*Net from client
6 SQL*Net roundtrips to/from client
12 sorts (memory)
0 sorts (disk)
3518 rows processed
This operation took 2 hours and 5 minutes to complete the deletion of 3500 rows. Do I have to assume that this is correct or maybe I'm doing something wrong ??
Thank you in advance.
Similar Messages
-
Need help in Delete operation using blazeDS
Please find the flex client code and servlet code given below
Trying to call a DELETE methods on the servlet using BlazeDS.Configuration is perfect in the proxy-config.xml and services-config.xml
when DELETE is called with paramter user="krishna it is being printed as
received DELETE operation with parameternull
My Question is why the servlet printing null value for the user where it should print "someuser"?Can some one help me on this?
FLEX CLIENT
<?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Script><![CDATA[
import mx.controls.Alert;
import mx.rpc.http.HTTPService;
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;
public function callServletDELETE():void {
var service:HTTPService = new HTTPService();
//service.url= "http://localhost:8080/examples/blazeDS";service.destination=
"BlazeDSHTTP"; //this is configured in proxy-config.xml fileservice.useProxy =
true; service.method =
"DELETE"; service.resultFormat=
"e4x"; service.addEventListener(
"result", billingCarrierResult);service.addEventListener(
"fault", httpFault); service.send({user:
'someuser'});}
protected function billingCarrierResult(event:ResultEvent):void{
serviceResultsTextArea.text =
"Success with BlazeDS!\n"+event.result;
protected function httpFault(event:FaultEvent):void{
serviceResultsTextArea.text =
"Failure trying to access service.\n"+ event.fault.faultString + "\n" + event.fault.faultDetail;}
]]>
</mx:Script> <mx:TextArea id="serviceResultsTextArea" width="50%" height="50%" />
<mx:Button label="DELETE" click="callServletDELETE()"/>
</mx:Application>
servlet
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
* Simple example intended to demonstrate BlazeDS with HttpService.
public class BlazeHttpExample extends HttpServlet
//excluded other methods GET,POST as they are working fine
* Handles the HTTP <code>DELETE</code> method.
* @param request servlet request
* @param response servlet response
@Override
protected void doDelete(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
System.out.println("received DELETE operation with parameter"+request.getParameter("user"));
@Override
public String getServletInfo()
return "Simple intended to illustrate BlazeDS HttpService support.";in your java code you are considering user as the parameter.. but that is not a parameter..
When making a http call in flex try something like this
var obj:Object = new Object();
obj["user"] = 'someuser';
service.send(obj);
this should work hopefully. -
Delete Operation in JDBC Sender Adapter not works
Hi,
I have one student table which contains the fields ID,Name,BirthMonth,BirthYear,ReadFlag fields. ReadFlag is a character field or lenght 1 which contains only values either 'Y' or ' '.
I want to execute delete operation in this table ie to delete the records which contains the readflag = 'Y'. So, I set the below values for the following parameters.
DELETE FROM student WHERE READFLAG = ' Y '
Query SQL Statement : SELECT * FROM student WHERE readflag = 'Y'
Update SQL Statement : DELETE FROM student WHERE READFLAG = 'Y'
Poll Interval : 60 Seconds.
There are more records in this table which contains readflag = 'Y'. But, the Adapter does not delete those records from the table i.e delete operation is not executed. At the same time, in Comm. Channel monitoring it does not show any error, but the delete operation is not carried out in the table.
I tried after 'COMMIT' the table also. But it does not work. What could be the reason ? or How to use Delete Operation effectively on the table ?
Kindly help me friends to solve this problem.
Thanking you.
Kind Regards,
Jeg.http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm >>>
<i>Adapter Work Method
You must add an indicator that specifies the processing status of each data record in the adapter (data record processed/data record not processed) to the database table.
The UPDATE statement must alter exactly those data records that have been selected by the SELECT statement. You can ensure this is the case by using an identical WHERE clause. (See Processing Parameters, SQL Statement for Query, and SQL Statement for Update below).
<b>Processing can only be performed correctly when the isolation level for transaction is set to repeatable_read or serializable.
Example
SQL statement for query: SELECT * FROM table WHERE processed = 0;
SQL statement for update: UPDATE table SET processed = 1 WHERE processed = 0;
processed is the indicator in the database.</b></i>
try with repeatable_read or serializable !!!
Also go thru this thread - DELETE Querey in JDBC SENDER -
Select Statement Blocking Delete Operation
Hi Experts,
In a Single table am trying to do delete operation but it has been blocked by simple select query.
Database setting : Read Committed Snapshot already set to ON for that database.
Any Idea why SELECT blocking DELETE.
FYI : Before Select statement I could noticed the following setting "set transaction isolation level read committed".
Kindly Advise
Regards,
NandhuFYI : Before Select statement I could noticed the following setting "set transaction isolation level read committed".
Hi NandhuJana,
1. Did you read
Uri Dimant's response?
Please try to remove this statement and check again
2. When we ask you for DDL+DML , the idea is to let us the option to (1) reproduce the issue in some cases, (2) get the best information which is the real database structure, queries, etc'. In this case for example I do not see the isolation level statement
in your code and we need it to understand what is happening :-) The order and structure (nested transactions for example) of statements is what important here.
3. you can check your isolet level using one of those options to make sure what is going in your script:
SELECT TRANSACTION_ISOLATION_LEVEL = CASE transaction_isolation_level
WHEN 0 THEN 'Unspecified'
WHEN 1 THEN 'ReadUncommitted'
WHEN 2 THEN 'ReadCommitted'
WHEN 3 THEN 'Repeatable'
WHEN 4 THEN 'Serializable'
WHEN 5 THEN 'Snapshot'
END
FROM sys.dm_exec_sessions
where session_id = @@SPID
GO
DBCC USEROPTIONS WITH NO_INFOMSGS
GO
I hope this is helpful :-)
Ronen Ariely
[Personal Site] [Blog] [Facebook] -
Need Performance tuning in delete operation
Hi Gurus,
I am performing delete operation by following SQL query.
delete from gl_account where bu_id = -99
but it take long time to execute. Table contains 1 trigger and 5 index. I have disabled the trigger and rebuild the index but still it not executing.
Here is my explain plan.
Operation Object Name Rows Bytes Cost Object Node In/Out PStart PStop
DELETE STATEMENT Optimizer Mode=ALL_ROWS 561 19
DELETE OFFLINETESTDB.GL_ACCOUNT
INDEX RANGE SCAN OFFLINETESTDB.BU_ID 561 27 K 2
Pls help me out to solve this.Hi All,
I am still facing the same performs problem for deleting row in a table.
here by i have attached my TKPROF for your consideration.
TKPROF: Release 10.2.0.1.0 - Production on Tue Oct 12 14:01:13 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Trace file: rubikon_s002_3952.trc
Sort options: exeela exerow
count = number of times OCI procedure was executed
cpu = cpu time in seconds executing
elapsed = elapsed time in seconds executing
disk = number of physical reads of buffers from disk
query = number of buffers gotten for consistent read
current = number of buffers gotten in current mode (usually for update)
rows = number of rows processed by the fetch or execute call
DELETE FROM GL_ACCOUNT
WHERE
GL_ACCT_ID IN (16908,16909,16456)
call count cpu elapsed disk query current rows
Parse 1 0.01 0.13 0 0 0 0
Execute 1 0.03 0.26 0 6 221 3
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.04 0.40 0 6 221 3
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 40 (OFFLINETESTDB)
Rows Row Source Operation
0 DELETE GL_ACCOUNT (cr=177742 pr=160538 pw=0 time=31518664 us)
3 INLIST ITERATOR (cr=6 pr=0 pw=0 time=103 us)
3 INDEX RANGE SCAN GL_ACCOUNT_PK (cr=6 pr=0 pw=0 time=86 us)(object id 65637)
Rows Execution Plan
0 DELETE STATEMENT MODE: ALL_ROWS
0 DELETE OF 'GL_ACCOUNT'
3 INLIST ITERATOR
3 INDEX MODE: ANALYZED (RANGE SCAN) OF 'GL_ACCOUNT_PK'
(INDEX (UNIQUE))
select /*+ all_rows */ count(1)
from
"OFFLINETESTDB"."GL_ACCOUNT_SUMMARY" where "GL_ACCT_ID" = :1 and
"GL_ACCT_NO" = :2
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 3 0.00 0.06 0 0 0 0
Fetch 3 0.00 0.00 0 6 0 3
total 7 0.00 0.06 0 6 0 3
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
3 SORT AGGREGATE (cr=6 pr=0 pw=0 time=236 us)
0 VIEW index$_join$_001 (cr=6 pr=0 pw=0 time=185 us)
0 HASH JOIN (cr=6 pr=0 pw=0 time=172 us)
0 INDEX RANGE SCAN GL_ACCOUNT_SUMMARY_IX2 (cr=6 pr=0 pw=0 time=82 us)(object id 65648)
0 INDEX RANGE SCAN GL_ACCOUNT_SUMMARY_IX1 (cr=0 pr=0 pw=0 time=0 us)(object id 65647)
select /*+ all_rows */ count(1)
from
"OFFLINETESTDB"."GL_ACCOUNT_QUARTERLY_STAT" where "GL_ACCT_ID" = :1 and
"GL_ACCT_NO" = :2
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 3 0.00 0.06 0 0 0 0
Fetch 3 1.64 20.79 108398 109500 0 3
total 7 1.64 20.86 108398 109500 0 3
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
3 SORT AGGREGATE (cr=109500 pr=108398 pw=0 time=20797344 us)
0 TABLE ACCESS FULL GL_ACCOUNT_QUARTERLY_STAT (cr=109500 pr=108398 pw=0 time=20797279 us)
select /*+ all_rows */ count(1)
from
"OFFLINETESTDB"."GL_ACCOUNT_MONTHLY_STAT" where "GL_ACCT_ID" = :1 and
"GL_ACCT_NO" = :2
call count cpu elapsed disk query current rows
Parse 2 0.00 0.00 0 0 0 0
Execute 4 0.00 0.06 0 0 1 0
Fetch 3 0.75 10.11 52140 59532 0 3
total 9 0.75 10.18 52140 59532 1 3
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Parsing user id: SYS
Rows Row Source Operation
3 SORT AGGREGATE (cr=59532 pr=52140 pw=0 time=10116280 us)
0 TABLE ACCESS FULL GL_ACCOUNT_MONTHLY_STAT (cr=59532 pr=52140 pw=0 time=10116221 us)
select /*+ all_rows */ count(1)
from
"OFFLINETESTDB"."GL_ACCOUNT_RECON_TXN_JOURNAL" where "GL_ACCT_ID" = :1
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 3 0.00 0.02 0 0 0 0
Fetch 3 0.00 0.00 0 9 0 3
total 7 0.00 0.02 0 9 0 3
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
3 SORT AGGREGATE (cr=9 pr=0 pw=0 time=138 us)
0 TABLE ACCESS FULL GL_ACCOUNT_RECON_TXN_JOURNAL (cr=9 pr=0 pw=0 time=97 us)
select text
from
view$ where rowid=:1
call count cpu elapsed disk query current rows
Parse 3 0.01 0.00 0 0 0 0
Execute 3 0.01 0.00 0 0 2 0
Fetch 3 0.00 0.00 0 6 0 3
total 9 0.03 0.00 0 6 2 3
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
1 TABLE ACCESS BY USER ROWID VIEW$ (cr=1 pr=0 pw=0 time=34 us)
select /*+ all_rows */ count(1)
from
"OFFLINETESTDB"."GL_BULK_CRITERIA" where "GL_ACCT_ID" = :1
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 3 0.00 0.00 0 0 0 0
Fetch 3 0.00 0.00 0 9 0 3
total 7 0.00 0.00 0 9 0 3
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
3 SORT AGGREGATE (cr=9 pr=0 pw=0 time=109 us)
0 TABLE ACCESS FULL GL_BULK_CRITERIA (cr=9 pr=0 pw=0 time=71 us)
select /*+ all_rows */ count(1)
from
"OFFLINETESTDB"."GL_ACCOUNT_HISTORY" where "GL_ACCT_ID" = :1
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 3 0.00 0.00 0 0 0 0
Fetch 3 0.01 0.02 0 5070 0 3
total 7 0.01 0.02 0 5070 0 3
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
3 SORT AGGREGATE (cr=5070 pr=0 pw=0 time=22519 us)
0 TABLE ACCESS FULL GL_ACCOUNT_HISTORY (cr=5070 pr=0 pw=0 time=22472 us)
select /*+ all_rows */ count(1)
from
"OFFLINETESTDB"."GL_ACCOUNT_BULK_HISTORY" where "GL_ACCT_ID" = :1
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 3 0.00 0.00 0 0 0 0
Fetch 3 0.00 0.00 0 9 0 3
total 7 0.00 0.00 0 9 0 3
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
3 SORT AGGREGATE (cr=9 pr=0 pw=0 time=106 us)
0 TABLE ACCESS FULL GL_ACCOUNT_BULK_HISTORY (cr=9 pr=0 pw=0 time=69 us)
select /*+ all_rows */ count(1)
from
"OFFLINETESTDB"."GL_ALLOTMENT" where "POOL_ACCT_ID" = :1 and "POOL_ACCT_NO" =
:2
call count cpu elapsed disk query current rows
Parse 1 0.00 0.02 0 0 0 0
Execute 3 0.00 0.00 0 0 0 0
Fetch 3 0.00 0.00 0 3 0 3
total 7 0.00 0.02 0 3 0 3
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
3 SORT AGGREGATE (cr=3 pr=0 pw=0 time=113 us)
0 TABLE ACCESS BY INDEX ROWID GL_ALLOTMENT (cr=3 pr=0 pw=0 time=68 us)
0 INDEX RANGE SCAN GL_ALLOTMENT_IX1 (cr=3 pr=0 pw=0 time=50 us)(object id 65651)
select /*+ all_rows */ count(1)
from
"OFFLINETESTDB"."GL_ACCOUNT_YEARLY_STAT" where "GL_ACCT_ID" = :1 and
"GL_ACCT_NO" = :2
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 3 0.00 0.00 0 0 0 0
Fetch 3 0.01 0.01 0 3453 0 3
total 7 0.01 0.01 0 3453 0 3
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
3 SORT AGGREGATE (cr=3453 pr=0 pw=0 time=10485 us)
0 TABLE ACCESS FULL GL_ACCOUNT_YEARLY_STAT (cr=3453 pr=0 pw=0 time=10440 us)
select /*+ all_rows */ count(1)
from
"OFFLINETESTDB"."BU_GL_INTERFACE_ACCOUNT" where "CASH_GL_ACCT_ID" = :1 and
"CASH_GL_ACCT_NO" = :2
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 3 0.00 0.00 0 0 0 0
Fetch 3 0.00 0.00 0 9 0 3
total 7 0.00 0.00 0 9 0 3
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
3 SORT AGGREGATE (cr=9 pr=0 pw=0 time=110 us)
0 TABLE ACCESS FULL BU_GL_INTERFACE_ACCOUNT (cr=9 pr=0 pw=0 time=71 us)
select /*+ all_rows */ count(1)
from
"OFFLINETESTDB"."BU_GL_INTERFACE_ACCOUNT" where "DEPOT_GL_ACCT_ID" = :1 and
"DEPOT_GL_ACCT_NO" = :2
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 3 0.00 0.00 0 0 0 0
Fetch 3 0.00 0.00 0 9 0 3
total 7 0.00 0.00 0 9 0 3
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
3 SORT AGGREGATE (cr=9 pr=0 pw=0 time=107 us)
0 TABLE ACCESS FULL BU_GL_INTERFACE_ACCOUNT (cr=9 pr=0 pw=0 time=71 us)
select /*+ all_rows */ count(1)
from
"OFFLINETESTDB"."GL_TXN_ALLOTTEE" where "GL_ALLOTTEE_ACCT_ID" = :1 and
"GL_ALLOTTEE_ACCT_NO" = :2
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 3 0.00 0.00 0 0 0 0
Fetch 3 0.00 0.00 0 9 0 3
total 7 0.00 0.00 0 9 0 3
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
3 SORT AGGREGATE (cr=9 pr=0 pw=0 time=122 us)
0 TABLE ACCESS FULL GL_TXN_ALLOTTEE (cr=9 pr=0 pw=0 time=84 us)
select /*+ all_rows */ count(1)
from
"OFFLINETESTDB"."BU_GL_INTERFACE_ACCOUNT" where "POSN_GL_ACCT_ID" = :1 and
"POSN_GL_ACCT_NO" = :2
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 3 0.00 0.00 0 0 0 0
Fetch 3 0.00 0.00 0 9 0 3
total 7 0.00 0.00 0 9 0 3
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
3 SORT AGGREGATE (cr=9 pr=0 pw=0 time=110 us)
0 TABLE ACCESS FULL BU_GL_INTERFACE_ACCOUNT (cr=9 pr=0 pw=0 time=69 us)
select /*+ all_rows */ count(1)
from
"OFFLINETESTDB"."GL_ALLOTTEE" where "RECIPIENT_ACCT_ID" = :1 and
"RECIPIENT_ACCT_NO" = :2
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 3 0.00 0.00 0 0 0 0
Fetch 3 0.00 0.00 0 9 0 3
total 7 0.00 0.00 0 9 0 3
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
3 SORT AGGREGATE (cr=9 pr=0 pw=0 time=155 us)
0 TABLE ACCESS FULL GL_ALLOTTEE (cr=9 pr=0 pw=0 time=119 us)
select /*+ all_rows */ count(1)
from
"OFFLINETESTDB"."BU_GL_INTERFACE_ACCOUNT" where "INTER_BU_GL_ACCT_ID" = :1
and "INTER_BU_GL_ACCT_NO" = :2
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 3 0.00 0.00 0 0 0 0
Fetch 3 0.00 0.00 0 9 0 3
total 7 0.00 0.00 0 9 0 3
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
3 SORT AGGREGATE (cr=9 pr=0 pw=0 time=102 us)
0 TABLE ACCESS FULL BU_GL_INTERFACE_ACCOUNT (cr=9 pr=0 pw=0 time=67 us)
select /*+ all_rows */ count(1)
from
"OFFLINETESTDB"."GL_BUDGET_ITEM_DATA" where "GL_ACCT_ID" = :1
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 3 0.00 0.00 0 0 0 0
Fetch 3 0.00 0.00 0 9 0 3
total 7 0.00 0.00 0 9 0 3
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
3 SORT AGGREGATE (cr=9 pr=0 pw=0 time=151 us)
0 TABLE ACCESS FULL GL_BUDGET_ITEM_DATA (cr=9 pr=0 pw=0 time=108 us)
select /*+ all_rows */ count(1)
from
"OFFLINETESTDB"."GL_TOTALLING_ACCOUNT_LINE" where "GL_ACCT_ID" = :1
call count cpu elapsed disk query current rows
Parse 1 0.00 0.02 0 0 0 0
Execute 3 0.00 0.00 0 0 0 0
Fetch 3 0.00 0.00 0 9 0 3
total 7 0.00 0.02 0 9 0 3
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
3 SORT AGGREGATE (cr=9 pr=0 pw=0 time=119 us)
0 TABLE ACCESS FULL GL_TOTALLING_ACCOUNT_LINE (cr=9 pr=0 pw=0 time=82 us)
select /*+ all_rows */ count(1)
from
"OFFLINETESTDB"."SWEEP_FUNDS_XFER" where "TO_GL_ACCT_ID" = :1
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 3 0.01 0.00 0 0 0 0
Fetch 3 0.00 0.00 0 9 0 3
total 7 0.01 0.00 0 9 0 3
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
3 SORT AGGREGATE (cr=9 pr=0 pw=0 time=123 us)
0 TABLE ACCESS FULL SWEEP_FUNDS_XFER (cr=9 pr=0 pw=0 time=84 us)
select /*+ all_rows */ count(1)
from
"OFFLINETESTDB"."GL_ACCESS_ACCOUNT_LIST" where "GL_ACCT_ID" = :1
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 3 0.00 0.00 0 0 0 0
Fetch 3 0.00 0.00 0 9 0 3
total 7 0.00 0.00 0 9 0 3
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
3 SORT AGGREGATE (cr=9 pr=0 pw=0 time=117 us)
0 TABLE ACCESS FULL GL_ACCESS_ACCOUNT_LIST (cr=9 pr=0 pw=0 time=79 us)
select /*+ all_rows */ count(1)
from
"OFFLINETESTDB"."SETTLEMENT_BANK_ACCOUNT" where "MIRROR_GL_ACCT_ID" = :1
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 3 0.00 0.00 0 0 0 0
Fetch 3 0.00 0.00 0 9 0 3
total 7 0.00 0.00 0 9 0 3
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
3 SORT AGGREGATE (cr=9 pr=0 pw=0 time=121 us)
0 TABLE ACCESS FULL SETTLEMENT_BANK_ACCOUNT (cr=9 pr=0 pw=0 time=86 us)
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 8 0.01 0.29 0 0 8 0
Execute 11 0.03 0.32 0 6 222 3
Fetch 7 0.75 10.11 52140 59532 0 7
total 26 0.79 10.73 52140 59538 230 10
Misses in library cache during parse: 7
Misses in library cache during execute: 2
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 47 0.01 0.06 0 0 0 0
Execute 85 0.03 0.18 0 0 2 0
Fetch 85 1.67 20.83 108398 118214 0 85
total 217 1.71 21.08 108398 118214 2 85
Misses in library cache during parse: 21
Misses in library cache during execute: 20
7 user SQL statements in session.
48 internal SQL statements in session.
55 SQL statements in session.
5 statements EXPLAINed in this session.
Trace file: rubikon_s002_3952.trc
Trace file compatibility: 10.01.00
Sort options: exeela exerow
1 session in tracefile.
7 user SQL statements in trace file.
48 internal SQL statements in trace file.
55 SQL statements in trace file.
29 unique SQL statements in trace file.
5 SQL statements EXPLAINed using schema:
OFFLINETESTDB.prof$plan_table
Default table was used.
Table was created.
Table was dropped.
548 lines in trace file.
32 elapsed seconds in trace file.Thanks & Regards
Sami -
How to override the default delete operation
Hi,
I am new to Jheadstart, java coding for that matter.
Here's my situation,
I have a view which is based on a function (function returns a collection).
I have created instead of triggers on this view to perform insert/update/delete operations.
All these DML operations work as expected in Oracle database.
Now, I created an Entity object and a view object on this view in my jheadstart project.
When I run this Jheadstart application my insert and search operations run fine but update and delete operations fail with JBO-26080 error.
The underlying oracle error is "ORA-02014: cannot select FOR UPDATE from view with DISTINCT, GROUP BY, etc."
I know that delete and update operations work fine in Oracle and hence I would like to override the default Jheadstart operations. Can any body tell me how can I do it or point me in right direction?Hi,
From the JHeadstart Developer's Guide, chapter TroubleShooting - Problem Assessment:
If you are getting a JBO error (Business Components for Java error), try to perform the same data retrieval or data manipulation action using the BC4J Tester. You can
invoke the tester through a right-mouse-click on the BC4J application module. If you get the same error using the BC4J tester, the problem is in the BC4J object definitions. If you added business rules, or other custom code to your BC4J objects that executes during your data retrieval or data manipulation action, you can debug this code line-by-line by running the tester in debug mode. You can also look up the JBO error in the JDeveloper online help, for each error possible causes and how to solve them are described.
It sounds to me like you will also get this error in the BC4J Tester. This means that the problem is not related to JHeadstart. You can go to the JDeveloper discussion forum http://otn.oracle.com/discussionforums/jdev.html and ask your question there without mentioning JHeadstart. Maybe there is some switch you can set in the BC4J object to let BC4J not use SELECT FOR UPDATE.
Hope this helps,
Sandra Muller
JHeadstart Team -
Database Auditing to record DELETE operation on a schema for all tables.
Hi,
I am using ORACLE DATABASE 11g. I want to apply the AUDIT feature to record all the DELETE operations happening on the schema tables.
I did the following steps but dint got the proper output :-
I logged into the SYS as sysdba user and set
alter system set audit_trail=DB,EXTENDED scope=spfile;then i executed this command to record the sql which will use the DELETE privileges
AUDIT DELETE ANY TABLE;Then i bounced back my DB and for testing purpose i created a table in SCOTT schema and inserted 10 rows in it and then DELETE all the rows from it.
As per expectation i check the view
select * from aud$
where spare1 like '%MACHINE1%'
and USERID='SCOTT'
order by ntimestamp#;The output i got is :-
34 168368 1 1 SCOTT I-DOMAIN\MACHINE1 MACHINE1 100 0 Authenticated by: DATABASE; Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=2565)) MACHINE1 5 21-DEC-11 07.02.58.621000 AM 0 928:5024 0000000000000000 983697018 <CLOB> <CLOB> But here i don't see the SQL generated in the last column.
What i was expecting is that if i fire a DELETE statement in the schema it will get logged here and with the help of this view i will be able to see that which user from which machine executed a DELETE statement and what that statement was?
Please let me know what step i have missed here.
PS:- The ACTION# column shows 100 , is it the code for DELETE action. I also accessed the DBA_AUDIT_TRAIL view but din't found any usefull info their.
Thanks in advance.Try instead:
audit delete table;AUDIT DELETE ANY TABLE is auditing use of DELETE ANY TABLE privilege. -
HCM Processes & Forms: Change & Delete Operations
Hi,
I've been working on Processes & Forms.
One of my processes is a typical address change. In this process, it's possible for the user to change any of his/her addresses. This means that the process is customized to accept subtype * of infotype 0006. This is working fine, we can change and create addresses.
The problem is that we want to delete addresses too, but P&F doesn't allow two operations for the same infotype. We also tried to follow note 1043692, using the DELETE_DATASET reserved field, but it's not possible to use rules on SAP_PA using fields that are not defined for this back-end service.
Any help on this?
Regards,
Fábio.Sorry for the delay,
I've never configured a process for Absences, but since you're talking about this infotype, I think you're trying to delete the record completely. However, in P&F the "delete operation" means that a record is deleted as of the effective date (i.e. delimited).
Example: I'm deleting a temporary address: the record will still be there, but the new end date will be the effective date that I chose.
So if you're expecting the absence to disappear, it will not happen unless you set the effective date to the begin date of that record.
Regards,
Fabio. -
Soa11g: DB Adapter Delete Operation and Transaction
Guys,
I need your help to understand the transaction flow in SOA 11g.
We have two table with primary and foreign key replationship.
Master Table: Employee (empId Primary Key)
Child Table : Department (empId Foreign Key)
Employee is associated with Department table with 1 to N relationship.
We have a composite with BPEL process. In Input of the BPEL we are getting 1 employee with many department. Our design is like below.
1) get the message.
2) read the empId from Input.
3) delete N records from Department table using DB adapter Delete Operation by passing empId as an Input. *(INVOKE 1)*
4) delete 1 records from Employee table by passing empId as an Input. *(INVOKE 2)*
I have following doubts.
1) Since without deleting the child records we can't delete parents. Before INVOKE 2(invoking DB adapter to delete parent record), I want to make sure that INVOKE 1 has completed ( all the child records have deleted successfully.) How to achieve this in BPEL?
2) let's say we have 5 child records. after deletion of 3rd record, DB gets down or some fault occurs ...will the entire transaction be roll back?
In this scenario we want to delete only 3 records without deleting the parent records . How to achieve this in BPEL.
3) what all are the transaction property available in SOA 11g to control the transactions.
Any inputs is appreciated!!
Thanks,
ABHi,
1 st DB adapter Delete operation(Child Table deletion) successfully completed with out DB Down or with out any errors.
2 nd DB adapter delete operation failed (Master Table Deletion) due to DB down (or) due to remote fault.
In the above scenario ... Is 1 st DB adapter delete operation gets roll back?
( or)
It commits even second one get failed...
In case of first one commits how can i achieve roll back of first one automatically if second one fails...
Any one can explain how the transaction concept works with DB adapters..?
Thanks&Regards,
Sridhar Rachumallu -
I have the follwing table is called master table contain the follwing fields,
So here i need to create three Stored procedures
1.Insert operations(1 o/p paramter,and 14 input paramters) - uspInsert
2.Update operations(1 o/p paramter,and 14 input paramters) - uspUpdate
3.Delete Operations(1 o/p paramter,and 14 input paramters)
- uspdelte
The following is the table ,so using this to make the three sp's ,Here we will use Exception machanism also.
Location
Client Name
Owner
ConfigItemID
ConfigItemName
DeploymentID
IncidentID
Package Name
Scope
Stage
Type
Start Date
End Date
Accountable
Comments
So can u pls help me out for this ,bcz i knew to stored procedure's creation.I have the follwing table is called master table contain the follwing fields,
So here i need to create three Stored procedures
1.Insert operations(1 o/p paramter,and 14 input paramters) - uspInsert
2.Update operations(1 o/p paramter,and 14 input paramters) - uspUpdate
3.Delete Operations(1 o/p paramter,and 14 input paramters) - uspdelte
The following is the table ,so using this to make the three sp's ,Here we will use Exception machanism also.
Location
Client Name
Owner
ConfigItemID
ConfigItemName
DeploymentID
IncidentID
Package Name
Scope
Stage
Type
Start Date
End Date
Accountable
Comments
So can u pls help me out for this ,bcz i knew to stored procedure's creation.
Why you have to pass 14 parameters for DELETE and UPDATE? Do you have any Primary Key? If you do NOT have primary key in your table then in case you have duplicate information, SQL will update both or delete them together. You need to provide DDL of
you table. What are the data types of fields?
Best Wishes, Arbi; Please vote if you find this posting was helpful or Mark it as answered. -
Hi All,
I am very new to OAF. I am trying to complete the below delete operation. But logicwise I am not able to
get an idea. Please help me.
Requirement:
If user give the po number and click on "GO" button i need to display the all 10 lines of this po.
I completed this.
Now all these 10 lines have check boxes. If user selects 5 lines out of 10 lines and click on "DELETE" button
all the selected 5 lines have to be deleted.
So in the process form request i have to write the code to achive this. But not able to move further from here.
Can we delete these lines without connecting to the database? I mean by taking the references of selected check boxes
can we delete these rows?
Please help.
Regards
Chandra.Chandra,
Step 1 - Create a Trasient attribute with the VO attached to the Table. And attach this to the Mulltiple selection VO attribute.
Step 2 - Below code will return all the selected rows by the user
OAViewObject vo = (OAViewObject) getRoundVO1();
Row[] selectRows1 = vo.getFilteredRows("Selectflag","Y") ;//where Selectflag is the trasient attribute attached with the Multiple selection VO attribute.
for(int i=0; i<selectRows.length; i++)
RoundVORowImpl selectedRows = (RoundVORowImpl) selectRows;
String meaning =(String) selectedRows.getAttribute("<Primary Attribute Name>");
System.out.println("value of meaning: "+meaning);
//Now pass the meaning to the procedure to delete the selected rows.
Regards,
Gyan -
BAPI_ALM_ORDER_MAINTAIN - cost determination error when deleting operations
Dear all,
I have a problem with BAPI 'BAPI_ALM_ORDER_MAINTAIN'.
When I add and delete operations several times in an order using this BAPI, cost determination works incorrectly:
in transaction IW32 Plan costs sum on 'Costs' tab becomes wrong. But if I look at the detailed report (Rep. Plan/Act button on the same tab), the total plan costs sum is correct.
What I have tried so far:
1. adding method 'CALCULATE' for the header (within the same call and within a call in separate transaction)
2. changing the order in IW32 and saving it
3. 'Calculate costs' button in the same transaction
3. clearing buffers using FM 'CO_ZF_DATA_RESET_COMPLETE' before calling the BAPI,
but without luck.
Any help will be much appreciated!
AndreyHi Andrey,
Thanks a lot for the prompt reply.
As you said, the problem is in the standard BAPI BAPI_ALM_ORDER_MAINTAIN where the costs table is not getting refreshed, it is taking the buffer value.
Few OSS notes like 750606 were suggested by SAP, which also suggested the solution suggested by you, ( to use'Destination 'NONE' when callling the function module so that the BAPI will get called in the new session each time ),but it did not work. and SAP note also says that the complete solution is not yet implemented.
So, to resolve this ( to clear the buffer) I have used two programs, the internal one is called by the main program using 'submit' statmeent so that buffer value is cleared as it is a separate program. Finally it worked out
Thanks & Regards,
Vishnu Priya -
Track the delete operation.
Guys,
I've an Oracle table from which records get deleted very often.
I would like to track the user(and the system name) who issued the delete operation,timestamp of the operation and the no. of records deleted from the user's transaction.Can someone help me with a procedure for this task?
Thanks,
Sevuga.Thanks Jameel.
I've got it working now.
Let me share the steps that I've followed to set the auditing 'ON' on the table concerned.
CONNECT system/manager AS SYSDBA
-- Truncate the database audit table.
-- The database audit table was truncated so any old audited information will be deleted for
TRUNCATE TABLE aud$
-- View the AUDIT_TRAIL parameter value.
SHOW PARAMETER audit_trail
-- The NONE value indicates that the audit process was not activated.
-- Change the AUDIT_TRAIL parameter to db.
ALTER SYSTEM SET audit_trail=db SCOPE=spfile
-- Shutdown and startup the database. Use the default Server Parameter File (SPFILE).
-- Notice that when the AUDIT_TRAIL option is set to db, our audit trail information is stored in the AUD$ table owned by sys.
-- And also, when AUDIT_TRAIL is set to Operating System,ouraudit trail information will be stored in the director named by the AUDIT_FILE_DEST parameter.
-- In our case, we are storing data into the AUD$ table in the Oracle database.
SHUTDOWN IMMEDIATE
CONNECT system/manager AS SYSDBA
STARTUP
-- View the AUDIT_TRAIL value again.
SHOW PARAMETER audit_trail
-- Notice that this time, the value would be changed to db.
-- Query the AUD$ table.
SELECT * FROM aud$
-- Notice that there are no records in the audit table.
-- Audit who ever deleted a record from the EMP table.
AUDIT DELETE
ON emp
BY ACCESS
WHENEVER SUCCESSFUL
-- Connect as the normal user.
CONNECT scott/tiger
DELETE FROM emp
WHERE empno = 9999
COMMIT
-- Connect again as the SYSTEM/MANAGER user.
CONNECT system/manager AS SYSDBA
-- View the SYS.AUD$ table to display the date and time who (username), and what (statement of an action) was done.
SELECT
TO_CHAR(timestamp#,'DD-MON-YYYY HH24:MI:SS') as "Date and Time",
userid, name "Action by user"
FROM sys.aud$ JOIN sys.audit_actions
ON action = action#
Thanks,
Sevuga -
Finding Deleted operations in a Order
Hi all,
I need a way to find the deleted operations in an order for a smartform. if a operation is deleted in a particular order it should not be printed in the form. What i need is where to find the indicator that the operation in the particular order is deleted. It would be great if anyone can help me with this.
Thank You.HI all,
I have the same problem in PP smartforms, someone has solved? thanks -
Help for delete data!!!
hi,
i want to delete some data from a table and i wrote a sql query likes that
DELETE
FROM crm2.employee e
WHERE e.lastname = 'VOX'
AND length(e.loginname) >= 39
AND e.pkey NOT IN (SELECT employeegroup FROM groupmember)
AND ROWNUM < 2;
although that query deletes 1 row but it takes too much time to delete.
how can i fix that problem, i want to do that delete operation very fast.
PS: groupmember is the parent table of the crm2.employee
Thanks...This should help you delete your data faster.
When your query takes too long ...
Maybe you are looking for
-
HELP - My Mac Mini May Have Breathed its last Breadth
I have a 3 year old Mac Mini. I came downstairs over the weekend to use it and it appeared to have frozen due to software update. So, I did the hard shutdown (held the powerbutton). When I restarted, I received the folder with a blinking question mar
-
Two dependent transactions in BDC
Hi experts, how to process dependent transactions in BDC such as creating a request for quotation & based on the request for quotation document processing ME21 plz send me some idea & same code.. Thank you.
-
About a decade ago I took the CCNA course but not the certification , so I have a good level of knowledge. I do IT support for a non profit and we acquired an SR520. We chose it because we want to set up 3 to 5 VPN's allowing a few folks to work from
-
Photoshop CS5 freezes when I try to open photomerge
I am using PS CS5.1 from the Creative suit 5.5 design premium on an iMac with the 10.7 Lion operating system. The latest 12.1 photoshop update has been installed.
-
Hi friends While copying oracle DVD and oracle Patch dvd on local disk from DVD rom it gives following error cp : 0653-447 Requested a write of 4096 bytes, but wrote only 3584. What can be the possibility i am giving command pwd /cdrom #cp -r * /sapc