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 Tariq

Generally 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.

Similar Messages

  • 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 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 Tariq

    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

  • Any way to improve response time with iPhoto 8.1.2 using Mountain Lion ?

    Any way to improve response time with iPhoto 8.1.2 using Mountain Lion ?  Can you store photos on a separate hard drive and use a smaller file for openning iphoto?

    How did you move your iPhoto library to the new system?  the recommended way is Connect the two Macs together (network, firewire target mode, etc)  or use an external hard drive formed Mac OS extended (journaled) and drag the iPhoto library intact as a single entity from the old Mac to the pictures folder of the new Mac - launch iPhoto on the new mac and it will open the library and convert it as needed and you will be ready move forward.
    LN

  • 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.
    %

  • Improving response time

    Here is my current situation. I am running MARS application version 4.2.1 I have a test environment of 1 - 2821 Router with IPS module version 12.4T, 1 - 2621 Router with net flow running version 12.2, 1 - 2950 OS Switch and a stand alone MARS Server. When I run the scenario to test the response time (the time it takes MARS to notify me of the attack) it takes any where from 1/2 hour to and 1 hour before the alarm show up in the event Dash board is there a way to improve the response time? Secondly, I see the IPS signatures in the syslog but I do not see them on my MARS application when investigating an attack. If I run a query for real time I see everything but can't investigate the attack.

    David,
    A few questions so we can help with your troubleshooting. Please forgive me for beginning with some MARS 101 questions.
    1. How long have you had this test environment set up? Netflow usually needs a few days to baseline your network, even in a test lab.
    2. What sort of scenario are you using to test the response time?
    3. Do these bugs apply to your situration?
    Take a look at:
    CSCsc50636, CSCsc50652
    Issues: Backend IPS process runs at 99% CPU when pulling large IP Logs
    The backend IPS process reaches 1GB in memory used when pulling IP Logs. The process names depending on the version on MARS that is running:
    In version 4.2.1 and earlier, the process names are pnids50_srv and pnids40_srv.
    Go to the command line on the Mars box and do a sysstatus to see what system resources a process on your Mars device is using.
    Hope this helps. Let us know more details when you have the chance.

  • 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
    Ahmed

    WITH 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

  • Faster response time of queries

    I have a query which joins a few tables with seveeral thousand rows each. This query normaly returns tens of thousands and the response time is almost 10 minutes and it's not acceptable for web application.
    To speed it up I just want Oracle to return the first let's say 1000 rows.
    Changing the max rows returned parameter(APEX) to 1000 doesn't help at all. It seems like query executes in full and then only the first 1000 rows of the resultset are sent.
    So my question is: is there way to instruct Oracle to stop execution of the query once first n rows are retrieved?
    I tried the SELECT /* FIRST_ROWS(1000) */ .... but this doesn't help. and I wonder how could it when it seems that TOAD determines this as a comment and doesn't change the optimizer mode - still ALL_ROWS.
    What am I doing wrong here, this is the first time I am trying to use FIRST_ROWS hint , - is there another - better way to speed up my query?

    Hi Bob, thanks for the response. rownum < n was the first thing I tried. One would think that if a query takes 5 minutes to execute and returns 50 000 rows then after adding rownum < 5000 it shuldn't take more than a minute - well it takes pretty much the same time as w/out rownum < n. It seems like rownum is determined for the whole resultset and then the where codition is applied.
    The tables actually have much more than a few thousand rows. one is with close to 250 000 and couple other tables with over a million and I don't see much that I can optimize. I think being able to only return certain first n rows fast for web applications must be fairly common situation when dealing with large tables/views.

  • 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 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

  • Response times to queries

    I have a number of unresolved queries with BT that have been ongoing for quite some time. I have recently received a Final bill as BT seem to no longer want me as a customer and my emails are being ignored.
    I have advised them that i wish to escalate my query as i am not satisfied with the lack of a response however there has been no reaction.
    Can anyone confirm whether i am wasting my time and should just pay up and shut up?

    Hi SuffolChap,
    I would like to take a look at the details of your complaint. Please could you send me in your details using the link found in the "About me" section of my profile?
    Thanks
    Paddy
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • How can i create time charateristic queries in BEx

    I don't know how iam allowed to create a time characteristic query in BEx
    Iam also looking for a solution to change query settings during the runtime

    hey thanks for the answer
    i changed the query design into an other order and now it looks better. But i still have a problem.
    I just want to select a intervall from a year.
    For instance its may 2007 now so i want to show all values for may 2007 to may 2008
    But i am only allowed to filtering for each info object so my filters for the year are
    2007, 2008 and for month may, juni, july......may
    The result is i get all values for 2007 and 2008 i need a refrence from month for each year.

  • How to improve this timer code ??

    Dear Sir:
    I have following code, it can works and if I remove the line "new JFrame("New Test Timer").setVisible(true);"
    Then It did not show up timer message,
    What is wrong here??
    I want to remove this line but still keep timer moving,
    How to do this??
    Thanks
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JFrame;
    import javax.swing.Timer;
    public class TimerSample {
      public static void main(String args[]) {
        new JFrame("New Test Timer").setVisible(true);
        ActionListener actionListener = new ActionListener() {
          public void actionPerformed(ActionEvent actionEvent) {
            System.out.println("Hello World Timer");
        Timer timer = new Timer(1000, actionListener);
        timer.start();
    }

    Swing timers are called in the event dispatch thread. If you don't start the event dispatch thread (by setting your GUI visible) then they don't get called.
    If you want a timer but you don't want a GUI, then use a java.util.Timer.

  • AJAX, how to check execution time of queries?

    CF8, using CFDIV to bind to a CFC. The CFC has several SQL
    queries, including select, insert, update, delete. I need to check
    the execution time of these queries. I have the CF Ajax logger
    turned on (cfdebug), but it doesn't seem to list query execution
    times. I see the query execution times from normal form pages in
    the log info on that page, at the bottom as normal, but not the
    queries in Ajax binded CFC's.
    Am I missing a server setting? I have everything checked in
    the Ajax logger. Global, LogReader, http, bind, debug, info,error,
    window.
    Thanks in advance for any help!
    Mike

    I use Ajax (in CF7) a lot to access a SQL Server database. To
    determine execution times for Ajax queries, I run the application
    in Firefox with the "Firebug" add-on. Firebug reports the execution
    of each (and every) Ajax transaction in milliseconds.

Maybe you are looking for

  • Left mouse button does not work after last upgrade on one computer.

    Second request -- left mouse button no longer works after latest upgrade. Uninstalled and reinstalled - did not help. Only affected my office computer. Left button works on other three search engines and other programs -- need suggestions...

  • Displaying not hidden items in the page

    Hi, Could you please let me know how I can identify hidden items programmatically? i.e. We have some items in a page and suppose some of the items are hidden. I need to provide a list of not hidden items. How can I recognize hidden items and not to d

  • Not handled exception due to uninitialized variables ?

    I have successfully added a sap-proxy to my application. But when I try to invoke e.g. Bapi_Customer_Getdetail using concrete parameters, there's an error message indicating: <i>A non handled exception of type 'SAP.Connector.RFcException'.. has occur

  • Process chain repair going to Debugger mode

    Hi everyone, When I try to repair a failed DTP process in a process chain, it goes into debugger mode. After exiting from debug mode, I can see that DTP has been executed successfully. Why process chain goes into Debug mode? Secondly after successful

  • Cannot open or save files after re-install CS4 on Win7 64bit

    Hi, Re-isnstallation of CS4 on a win7 64bit plattform was no problem. But - I can not open any kind of files, neither *.psd nor *.jpg. Even creating a new file in Photoshop is not possible. I do not get a message from Adobe/Photoshop. Now I am lookin