Cost of remote db table join

How expensive is remote db table join?
In performance tuning a sql statement, I have a query join a local table to two remote tables, it took 9 sec to return 6000+ rows. If I copy the two remote tables to local db, it took 700 msec. All joins/indexes are identical. The remote db is in the same box as the local db.

I am only asking for general opinion for experience on remote db table join. From explain plan, I already know it's doing next loop index join on the primary key on the two remote db tables. Only one coluum needed from each remote table. Does it look unusual expensive for 6000 primary key join to remote db tables?. 4 sec for each remote table, added up to 8 sec. The rest of processing is minimal.

Similar Messages

  • MV Incremental Refresh on join query of remote database tables

    Hi,
    I am trying to create a MV with incremental refresh option on a join query with 2 tables of remote database.
    Created MV logs on 2 tables in the remote database.
    DROP MATERIALIZED VIEW LOG ON emp;
    CREATE MATERIALIZED VIEW LOG ON emp WITH ROWID;
    DROP MATERIALIZED VIEW LOG ON dept;
    CREATE MATERIALIZED VIEW LOG ON dept WITH ROWID;
    Now, trying to create the MV,
    CREATE MATERIALIZED VIEW mv_emp_dept
    BUILD IMMEDIATE
    REFRESH FAST
    START WITH SYSDATE
    NEXT SYSDATE1/(24*15)+
    WITH PRIMARY KEY
    AS
    SELECT e.ename, e.job, d.dname FROM emp@remote_db e,dept@remote_db d
    WHERE e.deptno=d.deptno
    AND e.sal>800;
    Getting ORA-12052 error.
    Can you please help me.
    Thanks,
    Anjan

    Primary Key is on EMPNO for EMP table and DEPTNO for DEPT table.
    Actually, I have been asked to do an feasibility test whether incremental refresh can be performed on MV with join query of 2 remote database tables.
    I've tried with all combinations of ROWID and PRIMARY KEY, but getting different errors. From different links, I found that it's possible, but cannot create any successful testcase anyway.
    It will be very much helpful if you can correct my example or tell me the restrictions in this case.
    Thanks,
    Anjan

  • Order Query in SQ01 using Table Joins in CRM

    Hello Experts,
    I am trying to create a query using table joins in SQ01 in CRM because I need a report that will give me all transactions for a selected Business Partner.  I am unable to display any results when running my query.  I have found other threads which give a list of possible tables to join together, but the fields used in the joins were not described. 
    The tables I have joined in my query are as follows:
    CRMD_ORDERADM_H
    CRMD_ORDER_INDEX
    CRMD_PARTNER
    BUT_000
    I have used SE16 to try to search for additional tables to use for linking the Business Partner with a transaction, but I have been unsuccessful.
    Would anyone please give advice as how to proceed? 
    Reward points are available!
    Thank you in advance,
    David

    David
    The link with be the GUID.
    CRMD_ORDERADM_H = Document Header Table
    CRMD_ORDERADM_I = Document Line item Table
    CRMD_LINK = Lists various ‘link’ GUIDs, to
    access order Information
    The Table CRMD_ORDERADM_H will contain you transactions , once you find the GUID of your sales transaction in the table CRMD_ORDERADM_H.
    You then need to check the table CRMD_LINK.
    In this table you will then find a number in 11 = sales. This refers to the table CRMD_SALES. There are also links to many other tables ie Shipping, pricing, org etc.
    CRMM_BUT_SET0140 - for Sales Group, Sales Office, District
    CRMM_BUT_LNK0141 - for Sales Area data
    Transaction CRMD_BUS2000115 allows you to see all sales transactions for a BP. CRMD_BUS2000126 shows you activities for selected BP.
    Regards
    M

  • Context index can't be used in complicated multiple tables join?

    hello
    thank you for view this page.
    i have a comlicated sql :
    SELECT count(*)
    from
    ((app_AssetBasicInfo left join app_AssetBasicInfoExt on
    app_AssetBasicInfo.id=app_AssetBasicInfoExt.id) left join
    (app_AssetCustominfo1 left join app_AssetCustominfoExt1 on
    app_AssetCustominfo1.id=app_AssetCustominfoExt1.id) on
    app_AssetBasicInfo.id=app_AssetCustominfo1.id) WHERE
    app_AssetBasicInfo.CategoryID=1 AND Del_tag=0 and contains(description,'department')>0;
    the table app_AssetBasicInfo and app_AssetBasicInfoExt have multiple columns and large recoord size. i create a context index on app_assetbasicinfoext(description) which description is 4000 varchar2.
    but the sql doesn't use context index. i suspect that the complicated multiple table join can't use context index? does it correct?
    thanks very much!

    Could you please post an explain plan? I'm not quite sure what is the issue.

  • How to create an explain plan with rowsource statistics for a complex query that include multiple table joins ?

    1. How to create an explain plan with rowsource statistics for a complex query that include multiple table joins ?
    When multiple tables are involved , and the actual number of rows returned is more than what the explain plan tells. How can I find out what change is needed  in the stat plan  ?
    2. Does rowsource statistics gives some kind of  understanding of Extended stats ?

    You can get Row Source Statistics only *after* the SQL has been executed.  An Explain Plan midway cannot give you row source statistics.
    To get row source statistics either set STATISTICS_LEVEL='ALL'  in the session that executes theSQL OR use the Hint "gather_plan_statistics"  in the SQL being executed.
    Then use dbms_xplan.display_cursor
    Hemant K Chitale

  • Using Table.Join formula takes extremly long time to get results.(Why Query Folding doesn't work?)

    Hi,
    I built a query with 4 tables inside (load from Oracle DB and two of them are quite big, more than millions of rows). After filtering, I tried to build relationships between tables using Table.Join formula. However, the process took extremly long time to
    bring out results (I ended the process after 15 mins' processing). There's a status bar kept updating while the query was processing, which is showed as  . I suppose
    this is because the query folding didn't working, so PQ had to load all the data to local memory first then do the opertion, instead of doing all the work on the source system side. Am I right? If yes, is there any ways to solve this issue?
    Thanks.
    Regards,
    Qilong 

    Hi Curt,
    Here's the query that I'm refering,
    let
        Source = Oracle.Database("reporting"),
        AOLOT_HISTS = Source{[Schema="GEN",Item="MVIEW$_AOLOT_HISTS"]}[Data],
        WORK_WEEK = Source{[Schema="GEN",Item="WORK_WEEK"]}[Data],
        DEVICES = Source{[Schema="GEN",Item="MVIEW$_DEVICES"]}[Data],
        AO_LOTS = Source{[Schema="GEN",Item="MVIEW$_AO_LOTS"]}[Data],
        Filter_WorkWeek = Table.SelectRows(WORK_WEEK, each ([WRWK_YEAR] = 2015) and (([WORK_WEEK] = 1) or ([WORK_WEEK] = 2) or ([WORK_WEEK] = 3))), 
        Filter_AlotHists = Table.SelectRows(AOLOT_HISTS, each ([STEP_NAME] = "BAKE" or [STEP_NAME] = "COLD TEST-IFLEX" or [STEP_NAME] = "COLD TEST-MFLEX") and ([OUT_QUANTITY] <> 0)),
        #"Added Custom" = Table.AddColumn(Filter_AlotHists, "Custom", each Table.SelectRows(Filter_WorkWeek, (table2Row) => [PROCESS_END_TIME] >= table2Row[WRWK_START_DATE] and [PROCESS_END_TIME] <= table2Row[WRWK_END_DATE])),
        #"Expand Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"WRWK_YEAR", "WORK_WEEK", "WRWK_START_DATE", "WRWK_END_DATE"}, {"WRWK_YEAR", "WORK_WEEK",
    "WRWK_START_DATE", "WRWK_END_DATE"}),
        Filter_AolotHists_byWeek = Table.SelectRows(#"Expand Custom", each ([WORK_WEEK] <> null)),
        SelectColumns_AolotHists = Table.SelectColumns(Filter_AolotHists_byWeek,{"ALOT_NUMBER", "STEP_NAME", "PROCESS_START_TIME", "PROCESS_END_TIME", "START_QUANTITY", "OUT_QUANTITY", "REJECT_QUANTITY",
    "WRWK_FISCAL_YEAR", "WRWK_WORK_WEEK_NO"}),
        Filter_Devices= Table.SelectRows(DEVICES, each ([DEPARTMENT] = "TEST1")),
        SelectColumns_Devices = Table.SelectColumns(Filter_Devices,{"DEVC_NUMBER", "PCKG_CODE"}),
        Filter_AoLots = Table.SelectRows(AO_LOTS, each Text.Contains([DEVC_NUMBER], "MC09XS3400AFK") or Text.Contains([DEVC_NUMBER], "MC09XS3400AFKR2") or Text.Contains([DEVC_NUMBER], "MC10XS3412CHFK") or Text.Contains([DEVC_NUMBER],
    "MC10XS3412CHFKR2")),
        SelectColumns_AoLots = Table.SelectColumns(Filter_AoLots,{"ALOT_NUMBER", "DEVC_NUMBER", "TRACECODE", "WAFERLOTNUMBER"}),
        TableJoin = Table.Join(SelectColumns_AolotHists, "ALOT_NUMBER", Table.PrefixColumns(SelectColumns_AoLots, "AoLots"), "AoLots.ALOT_NUMBER"),
        TableJoin1 = Table.Join(TableJoin, "AoLots.DEVC_NUMBER", Table.PrefixColumns(SelectColumns_Devices, "Devices"), "Devices.DEVC_NUMBER")
    in
        TableJoin1
    Could you please give me some hints why it needs so long to process?
    Thanks.

  • How to build table join query in Jdeveloper

    Hi,
    Can someone tell me how to build table join query in Jdeveloper's Expression Builder UI?

    [Is it possible to create a table of contents in Crystal Reports?|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313335333133303330%7D.do]

  • Raw material planned cost and qty in table MCKALKW

    Hi,
    Raw material planned cost and quantity in table MCKALKW is not equal to cost analysis in CO01 / CO02.
    Could you please let me know how to get the planned cost and quantity for production order components for report development. i checked other tables like AFPO and AFKO and it is showing only for main material and not for its compoen

    Hi,
    You can check the cost of the individual components in Bill of materials of each material seperately. Hope this works for you.
    Thanks and regards,
    Murali krishna Maganti

  • Strange behaviour of view based on several tables join with union all

    Dear fellows we r facing a strange problem we have a view based on several tables joined by union all ,when we issue an ordered query on date,rows returned are unusually different than they should be .
    Is oracle has some special behaviour for view based on union all ?
    I m using oracle 8.1.6 on windows 2000
    Kashif Sohail

    Did you ever solve this problem? I have two select statements based on 4 tables and 3 views using about 5 more tables. When I execute each select individually I get exactly what is expected. When I UNION ALL both selects together, I get "no rows returned", however when I UNION them I get exactly what is expected. I should get the same answer for both UNION ALL and UNION. The two select statements are identical, except for one column where I changed the constant to be different. Any thoughts?

  • 3 Table Join with group by and order by clauses

    I am porting from MySQL to Oracle 8i. I have a three Table Join in MySQL as follows:
    select distinct TO_DAYS(l.listend)-TO_DAYS(NOW()) AS daysLeft, i.minbid, l.listend, i.itemid, i.itemtitle, l.listingid, l.lendstart, l.lendend, l.status, MAX(b.amount) AS curBid, COUNT(b.amount) AS numBids from TBL_ITEMS i, TBL_LISTING l LEFT JOIN TBL_BIDS b ON l.listingid=b.listingid where i.itemid = l.itemid AND l.status='1' AND (TO_DAYS(l.listend)-TO_DAYS(NOW()) >= 0) AND i.catcode LIKE'12__' GROUP BY listingid order by curBid DESC, daysLeft;
    It performs an straight join on the first 2 tables (TBL_ITEMS and TBL_LISTING) and a LEFT JOIN between the previous result set and TBL_BIDS. TBL_BIDS uses a group by clause to obtain MAX and COUNT info. This final result set is the sorted (ORDER BY).
    I have tried to reconstruct this type of call in Oracle and have failed. Several problems that I have notices: Oracle does not let me pull in additional columns when doing a GROUP BY clause.
    (see below for my work around)
    I have worked around the problem by creating a TABLE with the group by functionality and doing a straing 3 table join. (NOTE: I cannot create a view because use a LIKE function in the call... view dont have indexes). However, when I try to alias the column that returns DATE subtraction ("l.listend-TRUNC(SYSDATE) daysLeft" OR "l.listend-TRUNC(SYSDATE) dayLeft") I cannot use the LIKE statement.
    Here is my question. How do I port the above 3-table MySQL call to Oracle. Why am I having these problems (is it the Oracle optimizer?) and how do I avaopid them in the future.
    I really appreciate anyone's input. Thanks,
    Inder
    WORK AROUND:
    FIRST STEP:
    "create TABLE BIDSUM as
    select l.listingid, COUNT(b.amount) numBids, MAX(b.amount) curBid from TBL_LISTING l, TBL_BIDS b where l.listingid=b.listingid(+) group by (l.listingid);"
    NEXT STEP:
    select i.minbid, i.itemtitle, l.lendstart-TRUNC(SYSDATE), l.lendend, l.listingid, l.status, s.numbids, s.curbid from TBL_ITEMS i, TBL_LISTING l, BIDSUM s where l.listingid=s.listingid AND i.itemid=l.itemid AND l.status='1' AND i.catcode LIKE '12%';
    THIS ALSO WORKS (no LIKE):
    "select i.minbid, i.itemtitle, l.lendstart-TRUNC(SYSDATE) daysLeft, l.lendend, l.listingid, l.status, s.numbids, s.curbid from TBL_ITEMS i, TBL_LISTING l, BIDSUM s where l.listingid=s.listingid AND i.itemid=l.itemid AND l.status='1' AND i.catcode='12'";
    BUT THIS DOES NOT (alias the DATE arimetic)
    select i.minbid, i.itemtitle, l.lendstart-TRUNC(SYSDATE) daysLeft, l.lendend, l.listingid, l.status, s.numbids, s.curbid from TBL_ITEMS i, TBL_LISTING l, BIDSUM s where l.listingid=s.listingid AND i.itemid=l.itemid AND l.status='1' AND i.catcode LIKE '12__';

    I am porting from MySQL to Oracle 8i. I have a three Table Join in MySQL as follows:
    select distinct TO_DAYS(l.listend)-TO_DAYS(NOW()) AS daysLeft, i.minbid, l.listend, i.itemid, i.itemtitle, l.listingid, l.lendstart, l.lendend, l.status, MAX(b.amount) AS curBid, COUNT(b.amount) AS numBids from TBL_ITEMS i, TBL_LISTING l LEFT JOIN TBL_BIDS b ON l.listingid=b.listingid where i.itemid = l.itemid AND l.status='1' AND (TO_DAYS(l.listend)-TO_DAYS(NOW()) >= 0) AND i.catcode LIKE'12__' GROUP BY listingid order by curBid DESC, daysLeft;
    It performs an straight join on the first 2 tables (TBL_ITEMS and TBL_LISTING) and a LEFT JOIN between the previous result set and TBL_BIDS. TBL_BIDS uses a group by clause to obtain MAX and COUNT info. This final result set is the sorted (ORDER BY).
    I have tried to reconstruct this type of call in Oracle and have failed. Several problems that I have notices: Oracle does not let me pull in additional columns when doing a GROUP BY clause.
    (see below for my work around)
    I have worked around the problem by creating a TABLE with the group by functionality and doing a straing 3 table join. (NOTE: I cannot create a view because use a LIKE function in the call... view dont have indexes). However, when I try to alias the column that returns DATE subtraction ("l.listend-TRUNC(SYSDATE) daysLeft" OR "l.listend-TRUNC(SYSDATE) dayLeft") I cannot use the LIKE statement.
    Here is my question. How do I port the above 3-table MySQL call to Oracle. Why am I having these problems (is it the Oracle optimizer?) and how do I avaopid them in the future.
    I really appreciate anyone's input. Thanks,
    Inder
    WORK AROUND:
    FIRST STEP:
    "create TABLE BIDSUM as
    select l.listingid, COUNT(b.amount) numBids, MAX(b.amount) curBid from TBL_LISTING l, TBL_BIDS b where l.listingid=b.listingid(+) group by (l.listingid);"
    NEXT STEP:
    select i.minbid, i.itemtitle, l.lendstart-TRUNC(SYSDATE), l.lendend, l.listingid, l.status, s.numbids, s.curbid from TBL_ITEMS i, TBL_LISTING l, BIDSUM s where l.listingid=s.listingid AND i.itemid=l.itemid AND l.status='1' AND i.catcode LIKE '12%';
    THIS ALSO WORKS (no LIKE):
    "select i.minbid, i.itemtitle, l.lendstart-TRUNC(SYSDATE) daysLeft, l.lendend, l.listingid, l.status, s.numbids, s.curbid from TBL_ITEMS i, TBL_LISTING l, BIDSUM s where l.listingid=s.listingid AND i.itemid=l.itemid AND l.status='1' AND i.catcode='12'";
    BUT THIS DOES NOT (alias the DATE arimetic)
    select i.minbid, i.itemtitle, l.lendstart-TRUNC(SYSDATE) daysLeft, l.lendend, l.listingid, l.status, s.numbids, s.curbid from TBL_ITEMS i, TBL_LISTING l, BIDSUM s where l.listingid=s.listingid AND i.itemid=l.itemid AND l.status='1' AND i.catcode LIKE '12__';

  • Table join and Logical databasein a same query

    Hi Experts,
    I have an existing query which is created using table join. I now want to add a logical database in the same infoset.
    Is it possible to add a logical database in the same infoset?
    Regards,
    Prakhar

    Hi Prakhar,
    If you see the  below scren,  you can use data source either Table join using basis table or Logical database.
    but if you need ldb with some addition table field then you can data retrieval by program step or you can use LDB with doing some code in inside  your infoset.
    Regards,
    Prasenjit

  • How to insert a record for tables joined

    Hi,
    first of all I've been learning Forms for few days.
    I've created a simple form where I report the columns from two tables joining them.
    Once I've entered a new list of values in the fields of the form, how can I insert them in the two tables? What I've done, but it doesn't work, is to set "Insert Procedure Name" of the data block = to my procedure compiled in "Program Units" hoping that once pushed the "Execute Query" button in the running form worked, but it didn't work.
    Any advice for the better way to how execute an insert in one or more tables with the content of the fields of the form?
    My versions are: database 10gXE and forms 10.1.2.0.2
    Thanks in advance!

    Hi,
    Create two data blocks using create data block wizard and join it with a relation. Display the fields you want and form will automatically save your updates in the both tables.
    When there is a join you can not update all the fields.
    Regards
    Yoonas
    Edited by: yoonus on Oct 3, 2012 1:04 AM

  • For display budgeted amount in cost center what is table in sap?

    For display budgeted amount in cost center what is table in sap?

    Hi,
    Is it budget or planning ? Budget is in BPJA; while planning is mainly in COSS, but also in COSP.
    Regards,
    Eli

  • SQVI in a loop when creating or changing table join

    Hello collegues,
    When creating or changing a table join in the sqvi-transaction the transaction is hanging and won't continue. So I can't create any table joins anymore in the system (dev, qas and production-system).
    Earlier I could create and change them without any problems.
    Can anyone help me solving this problem?
    Kind regards and thanks in advance,
    Bart

    Hi Kamal
    You could try the following:
    - for the particular workflow that you are using, find the task that is responsible and then edit the description tab.
    For debugging please go to transaction SE24 and set a breakpoint in CL_BBP_ACTION_NOTIFICATION_WF.
    I hope this helps,
    Kind Regards,
    Lisa

  • Cost fileds description of table in KEPH

    Dear All,
    I am developing a query with table KEKO and KEPH for the material cost estimate. I need to run for several materials. CK13N is can be used for only one material.
    I am getting Cost estimate No from the table KEKO and passing the value to KEPH for the cost values. but in KEPH table there are 40 cost fields are there from KST001 to KST040.
    I need which cost filed is for which category like Purchases, Surchages,direct labour etc.... It would be great if anyone give us the details regarding the same.
    Please let me know for any clarification. Thanks in advance.
    Regards,
    Raja.A

    Hi,
    Based on your cost component strcuture , while running the KSPI ( Activity price calculation ) system allign the cost fields of KEPH table.
    Depending on your cost component setting - say you have ticked fixed and variable both then - two field in KEPH get alligned with that cost component - One for total cost and other for fixed cost. This is why if you notice there are 40 cost field in KEPH and in cost component structure maximum you can have 20 cost component.
    But allignement of KEPH table field to Cost component get restructured dynamically if you change your cost component sructure and do the KSPI.
    If you want to see your existing allignment , if in all your cost component allows fixed and variable , then straight away you can assume cost field 1 and  cost field 2 for your first cost component .. and cost feild 3 and cost field 4 for your second cost component. Cost field 1 for total of that cost component and cost field 2 for fixed cost of that cost component.
    I hope this explain you the structure. Please let me know if you need more information.
    Regards
    Ranjan Kumar

Maybe you are looking for

  • Backup iTunes Library to External HD for System Reformat

    I'm going to reformat my computer this month, and have been using Windows Live OneCare's backup utility to backup my iTunes library to my external hd. Once I reformat & begin the process of transferring everything back onto my desktop, will all of my

  • CSV to Oracle DB - Upload File

    Dear All,               I have a scenario where I need to upload data in csv format to tables in Oracle DB. Here is the detailed description of problem. a) User selects a csv file on his desktop which has data in it in csv format. b) A BLOB is insert

  • Deposit return

    Hi, Just wondering how I might go about getting my deposit returned to my bank account? Bought the phone in December, paid a €130 deposit, and was told that in six months it would be returned to me either by crediting my meteor account or bank accoun

  • Error while salesorder creation using bapi

    Hi  All while testing the bapi salesordercreatefromdat2 in se37 ,its working. but in reports i m passing same data with this bapi ,its not working. its showing error message like:sales document type OR is not defined. so where is the problem.

  • Appcrash AdobePSL.dll in Illustrator CS6

    Problem, Adobe Illustrator CS6 has stopped working Click Close the program. (can't save) Problem signature: Problem Event Name: APPCRASH Application Name: Illustrator.exe Application Version: 16.0.3.691 Fault Modeule Name: AdobePSL.dll Fault Module V