How to enhance response time on select?
I'm using ibatis/mySql in my struts application and apparently the response time to receive data (select) is quite long.
I'm referring to a select statement to receive data from 5 diff tables (~6 column each). there are 500 objects (Cars) and it takes around 63 seconds (my computer has 2GB Ram).
can someone advise how to enhance the response time.
thanks
yes, they all have primary keys and indexes.
Do you do the JOIN in the database or are yougetting a ResultSet and then iterating over it to
SELECT the rest? (This will kill you with network
traffic.)
yes I'm using the select with no join.
I'm using abator to auto-generate the sql statements
and therefore I loop on every car'd id and get my
releven info. so basically it's all select after
select and integrate them in the car object. That's the reason then: If your outer select returns N rows, you're doing N network roundtrips to get the rest of the data. It's a certain performance killer.
is there major diff between reading one by one oever
reading everything in one go? meaning right now i do
this:
get list of all car_idNetwork roundtrip #1
iterate through db with car_id and construct a CAR object...Which means one round trip per row. You're dead in the water here, no matter how you optimize the database.
add object to LinkedList move to the next car...Rewrite that query and bring all the data back in one network roundtrip. You'll notice an immediate improvement.
%
Similar Messages
-
How to calculate Response time in HH:MM:SS format ?
Hi,
How can we calculate reponse time in HH:MM:SS format?
I have tried this formula but doesnt really seems to be providing desired output
CAST (FLOOR (TIMESTAMPDIFF (SQL_TSI_HOUR, "Service Request"."Opened Date and Time" , "Service Request"."Closed Date and Time" ) /24) as CHAR) || ' Days, ' || CAST (FLOOR((TIMESTAMPDIFF (SQL_TSI_MINUTE, "Service Request"."Opened Date and Time" , "Service Request"."Closed Date and Time" ) - FLOOR (TIMESTAMPDIFF (SQL_TSI_HOUR, "Service Request"."Opened Date and Time" , "Service Request"."Closed Date and Time" ) /24) *1440)/60) as CHAR) || ' Hours, ' || CAST (TIMESTAMPDIFF(SQL_TSI_MINUTE, "Service Request"."Opened Date and Time" , "Service Request"."Closed Date and Time" ) - (FLOOR (TIMESTAMPDIFF (SQL_TSI_HOUR, "Service Request"."Opened Date and Time" , "Service Request"."Closed Date and Time" ) /24) *1440) - (FLOOR((TIMESTAMPDIFF (SQL_TSI_MINUTE, "Service Request"."Opened Date and Time" , "Service Request"."Closed Date and Time" ) - FLOOR (TIMESTAMPDIFF (SQL_TSI_HOUR, "Service Request"."Opened Date and Time" , "Service Request"."Closed Date and Time" ) /24) *1440)/60)*60) as CHAR) || ' Minutes'
Output for this formula :
Opened Time Closed Time Response Time
16/10/2008 08:50:00 21/10/2008 11:33:21 5 Days, 2 Hours, 43 Minutes
16/10/2008 08:57:00 24/10/2008 15:17:38 8 Days, 6 Hours, 21 Minutes
16/10/2008 09:55:00 27/11/2008 10:44:36 42 Days, 0 Hours, 50 Minutes
16/10/2008 10:13:00 21/10/2008 13:53:38 5 Days, 3 Hours, 41 Minutes
16/10/2008 11:18:00 20/10/2008 09:11:29 3 Days, 21 Hours, 53 Minutes
I just need time difference between Closed Time and Open time in HH:MM:SS format.
Regards
AhmedWITH m AS
SELECT [Minutes] = CAST(21.52 * 60 AS int)
SELECT CAST([Minutes] / 60 AS varchar) + ':' + RIGHT(100 + [Minutes] % 60, 2)
FROM m
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 -
How to view response time for each execution in OEM 12c Cloud Control
Hi All,
I want to view response time of each execution for my SOA composite in OEM 12c Cloud Control. Can anyone tell me how can I achieve that?
Thanks in Advance!!You should open an SR and support can assist you with it. The only current case where that feature is known to not work is in the case where the Dehydration Store is running on RAC. Otherwise, it should be possible to get it to work. The main thing is that you need to have DB configuration properties (host, port, sid) that have a 3-way string match between the JDBC data source configuration in the WLS server, the JDBC properties you add to the Monitoring Properties of the SOA Infrastructure target, and the connect settings of the Database target in EM that matches to the dehydration DB.
If there isn't a match in all 3, the Dehydration Diagnostics page will not work. But again, to look into your specific setup, you should file an SR and work with support. -
How to improve response time of database
We have 8.0.5 Oracle database with multiple users. that is running on NT. And several clients are accessing database trough application. The response time is really slow. How can I make access faster and where can I make my changes to take effect.
Thank you.I tried several times to open/print The white paper on following address but always got an error something like 'There is an error on this document (14)':
http://otn.oracle.com/products/reports/pdf/275641.pdf
Can U please help to resolve this problem so that I can open this doc in Acrobat PDF viewer. I need this paper urgently as explained at the start of this question.
Tariq -
How can increase response time:dialog
Dear all,
how can i change(increase/decrease) dialog workprocess response time?> how can i change(increase/decrease) dialog workprocess response time?
Can you please tell us exactly what you want to do?
Read
http://help.sap.com/saphelp_nw04/helpdata/en/21/2c8f38c7215428e10000009b38f8cf/frameset.htm
about what "Response time" is defined and then please rephrase your question.
Markus -
How to make response time of switch faster?
on 3750, when
1. execute ping -t command from a PC to the switch interface vlan 1 ip address,
2. unplug the cable and plug it again,
it takes about 30 seconds to start pinging again.
i disabled the STP protocol and observed that; with the same procedure, recovering ping replies decreased to 3 seconds.
is there any other tuning that i can configure and make response time even faster?
thank you for helping :)Hi,
STP convergence is typically the biggest part of host connection delays. Rather than disabling STP, you can configure "spanning-tree portfast" on the port which will achieve the same end.
Beyond that, some of the response time delays are going to be part of MAC address learning, ARP, and the fact that the switch places a low priority on processing ICMP packets. A better test is to ping from another device _through_ the switch rather than to or from the switch.
Here's a good document that covers various commands you can use to mitigate connectivity delays.
Using PortFast and Other Commands to Fix Workstation Startup Connectivity Delays
http://www.cisco.com/warp/customer/473/12.html
HTH,
Bobby -
Collaboration - how to reduce response time for Instant Messaging
Hello Experts,
I have enabled Collaboration link in the masthead of Ajax Framework Page by following the steps mentioned in the link Activating the Link for Launching the Collaboration Launch Pad.
I then activated services for real time collaboration in Ajax Framework Page referring to the link Activating Services for Real-Time Collaboration.
Following this I activated synchronous collaboration service types with the help of Activating Synchronous Collaboration Service Types.
In addition to the above steps I also followed this thread (Standard Services Instant Messaging Doesn't Work - Portal 7.3) and did the below changes in PCD Inspector:
# Browse into: portal_content -> every_user -> general -> frameworkpage
# Open com.sap.portal.toolAreaiView with option "PropEditor"
# Select the property: "EnableRtcSessionManager"
# Select the link "edit" Change the property value to "true"
On doing the above configurations I am able to open Collaboration Launchpad and send Instant Messages to users in my Contacts.
However what I have observed is that when I open an Instant Messaging window and type in some message and send it to a user, it takes between 70-90 seconds for the message to appear on the user's system, which is quite a long time considering it is an instant message. Is this normal behavior for instant messaging? Are there any other parameters/configurations that can be done to reduce this time taken for instant messages to get sent between users?
We are running NW 7.30 SP09 portal.
Regards,
SaurabhHi Saurabh,
Refer this link [http://help.sap.com/saphelp_nw73/helpdata/en/48/01a15984ff4aa5e10000000a421937/frameset.htm] and check thePollingIntervalBasis in NWA depending upon the no. of clients. -
How to improve response time of queries?
Although it looks that that this question relates to Reports but actually the problem is related to SQL.
I have a Catalogue type report which retrieves data and prints. That is not much calculations involved.
It uses six tables.
The data model is such that I have a separate query for each table and then all
these tables are liked thru link tool.
Each table contains 3000 to 9000 rows but one table contains 35000 rows.
The problem is that the report is taking too much time - about 3-1/2 hours while
expectation is that it should take 20 to 40 minutes max.
What can I do to reduce the time it takes to produce report.
I mean should I modify data model to make a single query with equi-join?
A)Specially I want to know what is traffic between client and server when
1) we have multiple quieries and LINK tool is used
2) Single query and equi-join is used
B)Which activity is taking most of time ?
1) Retrieving data from server to client
2) Sorting according to groups (at client) and formating data and saving in file
Pl. guide.
Every body is requested to contribute as per his/her experience and knowledge.
M TariqGenerally speaking, your server is faster than your PC (if it is not, then you have bigger problems than a slow query), let the server do as much of the work as possible, particularly things like sorting, and grouping. Any calculations that can be pushed off onto the server (e.g. aggregate functions, cola + colb etc.) should be.
A single query will always be faster than multiple queries. Let the server do the linking.
The more rows you return from the server to your PC, the more bytes the network and your PC have to deal with. Network traffic is "expensive", so get the result set as small as possible on the server before sending it back over the network. PC's generally have little RAM and slow disks compared to servers. Large datasets cause swapping on the PC, this is really expensive.
Unless you are running on a terribly underpowered server, I think even 30 - 40 minutes would be slow for the situation you describe. -
How to improve response time of report?
I have a Catalogue type report which retrieves data and prints. That is not much calculations involved.
It uses six tables.
The data model is such that I have a separate query for each table and then all
these tables are liked thru link tool.
Each table contains 3000 to 9000 rows but one table contains 35000 rows.
The problem is that the report is taking too much time - about 3-1/2 hours while
expectation is that it should take 20 to 40 minutes max.
What can I do to reduce the time it takes to produce report.
I mean should I modify data model to make a single query with equi-join?
A)Specially I want to know what is traffic between client and server when
1) we have multiple quieries and LINK tool is used
2) Single query and equi-join is used
B)Which activity is taking most of time ?
1) Retrieving data from server to client
2) Sorting according to groups (at client) and formating data and saving in file
Pl. guide.
Every body is requested to contribute as per his/her experience and knowledge.
M TariqI tried several times to open/print The white paper on following address but always got an error something like 'There is an error on this document (14)':
http://otn.oracle.com/products/reports/pdf/275641.pdf
Can U please help to resolve this problem so that I can open this doc in Acrobat PDF viewer. I need this paper urgently as explained at the start of this question.
Tariq -
Hello Experts
I have a TABLE Element with the Properties
- selectionChangeBehaviour = auto
- selectionMode = multiNoLead
The user should select some entries and press a 'Continue' button.
Everything is running fine..... but the response time when selecting a single row is very bad. About 3 seconds.
Can anybody help?
Thx in advance
BodoHi Alex
the table has just 14 entries (4 columns)...
Too much???
Regards
Bodo -
TimesTen V/s Oracle Response Time
Hi,
Are there any comparative figures b/w Oracle and Times Ten available on the Response Time for Select/Insert/Update/Delete queries.
I would appreciate if the figures are available over JDBC calls.
I tried analyzing the result using one of our application which uses JDBC Thin Client on both Times Ten and Oracle.
The result were not very encouraging.
Let me know if required I can share the results here.
Thanks,
Mangesh Malekar
Message was edited by:
user464199Hi Guys,
Appreciating your feedback.
But, my application using which i have tested the Response Time is being running robustly for more than 5 year and has about 20 installation world wide.
For supporting Times Ten Database there was no code change done to this application.
So far this application was tested with ORACLE/DB2 as the database.
We have achieved fantastic throughput with these database. But now it is more or less saturated.
In order to improve further we are trying TimesTen Database as it is said to be faster.
The application loads the JDBC Driver and the URL from a Configuration File.
I just supplied the TimesTen JDBC Driver and the Times Ten URL to this application to get the Response Time result.
I firmly believe that ORACLE would not have taken over TIMESTEN if it would not have been faster.
So there definitely is something that i need to incorporate into my application related to TIMES TEN, which we all are missing.
Is there a TEST Application which uses JDBC as the backbone, that i can use to gauge the response time on Oracle and Times Ten.
Thanks,
Mangesh Malekar -
Version 7.4 First Response Time and TIcket Close Time Metrics
Can someone advise on how the First Response Time (Avg) and Ticket Close Time (Avg) are calculated on the Help Desk dashboard? What I am wondering is if a ticket is accepted but no comment entered, is the acceptance considered first response? Also in the Ticket Close time, does it exclude weekends and/or time spent in the "waiting on user" state?
This topic first appeared in the Spiceworks CommunityCan someone advise on how the First Response Time (Avg) and Ticket Close Time (Avg) are calculated on the Help Desk dashboard? What I am wondering is if a ticket is accepted but no comment entered, is the acceptance considered first response? Also in the Ticket Close time, does it exclude weekends and/or time spent in the "waiting on user" state?
This topic first appeared in the Spiceworks Community -
How to find the Response time for a particular Transaction
Hello Experts,
Am implementing a BAdI to achieve some customer enhancement for XD01 Transaction . I need to confirm to customer that after the implementation and before implementation what is the response time of the system
Response time BEFORE BAdI Implementation
Response time AFTER BAdI Implementation
Where can i get this.
Help me in this regard
Best Regards
SRiNiHello,
Within STAD, enter the time range that the user was executing the transaction within as well as the user name. The time field indicates the time when the transaction would have ended. STAD adds some extra time on using your time interval. Depending on how long the transaction ran, you can set the length you want it to display. This means that if it is set to 10, STAD will display statistical records from transactions that ended within that 10 minute period.
The selection screen also gives you a few options for display mode.
- Show all statistic records, sorted by star
This shows you all of the transaction steps, but they are not grouped in any way.
-Show all records, grouped by business transaction
This shows the transaction steps grouped by transaction ID (shown in the record as Trans. ID). The times are not cumulative. They are the times for each individual step.
-Show Business Transaction Tots
This shows the transaction steps grouped by transaction ID. However, instead of just listing them you can drill from the top level down. The top level will show you the overall response time, and as you drill down, you can get to the overall response time.
Note that you also need to add the user into the selection criteria. Everything else you can leave alone in this case.
Once you have the records displayed, you can double click them to get a detailed record. This will show you the following:
- Breakdown of response time (wait for work process, processing time, load time, generating time, roll time, DB time, enqueue time). This makes STAD a great place to start for performance analysis as you will then know whether you will need to look at SQL, processing, or any other component of response time first.
- Stats on the data selected within the execution
- Memory utilization of the transaction
- RFCs executed (including the calling time and remote execution time - very useful with performance analysis of interfaces)
- Much more.
As this chain of comments has previously indicated, you are best off using STAD if you want an accurate indication of response time. The ST12 (combines SE30 ABAP trace and ST05 SQL trace) trace times are less accurate that the values you get from ST12. I am not discounting the value of ST12 by any means. This is a very powerful tool to help you tune your transactions.
I hope this information is helpful!
Kind regards,
Geoff Irwin
Senior Support Consultant
SAP Active Global Support -
How to increase built-in cisco vpn peer response timer?
Hi,
I use OS x in-built cisco vpn client to connect to work VPN.
The VPN server, or perhaps the radius server, takes a long time to return a response. OS X always try for 10 seconds, then drop the conneciton when no response from the remote peer. When I use cisco vpn client on a windows machine, the vpn client has a setting to allow for 90 seconds remote peer response time. It works fine using cisco vpn client.
I prefer to use os x as my primary working environment, so I need to fix this problme. My question is how to increase the phase 1 & 2 timer for vpn under 10.6.7. I have tried to change racoon.conf phase 1 & phase 2 timer, but it made no difference. OS X only try for 10 seconds.
Any ideas? (besides asking work people to fix the server or radius problem)
Thanks
jmsherry123i have the same problem ... certificate is imported in keychain, but cant select it when setup vpn connection
-
How to obtain the Query Response Time of a query?
Given the Average Length of Row of tables and the number of rows in each table,
is there a way we get the query response time of a query involving
those tables. Query includes joins as well.
For example, suppose there 3 tables t1, t2, t3. I wish to obtain the
time it takes for the following query:
Query
SELECT t1.col1, t2.col2
FROM t1, t2, t3
WHERE t1.col1 = t2.col2
AND t1.col2 IN ('a', 'c', 'd')
AND t2.col1 = t3.col2
AND t2.col1 = t1.col1 (+)
ORDER BY t1.col1
Given are:
Average Row Length of t1 = 200 bytes
Average Row Length of t2 = 100 bytes
Average Row Length of t3 = 500 bytes
No of rows in t1 = 100
No of rows in t2 = 1000
No of rows in t3 = 500
What is required is the 'query response time' for the said query.I do not know how to do it myself. But if you are running Oracle 10g, I believe that there is a new tool called: SQL Tuning Advisor which might be able to help.
Here are some links I found doing a google search, and it looks like it might meet your needs and even give you more information on how to improve your code.
http://www.databasejournal.com/features/oracle/article.php/3492521
http://www.databasejournal.com/features/oracle/article.php/3387011
http://www.oracle.com/technology/obe/obe10gdb/manage/perflab/perflab.htm
http://www.oracle.com/technology/pub/articles/10gdba/week18_10gdba.html
http://www.oracle-base.com/articles/10g/AutomaticSQLTuning10g.php
Have fun reading:
You can get help from teachers, but you are going to have to learn a lot by yourself, sitting alone in a room ....Dr. Seuss
Regards
Tim
Maybe you are looking for
-
Can SPML-DSML client (10g) talk to SPML-XSD in OIM 11g?
Hello. I have a SPML client that works with OIM 10g. If I upgrade to OIM 11g, will my client continue to work, or will I need to re-code it? I understand OIM 11g supports the newer XSD profile of SPML, but I would hope it is backward compatible with
-
Can't close the finder application
I had to urn off my computer, could not break the freeze any other way. However when I turn it back on it still is not working.
-
How do I assign keywords to groups of photos?
apologies in advance if this has been answered, I can't see how to search the forum first before posing the question. I recently bought a DSLR. my photography habit is exploding and I'm creating a lot more photos. I need to be more diligent about org
-
How to Root Sony Ericsson Live With Walkman (WT19i, Gingerbread)
Hi, I have been searching all over the Internet about how to root my Sony Ericsson Live With Walkman. But, I failed. So, am here asking you people to help me out here. I am running Gingerbread (2.3.4) My BUILD NUMBER is 4.0.2.A.0.62 Please please h
-
what photo shop software has the merge paint tool? I have photo shop elements 11,but I can't locate the merge tool.