Slow response time on query from one schema to another

I've got two separate databases (one test, the other production). The schemas are pretty much identical and contain the same data. This particular query is executed from .NET (SQL text command, not SP) and takes about 3 seconds when performed against my test db, but takes anywhere from 45 seconds to 5 minutes on the production system. I've exceuted the same statement using Aquadata studio and get the same response times. I didn't build the queries or the schemas, nor do I manage the database servers. But I am responsible for making this work now. These queries have been working in the past, but recently have been changed. I am able to speed this one up with some sql changes, but the others I'm not sure about. I've checked and production db has indexes on the fields I'm querying while the test db does not. I would expect test to be slower, but it's not. Any ideas that I could try. On Monday I'll ask our server admins to check out the server end of it, and see if they need to reboot or something. In the meantime, I'm going to work to revamp the SQL.
Any ideas you can provide would be much appreciated.
Sincerely,
Zam

when your query takes long...
When your query takes too long ...

Similar Messages

  • How do I move a table from one schema to another schema on Oracle XE?

    How do I move a table from one schema to another schema on Oracle XE?

    Hi,
    I tried to use the insert/select statement that you had given, it did not work.
    The error is ORA-00913: too many values.
    But finally what I did was, I went into the system schema where the table was and generated the DDL through the utilities and afterwards I imported them into the schema that I am currently working on. It solved the problem!
    However I am still curious to know why the insert/select statement did not work? Do you know any site/tutorial which gives a real time example?
    Thank you
    Skye

  • Copying data contianing long datatype from one schema to another

    I'm using Oracle 8.1.7 and trying to move copy data from one schema to another.
    Usually an easy task. This time the data contains longs so I can't use standard SQL. The data in the long is too long for a PL/SQL long datatype so that's not worked.
    I've tried the COPY FROM command but get the invalid sql command error.
    Can anyone save my hair?

    The COPY command doesn't have to be all on one line. The continuation character for SQL*Plus commands is a hyphen.
    SQL> prompt "Hello"
    "Hello"
    SQL> prompt -
    "Hello""Hello"
    SQL>Metalink is the website for customers that pay for Oracle support. Go to www.oracle.com and click on the metalink button on the top left of the screen. It's called Metalink because Oracle support levels are named after metals: bronze, silver, gold.

  • Copy data from one schema to another schema tables

    Hi,
    I was doing a copy using sql developer copy feature, data copy worked perfect but for few table data didn't move there are about 30 tables from schema prod to schema dev i need to move tables are already created only data needs to be moved from prod to dev
    Can you suggest me any method were I can move all the tables data at a time from one schema to another. Please suggest.
    Thanks
    Sudhir

    Hi,
    If table structure is the same then:
    insert into dev.table_name
    select
    from
      prod.table_name  --if prod is in another database change to prod.table_name@db_link_to_prod_db
    commit
    ;Hope this helps. Otherwise give some more info about where these schema's are.
    Regards,
    Peter

  • How do I move a table from one schema to another schema?

    How do I move a table from one schema to another schema?

    Grant access to the table from the source schema to destination schema.
      GRANT SELECT ON <TABLE_NAME> TO  <DESTINATION SCHEMA>A simple way would be to use CREATE Table with select syntax (in destination schema)
      CREATE TABLE <TABLE_NAME> AS SELECT * FROM <SOURCE SCHEMA>.<TABLE_NAME><li>However, you would be in <b><u>trouble when the table has index,constraints and triggers</u></b>.
    So you can better of grab the DDL statement of the table(and any additional components) andd then create the table in the destination schema.You can use SQL developer, Toad or Apex's Object browser for this.
    After the table is created, Insert the records using SELECT.
    INSERT INTO <TABLE_NAME> SELECT * FROM <SOURCE SCHEMA>.<TABLE_NAME>This question is discussed in great detail in this <b>AskTom thread</b>

  • How to transfer ABAP query from one server to another server

    Hi all,
    I have a ABAP query in development server and i need to transport it to production server.
    I have attached a transaction to it using the program which got generated in the back ground
    from the abap query in the developemnt server.
    I have downloaded and uploaded  a ABAP query from one server to another server.
    But the program which got generated in the back ground in the production server is different from
    program which is generated in the development server.
    But my transaction is attached to the program in the development server.If i transport the transaction
    to production server,it is giving error since that program is not present in the production server.
    Am i going in the right way......? 
    Is there any problem in my upload/download procedure ?
    Is there any way to achieve my purpose ...............?
    Please kindly reply me at the earliest.

    You have different ways to call a query using a t.code. One way is to create a pgm with the following code and attach a t-code to it.
    data: gv_test type sy-repid.
    DATA: GV_USERGROUP TYPE AQADEF-BGNAME VALUE 'FI',
          GV_QUERY TYPE AQADEF-QUNAME VALUE 'ZCON_FI_QUERY',
          GV_RNAME TYPE AQADEF-PGNAME .
    CALL FUNCTION 'RSAQ_REPORT_NAME'
      EXPORTING
        WORKSPACE        = ''
        USERGROUP        = GV_USERGROUP
        QUERY            = GV_QUERY
    IMPORTING
       REPORTNAME       = GV_RNAME
    * For the dynamic excution of the called query assisgn GV_RNAME to <gv_test>.
    gv_test = GV_RNAME.
    SUBMIT (gv_test) via selection-screen and return.
    Alternate way is while creating T-Code you choose option Transaction with parameters.
    Transaction as START_REPORT and in default values table control at bottom give as follows
    D_SREPOVARI-REPORTTYPE = AQ
    D_SREPOVARI-REPORT = User group
    D_SREPOVARI-EXTDREPORT = Your Query name
    Regards
    Sathar

  • Best LKM to move data from with in Oracle from one schema to another Schema

    Hi Gurus,
    What is the best KM to move data from one schema to another schema within same oracle database.
    Thanks in advance

    Dear,
    If your source and target are on the same database server then you dont need LKM.
    You have to 1. create one data server for the database server
    2. Create one physical schema for your source and another physical schema for your target under the above created data server.
    3. Then create models for each above created physical schema
    In this case you just need IKM knowledge module
    Please refer http://oditrainings.blogspot.in/2012/08/odi-interface-source-target-on-same.html
    If your source and target are on different server then you must create two different data servers in topology. You have to use LKM.
    The best LKM to use is LKM oracle to Oracle dblink. But you should have proper grants to use it
    If your source has very few records you can go with LKM SQL to Oracle other wise use LKM oracle to Oracle dblink

  • How to copy a query from one infoprovider to another infoprovider

    Hi Experts,
    Could anyone suggest me on how to copy a particular query from one infoprovider to another infoprovider which are identical and have the same objects in them.
    Thanx in advance
    Lalit

    Hi Lalith,
    Use the Transaction RSZC and specify the - > Source InfoCube  -> Target InfoCube and select the queries  you want to copy.
    Hope it helps
    Regards
    Srikanth

  • Moving procedures and sequences from one schema to another

    Hi all,
    Is there any way to export the procedures and sequences alone from one schema to another? If not is there any way to generate the procedure creating scripts from the source schema.
    I used the following script SET HEADING OFF
    SET PAGESIZE 999
    SET LINESIZE 100
    SELECT DBMS_METADATA.GET_DDL('PROCEDURE', NAME, owner) || '/' FROM ALL_SOURCE WHERE
    OWNER='SCOTT' AND TYPE='PROCEDURE'
    SPOOL C:\A.SQL
    SPOOL OFF
    [/CODE]
    But the problem is in the out put script it is cutting the line .. for egCREATE OR REPLACE PROCEDURE "QC_PFIZER_REL5"."SPGETNEXTDS
    S_ID"
    ( V_ID OUT NUMBER )
    IS
    BEGIN
    SELECT SEQUENCE_DSS_Id.NEXTVAL INTO V_ID FROM DUAL;
    END ;
    i experimented with increasing linesize but it is not helping. I am using 9.2.0.5 on windows 2003.
    Thanks
    Muneer

    Similar to getting the code from user_source, you could get sequences from user_sequences.
    SQL> select dbms_metadata.get_ddl('SEQUENCE', sequence_name) from user_sequences ;
    DBMS_METADATA.GET_DDL('SEQUENCE',SEQUENCE_NAME)
       CREATE SEQUENCE  "SCOTT"."SEQ"  MINVALUE 1 MAXVALUE 1.00000000000000E+27 INCR
    EMENT BY 1 START WITH 1 CACHE 20 NOORDER  NOCYCLE
    1 row selected.
    SQL>

  • Copying a Single BEx Query from One Infoprovider to Another

    Is it possible to copy just a single query from one Infoprovider to another?
    I know how to copy all of them at once, but I want to know if there is a way to do it just for a single query.

    Ah.  That worked perfectly.
    Awarding points.
    Thank you.

  • Copying a query from one cube to another cube

    HI BW Gurus,
    I am having a report due date for net payment analysis in Accounts receivables and i want to copy the same query into a different infocube accounts payable.
    Is it posssible to copy a query from one infocube to another infocube.
    Regards,
    Syed

    Hi,
    Yes,it is possible to copy query from one infoprovider to another infoprovider with some conditions.Please have a look at the note 981104 which explains you how to Copy between InfoProviders and Copy within one InfoProvider.
    Rgds
    Manoj Kumar

  • Copy one query from one infocube to another infocube

    Hi BW Experts,
    Hope all of them are doing good.How can we copy one query from one infocube to another infocube.
    I have infocube1 having one query ,I  NEED to copy that query to  infocube2? How?
    Could you please help me out?
    Thanks

    Use transaction RSZC in BW (BTW you're addressing BW experts in a BO forum better post in the Bex section of the BW forum)

  • Transport sap query from one client to another client

    Hi,
    how to transport the sap query from one client to another client.
    Moderator Message: Basic Question
    Edited by: kishan P on Sep 15, 2010 3:39 PM

    use report "RSAQR3TR"
    Moderator Message: Do not answer such basic questions
    Edited by: kishan P on Sep 15, 2010 3:44 PM

  • Copy Query from One MultiProvider to Another

    How easy is it to copy a Query from one MultiProvider to another?
    thanks

    If the elements of the query is not same try using following function module RSZ_I_COPY_QRY_TO_CUBE to copy queries
    Re: Copying query structure to new infoprovider
    Ravi

  • Moving time-dependant data from one table to another (archiving)

    Hello all
    I would like to know if there's an easier solution or a "best practice" to move data from one table to another. The context of this issue can be found within "archiving".
    More concretely: we have an application that uses several tables to log information to.
    These tables are growing like crazy, and we would like to keep only "relevant" data in those tables, so I was thinking about moving data from these tables that have been in there for, say 2 months, to "archiving" tables.
    I figured there must be some kind of "best practice" to get this done.
    I have already written a procedure that loops the table that has the time indicator and inserts the records from the normal tables into the archive tables (and afterwards delete this data), but it seems to be taking ages to get it done.
    Thanks in advance!
    Message was edited by:
    timschraepen

    There is nothing to do with PL/SQL.
    You can refer below links:
    http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96524/c12parti.htm
    http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10739/partiti.htm#i1006727

Maybe you are looking for

  • How can i create a new item in the app "health"?

    how can i create a new item in the app "health"? I need a field for documentation of "Waist-to-height ratio", exactly for "circumference". It's a matter of common knowledge, that the Waist-to-height ratio (WHtR) has more significance then the Body-Ma

  • Syncing photo albums iOS 8 and iPhone 5

    Just installed iOS 8 on iPhone 5. Have selected transfer of certain albums to Photos on iPhone. Only a random selection have been transferred. Have tried to delete everything and re-sync. No good. Even when I unselect everything, meaning delete every

  • Oracle-sap Connectivity

    how to connect oracle with sap application is there ant connectivity string available:

  • Implementing  jdbc using jsp and servlets

    please give me documnetation and few programs with code . implementing or using jdbc with servlets and jsp.

  • Cursor focus in text fields in Safari broken after Snow Leopard upgrade

    Hi, I just upgraded from Leopard to Snow Leopard on my Macbook. Since then, whenever I am typing in a text field in Safari (e.g. Gmail's compose message contents field), the cursor freezes. I cannot move the cursor with either arrow keys or the mouse