Execution time difference between SELECT & UPDATE statement in JDBC Sender.
Hi Experts,
In my scenario, I have used the JDBC Sender Adapter with the SELECT and UPDATE statement.
Now the problem is in between the execution of Select and update statement, few more entries are coming in the same DB Table.
So result of this is updation take place for those entries which are not even picked up by the select statement.
Can we avoid this execution time difference between the SELECT & UPDATE statemet on JDBC Sender side???
Thanks & Regards
Jagesh
Hi
Use serializable option in additional parameters, now all new entries would also be updated.
Similar Messages
-
Execution time difference between Statspack and DBM_Monitor trace
Hi Everyone,
We noticed that output of query execution time is quite differ between statspack and session tracing (DBMS_MONITOR) report. The query execution time in Statspack was 1402 sec and in session trace file was 312.25 Sec. FYI database version is 11.2.0.3 which is installed on platform OL 5.8
Both of the following reports (Staspack/tracing) was executed on same system and at the same time. Could you suggest why execution time is differ in staspack and session tracing?
Staspack execution time :-
Elapsed Elap per CPU Old
Time (s) Executions Exec (s) %Total Time (s) Physical Reads Hash Value
1402.50 1 1402.50 9.1 53.92 256,142 3247794574
select * from ( select * from ( select resourcecontentslocati
on,isprotocolname,ismimecontenttype,indexedmetatext,objectid,met
atext,valueaddxml,resourcetype,resourceviewedtime,iscmaresultid,
resourcelastviewedbyuser,issequencenumber,nvl(length(contents),0
Session tracing time:-
call count cpu elapsed disk query current rows
Parse 1 10.58 256.44 43364 153091 0 0
Execute 1 0.01 0.08 0 0 0 0
Fetch 143 2.09 55.72 25440 32978 0 1000
total 145 12.69 312.25 68804 186069 0 1000
Thanks
RajdeepHi,
First of all, please read the [url https://wikis.oracle.com/display/Forums/Forums+FAQ]FAQ page and find out how to use the code tags to format your output properly so that it's readable.
I don't want to work out the stats formatting but I'd guess that if you ran the query first time and the data was not cached, it would be slower than the 2nd query when it was cached. The stats should confirm this so please format them so we can see it properly.
Rob -
Update- statement in JDBC sender Adapter
Hi ,
I have a requirement where I am trying to fetch data from ODS based on some flag and immediately I want to update the flag status . So I used selected and update in JDBC sender adapter .
But I have one question , in the small timeframe where XI has done a select and just before XI could issue the update statement if a new record is added to ODS . Then that new record will also get updated though it wasnot selected in select statement .
Can someone let me know how to overcome this problem ; as I want to make sure I update only those recrods which are selected in select statement ??
Thanks & Regards,
SuvarnaHi,
Check out the following thread. It gives the exact answer to this question.
JDBC Sender Update Query
One of the replies in the above thread:
I put in an OSS note asking this exact question with your specific example, and got a reply. I was referred to OSS note 0000831162, where it is explained very unambiguously that the SELECT and UPDATE queries are run in the same transaction.
Regards,
P.Venkat
Message was edited by:
Venkataramanan -
How to calculate the % of time difference between different state
Hi there,
The below query returns the follwoign outptut. I need to calculate the % of time period that a specific state ( state ex: open or closed or all report )exists.
I have to find the time difference between the 2 states . How could I do that ?
The first row shows null for the previous state . How could get actual previous state for the first row?
SELECT si.station_name,
vppstation.avi_control_state_code.STATE_SHORT_NAME,
ash.state_id ,
lag(ash.state_id) over (order by ash.STATE_EFF_DATE desc) previous_state,
TO_NUMBER(TO_CHAR(ash.state_eff_date, 'SSSSS')) "periods in sec",
TO_CHAR(ash.state_eff_date, 'dd-mon-yyyy hh24:mi:ss am') "Date"
from vppstation.avi_state_history ash
left outer join vppstation.avi_control_state_code
on ash.state_id = vppstation.avi_control_state_code.state_id
LEFT OUTER JOIN vpproadside.stations_installed si
ON ash.station_id = si.station_id
where ash.state_eff_date >= to_date('28/02/2010', 'dd/mm/yyyy')
and ash.state_eff_date <= to_date('03/03/2010', 'dd/mm/yyyy') ;
group by si.station_name
ash.state_id
order by ash.state_eff_date asc ;
STATION_NAME STATE_SHORT_NAME STATE_ID PREVIOUS_STATE periods in sec Date
IRDNCST02 Open 1 NULL 85166 01-mar-2010 23:39:26 pm
IRDNCST02 All Report 3 1 85159 01-mar-2010 23:39:19 pm
IRDNCMT01 Closed 2 3 81376 01-mar-2010 22:36:16 pm
IRDNCST02 Open 1 2 78723 01-mar-2010 21:52:03 pm
IRDNCST02 All Report 3 1 76023 01-mar-2010 21:07:03 pm
IRDNCMT01 Open 1 3 55922 01-mar-2010 15:32:02 pm
IRDNCMT01 Closed 2 1 54931 01-mar-2010 15:15:31 pm
IRDNCHA01 Closed 2 2 41291 01-mar-2010 11:28:11 am
IRDNCAS01 Open 1 2 38847 01-mar-2010 10:47:27 am
IRDNCAS01 All Report 3 1 37947 01-mar-2010 10:32:27 am
IRDNCST02 Open 1 3 35332 01-mar-2010 09:48:52 am
IRDNCST02 All Report 3 1 32632 01-mar-2010 09:03:52 am
IRDNCST02 Open 1 3 31502 01-mar-2010 08:45:02 am
IRDNCST02 All Report 3 1 28802 01-mar-2010 08:00:02 am
IRDNCHI01 Open 1 3 25368 01-mar-2010 07:02:48 am
IRDNCHI02 Open 1 1 23939 01-mar-2010 06:38:59 am
IRDNCMT01 Open 1 1 20696 01-mar-2010 05:44:56 am
IRDNCCH02 Open 1 1 13452 01-mar-2010 03:44:12 am
Edited by: Indhu Ram on Mar 11, 2010 1:34 PM
Edited by: Indhu Ram on Mar 11, 2010 2:20 PMIf you look at the table which is output of the given query , there is column called "STATE_ID" It shows the current state ie open or closed or all report.
The column 'PREVIOUS_STATE' shows the state before the current state. .In the table in 2nd row in previous_state column there is state_id = 1 (open)which is the state before 'all report state' -
Difference between select single * & select upto 1 rows
difference between select single * & select upto 1 rows
Hi,
According to SAP Performance course the SELECT UP TO 1 ROWS is faster than SELECT SINGLE because you are not using all the primary key fields.
Select single is a construct designed to read database records with primary key. In the absence of the primary key, it might end up doing a sequential search, whereas the select up to 1 rows may assume that there is no primary key supplied and will try to find most suitable index.
The best way to find out is through sql trace or runtime analysis.
Use "select up to 1 rows" only if you are sure that all the records returned will have the same value for the field(s) you are interested in. If not, you will be reading only the first record which matches the criteria, but may be the second or the third record has the value you are looking for.
The System test result showed that the variant Single * takes less time than Up to 1 rows as there is an additional level for COUNT STOP KEY for SELECT ENDSELECT UP TO 1 ROWS.
The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique.
Mainly: to read data from
The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.
Mainly: to check if entries exist.
Select Single
You need to mention all the key fields of the table.
No END SELECT required.
More performance compared to upto 1 row.
Where as UP to 1 row.
YOu can use if you do not have all the primiary key fields available.
END SELECT requeired.
Since all keys are not passing, possiblities of have other rows which satisfies the condition.
Select Statement with EndSelect is a loop, which in a single run retrieves a single Record. This Record has to be stored in a Work Area and then appended into an Internal Table.
Select Statements without EndSelect is not a loop and it retrieves the whole Record set matching the Criteria in a single shot and has to be Stored in an Internal Table Directly.
The most important thing to remember about the SELECT SINGLE is
There are several things to remember:
1) It retrieves only one row
2) It does not need an ENDSELECT statement
3) THE FULL KEY OF THE TABLE MUST BE INCLUDED IN
THE WHERE CLAUSE OF THE SELECT STATEMENT
Regards -
What's the difference between "PreparedStatement" and "Statement"?
What's the difference between "PreparedStatement" and "Statement"?
Which is better??????Read the docs for the two classes. The differences are apparent there.
Which one is better depends on your needs. I think that constructing and executing a PreparedStatement can be a bit less performant than just a Statement, if you're only executing the query one time. But I don't think that difference will normally be noticable in the context of a given application.
Additionally, if you have to pass any dates or strings to the query, you'll want PreparedStatement's parameters, rather than trying to format and escape things in the query string. -
Difference between select single & select upto 1 row
Hi,
what is the Difference between select single & select upto 1 row?
Whose performance is better?
Regards,
MayankHi
According to SAP Performance course the SELECT UP TO 1 ROWS is faster than SELECT SINGLE because you are not using all the primary key fields.
The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique.
Mainly: to read data from
The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set. -
Difference between execute as statement and execute as script in Toad
Hi
I want to know difference between execute as statement and execute as script in Toad ..while i am running a query execute as statement is taking about 3 seconds and if i run with execute as a script its taking long time..Which one i need to consider.user632733 wrote:
I want to know difference between execute as statement and execute as script in Toad ..while i am running a query execute as statement is taking about 3 seconds and if i run with execute as a script its taking long time..Which one i need to consider.Firstly, this is not a TOAD forum. TOAD is a 3rd party tool developed by Quest Software, so really your question does not belong here.
However...
When you execute a query as a statement then toad itself opens the cursor against the database and issues the statement, fetching the rows as they are needed to display in it's interface. You say it takes only about 3 second to run, but the chances are that you haven't scrolled the result window down to the last record, for which I'm sure you'd find it takes a little longer.
When you execute a query as a script, TOAD passes the query out to be run in SQL*Plus rather than from within TOAD itself. With SQL*Plus, it runs the whole statement fetching all the rows before returning control, the same as if you had scrolled to the end of the result set in TOAD.
In reality there should be no difference in the time it takes to execute the statements to completion in either environment. -
Difference between statistical update &document update in V1 or V2
Hi gurus,
i would like to konw difference between statistical update &document update in V1 or V2.Whats purpose of these actually.
thanks in advance.
sankarvasHi Shan,
Basically u use these Update types in LIS extraction. V1 stands for Synchronous update and V2 Stands for Asynchronous update.
Usually U use V1 for the time critical Updates and V2 for non-time crtical updates.
Usually u will go for Statistical update at the time of full update or Initialize with delta.
Regards-
MM -
Difference between those "Update DVD & Install DVD"
I have 2 Leopard DVD, 1 came with a new Macbook with Tiger install and the "Mac OS X Update DVD" and 1 bought at the store "Mac OS X Install DVD"
I've just reinstalled my MBP with the "Update DVD" (by mistake) and I select a full installation with a format.
Everything seem to run perfectly !
What is the difference between the "Update DVD" and the "Install DVD" ?
I think both are identical...
ThxThe OS installed is identical. The update DVD may not install on all systems, given it's not intended to be sold at retail. But once you have the OS installed, it's the same OS.
-
Difference between SELECT .. INTO and INSERT.. SELECT
Hi All,
I am on SQL Server 2008 R2. I have a very basic question.
What is the difference between SELECT ... INTO command and INSERT ... SELECT command, when inserting data into a tamp table or even a normal table? Or what is the difference between them in general?
When should I use SELECT ... INTO and when should I use INSERT... SELECT ?
Please guide.
Thanks in advanceGenerally both are the same . There is some optimizations in case of heaps.When inserting into a heap, the storage engine needs to find free space for new rows. It keeps track
of the last page on which a row was inserted, and if that page has space, it will insert on that page. If there is no space, it will have to look at the PFS pages to find space available, and if it cannot find space, it needs to allocate a new page. This can
be pretty slow so SQL Server has an optimization named minimally logging.. Instead of allocating one page at a time,it is used a mechanism which allocates upto 64 pages (8 extents)
at a time, and keeps these pages in a cache, so that it allocates from that cache first.
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Difference between Select * and Select single ?
difference between Select * and Select single ?
HI,
DATA : IT TYPE TABLE OF MARA,
WA TYPE MARA.
Here it selects all the record and keeps in internal table it.
Select * from mara into corresponding fields of table <b> it</b>.
Here it slects only one record that to first record.
If you wnat any specific record then use where condition.
Select single * from mara into corresponding fields of <b>wa</b>.
Message was edited by:
Purshothaman P -
I have a 50Hz sine wave and a pulse signal on a same graph. The phase difference between two is between 0-90 degrees.
Now I need to calculate the time difference between (when the sine wave crosses zero volts) and (when the pulse rises). The frequency will stay approximately same for both signals.
The application is for a three phase generator. In simple words, when the time difference between the zero-crossing of sine wave and the pulse rises increases, that means that the load on the generator has increases.
I am a beginner user of LabView (version 9, 2009), maybe it is a very simple problem but I've been pulling my hair out for the last few days and coudln't figure anything out. Any help would be greatly appreciated. I am using DAQ USB-6008 to measure these voltages and pulse from the generator and a sensor
I have attached a jpg (a graph that i just made with excel to explain). The time 't' is what I am trying to measure
Cheers
Awais
Message Edited by awais.h on 03-30-2010 11:20 PM
Message Edited by awais.h on 03-30-2010 11:21 PM
Solved!
Go to Solution.Hi
Thanks for the code but I'm afraid it won't work. Like you said the probability of choosing a value that is on both graphs may not happen. This is something that I would like the code to do automatically.
But I did use the previous code posted and made some modifications to it and it seems to work perfectly. Now the next thing is to be able to get just that one value that tells you the first time difference.
Here is what I get using that code.
As you can see from the t Values. I only need the one that is highlighted. If there is a way to filter out the rest it would be great.
I was thinking of a while loop and as soon as the value is higher than 3E-5 it would store the number and stop the loop, but I'm not too familiar with arrays in labview.
Here is the the code modified.
As you can see, it wasn't that big of a modification and it still is your code.
I will keep trying.
Thanks for the help
Attachments:
FinalShockSpeed.vi 55 KB -
Difference between select-option and range
Hi,
wat are the difference between select-option and range
where u have to use those and give the syntax for the range option.
if u use range option in report programming there is any advantages ?
pls reply for this ..
thanks
ramsHi,
Not much of a difference,
A Select-Option could be like,
SELECT-OPTIONS sel FOR f
And a Range could be like,
DATA: BEGIN OF sel OCCURS 10,
SIGN(1),
OPTION(2),
LOW LIKE f,
HIGH LIKE f,
END OF sel.
Here they both function the same. But then the Select-Options has numerous options associated with it than the RANGE option.
Hope it helps,
Pradip Parmar. -
I have used NI USB-6008 (DAQ) to sample a continous signal, after sampling I compared the amplitude of the resulted signal with a value. If the amplitude is greater than a specific value (threshold) then it can pass. Now I want to measure the time difference between the resulted samples. The samples look like spikes. (May be if I trigger a timer, then I can measuer the time difference, but I have not seen such a timer).
Thanks in advance,
SaraydinOops just occured to me that you are using a 6009 which is not very fast, 48ks/sec, this will not get you very much time resolution and you could have issues seeing much of a 50 us sample. Another approach is to use the counter but you would have to preprocess the spikes to generate a trigger for the counter.
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Maybe you are looking for
-
i was uploading songs onto my ipod and when it was done i unplugged my usb cord and when i did that it keeps showing the apple icon. it wont do anything but flash the apple icon... is there anything that i can do to fix this?
-
Lock the delete function (Trash) for contract documents
Dear Experts, I have Query in SAP CLM : I am in need to lock the delete function (Trash) for contract documents after they have been executed. After a user sets the contract document phase at "Executed," they should not be able to click the trash ico
-
Cannot Resize Scrapbook - Please help
So here it is, i wanted to print in shutterfly a scrapbook that my grilfriend made in photoshop element, however she made to whole thing in a wierd size that shutterfly doesn't carry, 9 x 10.25. So i would like to change the size of the book to eit
-
Client copy (export/import) from ECC to BW
It is technically feasible to import a client exported from a NW system installed as ECC 6.0 into a NW ABAP Stack (designed to be a BW system)?
-
New videos – Exclaimer Cloud – Signatures for Office 365
You don't centrally manage email signatures When email signatures are not centrally managed, you basically let every [-] Read More This topic first appeared in the Spiceworks Community