Long time, buffer with an insert and select through a dblink

I do a fairly simple ' insert into select from "statement through a dblink, but something is seriously wrong across the link. I am a huge buffer time in terms of the command explain (line 9) and I don't know why. When I try to run sql tuning on it across the dblink, I get an ora-600 error "ORA-24327: need explicit attach before authenticating a user.
Here's the original sql:

INSERT INTO PACE_IR_MOISTURE@PRODDMT00 (SCHEDULE_SEQ, LAB_SAMPLE_ID, HSN, SAMPLE_TYPE, MATRIX, SYSTEM_ID)
SELECT DISTINCT S.SCHEDULE_SEQ, PI. LAB_SAMPLE_ID, PI. HSN, SAM. SAMPLE_TYPE, SAM. MATRIX: B1 S SCHEDULES
JOIN THE PERMANENT_IDS ' X '. HSN = S.SCHEDULE_ID
JOIN SAM SAMPLES WE PI. HSN = SAM. HSN
JOIN PROJECT_SAMPLES ON PS PS. HSN = SAM. HSN
JOIN PROJECTS P ON PS. PROJECT_SEQ = PS. PROJECT_SEQ
WHERE S.PROC_CODE = 'DRY WEIGHT' AND S.ACTIVE_FLAG = 'C' AND S.COND_CODE = 'CH' AND P.WIP_STATUS IN ('WP', 'HO')
AND SAM. WIP_STATUS = "WP";

Here's the sql code, as it appears on proddmt00:

INSERT INTO 'PACE_IR_MOISTURE' ('SCHEDULE_SEQ', 'LAB_SAMPLE_ID', 'HSN","SAMPLE_TYPE","MATRIX","SYSTEM_ID")
SELECT 'A6' DISTINCT '. SCHEDULE_SEQ', 'A5 '. "' LAB_SAMPLE_ID ', 'A5 '. "" HSN ","A4 ". "" SAMPLE_TYPE ","A4 ". "" MATRIX ": B1
"SCHEDULES" @! "A6", "PERMANENT_IDS" @! "A5", "SAMPLES" @! "A4", "PROJECT_SAMPLES" @! "A3", "PROJECTS" @! "A2".
WHERE "A6". «PROC_CODE ' = 'DRY WEIGHT' AND 'A6'.» ' ACTIVE_FLAG '= 'C' AND "A6". "COND_CODE" = "CH", ("A2" ".") " WIP_STATUS '= 'WP' OR 'A2'.' WIP_STATUS "=" HO") AND"A4 ". "WIP_STATUS"= "WP" AND "A3". "PROJECT_SEQ"= "A3". "" PROJECT_SEQ "AND"A3 ". "HSN"= "A4". "" HSN ' AND 'A5 '. "HSN"= "A4". "" HSN ' AND 'A5 '. "HSN"= "A6". "" SCHEDULE_ID. "

Here is the plan of the command explain on proddmt00:

PLAN_TABLE_OUTPUT
------------------------------------------------------------------------------------------------------------------------------------------------------
SQL_ID, cvgpfkhdhn835, number of children 0
-------------------------------------
INSERT INTO 'PACE_IR_MOISTURE' ('SCHEDULE_SEQ', 'LAB_SAMPLE_ID', 'HSN","SAMPLE_TYPE","MATRIX","SYSTEM_ID")
SELECT 'A6' DISTINCT '. SCHEDULE_SEQ', 'A5 '. "' LAB_SAMPLE_ID ', 'A5 '. "" HSN ","A4 ". "" SAMPLE_TYPE ","A4 ". "" MATRIX ": B1
"SCHEDULES" @! "A6", "PERMANENT_IDS" @! "A5", "SAMPLES" @! "A4", "PROJECT_SAMPLES" @! "A3", "PROJECTS" @! "A2".
WHERE "A6". «PROC_CODE ' = 'DRY WEIGHT' AND 'A6'.» ' ACTIVE_FLAG '= 'C' AND "A6". "COND_CODE" = "CH" AND "
("A2". "WIP_STATUS"= "WP" OR "A2". ("" WIP_STATUS "=" HO ") AND"A4 ". "WIP_STATUS" = "WP" AND "
"A3". "PROJECT_SEQ"= "A3". "" PROJECT_SEQ "AND"A3 ". "HSN"= "A4". "" HSN ' AND 'A5 '. "HSN"= "A4". "" HSN "AND
'A5 '. "HSN"= "A6". "" SCHEDULE_ID. "

Hash value of plan: 3310593411

-------------------------------------------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | TempSpc | Cost (% CPU). Time | Inst | IN-OUT |
-------------------------------------------------------------------------------------------------------------------
| 0 | INSERT STATEMENT. 5426M (100) | |
| 1. UNIQUE HASH | 1210K | 118 M | 262 M | 5426M (3) | 999:59:59 |
|* 2 | HASH JOIN | 763G | 54T | 8152K | 4300M (1) | 999:59:59 |
| 3. DISTANCE | 231K | 5429K | 3389 (2) | 00:00:41 |! | R > S |
| 4. THE CARTESIAN MERGE JOIN. 1254G | 61T | 1361M (74). 999:59:59 |
| 5. THE CARTESIAN MERGE JOIN. 3297K | 128 M | 22869 (5) | 00:04:35 |
| 4 > DISTANCE | SCHEDULES | 79. 3002 | 75 (0) | 00:00:01 | | R > S |
| 7. KIND OF BUFFER. 41830 | 122K | 22794 (5) | 00:04:34 |
| 8. DISTANCE | PROJECTS | 41830 | 122K | 281 (2) | 00:00:04 |! | R > S |
| 9. KIND OF BUFFER. 380K | 4828K | 1361M (74). 999:59:59 |
| 10. DISTANCE | PROJECT_SAMPLES | 380K | 4828K | 111 (0) | 00:00:02 |! | R > S |
-------------------------------------------------------------------------------------------------------------------

Information of predicates (identified by the operation identity card):
---------------------------------------------------

2 - access("A3".") HSN '= 'A4'.' HSN' AND 'A5 '. "HSN"= "A6". ("' SCHEDULE_ID")

Hello

Looking at your SQL it loks like you're not joining to the PROJECT table (where the word dreaded CARTESIAN?):

Your code:

JOIN PROJECTS P ON PS.PROJECT_SEQ = PS.PROJECT_SEQ 

... I think this should probably be...

JOIN PROJECTS P ON P.PROJECT_SEQ = PS.PROJECT_SEQ 

....??

Tags: Database

Similar Questions

  • Insert using the table with the clause and select?

    Hello gurus,

    Can I insert in a table by making use of clause and select?

    something similar to this...
         insert into test_table
          (with abc as 
              (select * from emp_tble
               where dept_no = 10
               )
             select * from abc;
       );          
    
         if not i would i do by making use of  with clause & select ... any example would be great !!
    
    
      
    Thank you very much!!!

    Brackets are disturbing only:

    SQL> insert into test_table
       (with t as (select * from emp) select * from t)
    /
    Error at line 12
    ORA-32034: unsupported use of WITH clause
    
    SQL> insert into test_table
      with t as (select * from emp) select * from t
    /
    14 rows created.
    
  • [ADF, JDev12.1.3] Master w/playback af:form only af:tables detail: how to handle insert and edit through forms?

    Hallo,

    I have a fragment like this...

    When it is called mode "CreeateWithParams", the user must complete the form in the 1st tab and then can optionally add lines in the af: tables of the other tabs. All changes must be committed/rollbacked together.

    I would like to make the tables readonly and manage the mounting (the image in the tabs details that I forgot to put a "Edit" button) and inserting records in a pop up form.

    Each detail table will have its own noise to the top of the form. I would create each form drag-and - drop the fields of the istance VO even used for FA: table.

    I would like to know if this is a good approach, putting the 3 need to popup forms directly in the fragment? Or I have to put each shape in a mono-fragment bounded task flows and put the fragment in the popup?

    Each pop up form will contain a confirmation and a Cancel button.

    If the pop-up opens (for editing or inserting) and the user clicks the Cancel button, I do not see the changes in the table.

    Changes must pass to the af: table as if the user click on the button confirm.

    To achieve this, I guess that, when the user clicks Cancel, I can't use the AOS restore operation because this will cancel all pending, not only the last of them changes.

    Could you kindly give some advice on how to achieve this?

    Thank you

    Federico

    I would like to know if this is a good approach, putting the 3 need to popup forms directly in the fragment? Or I have to put each shape in a mono-fragment bounded task flows and put the fragment in the popup?

    If you can make them reusable, use BTF.

    Each pop up form will contain a confirmation and a Cancel button.

    If the pop-up opens (for editing or inserting) and the user clicks the Cancel button, I do not see the changes in the table.

    Changes must pass to the af: table as if the user click on the button confirm.

    To achieve this, I guess that, when the user clicks Cancel, I can't use the AOS restore operation because this will cancel all pending, not only the last of them changes.

    You can use the "save points" (create the point of check in popupFetchListener and restoring to the point of backup in popupCanceledListener)

    See this example: http://www.oracle.com/ru/corporate/press/007-cancelform-savepoint-169126.pdf

    Dario

  • Problems with get-compliance and select-object

    Hello world

    I want to generate a report of respect for our guests and run a command similar to "Get-compliance-entity < host name > | Select-Object Entity, baseline. I expect to have the same performance with regard to 'Get-compliance-entity < hostname >' except for the missing 'Status' column. Instead, I get allways the same entry (VMware.VumAutomation.Types.PatchBaselineImpl) in the column "Basic."

    No idea what I'm doing wrong.

    Thank you in advance for any help

    Pedro

    Hi Pedro,

    try like this:

    Get-compliance-entity | Select-Object Entity,@{N="Baseline; E={$_. Baseline.Name}}

    The problem is that the base line property is an object not a string. If you redirect to Select-Object he's trying to put a string out of it. And the string that it generates is the type of the object.

    Best regards, Robert

  • Firefox open two copies of each time, one with my tabs and the other without, and if I close one, both close.

    Since a few days ago, whenever I open Firefox it opens two copies. Got my tabs from the previous session and the other only my home page. If I close is exemplary, the other closes as well. How can I get rid of the second copy?

    I am running version 27.0.1 in Windows 7 on a 64-bit operating system.

    Tried to delete the attributes read-only files that the above suggested. There is no additional file numbered as he said, there might be, however. Doesn't seem to help until I closed the second copy with the ability to close all tabs. This simple action closed just a single copy and left me with one that I still wanted to open. I closed and reopened, and always gave me one copy, so I guess it's all fixed.

    Thanks to those who tried to help!

  • Linking the time capsule with the iPhone and the iPad. ?

    I would be nice to have more capacity or access to the memory at home in other devices.

    as the streaming for iPhone and access of data from it. Perhaps through safari.

    iOS was never was designed to connect to the storage in your local LAN... If you need a file browser to use at all.

    You have also a computer or another application running in the stream... the TC has no extension of media and is not designed for something else by the Time Machine backups from your computer.

  • How to create a voice recorder with pause, insert and replace option

    I want to create a recorder of the word where I can insert an audio between the two already created voice file. It should be able to record audio, and then retrieve it later and play, insert a new record into the current file, overwrite the files. Help, please!

    Check the first link, you get an array of bytes as a result:
    _data = _output.toByteArray ();

    If you take half of the content you delete the second half of the record. If you create a larger painting and copy the old and something new add you etc.

  • Select display on public dblink fails with ORA-01031 run select directly throw dblink public works very well

    Hi @ all,

    A company CAR 11.2.0.3 I'm tring to select * on a view with another user (not the owner of the view), this view select another scope of view a dblink (don't ask me why please ) and mount an ORA-01031... If I try to run the select used in the view with this different user all works very well... I try to explain better:

    Point of VIEW is USERA. BIRD using a dblink public:

    CREATE OR REPLACE FORCE VIEW "USERA"."MYVIEW" ("A", "B", "C") AS
    SELECT A,B,C FROM ANOTHERVIEW@REMOTEDB;
    
    

    B user trying to pick at this point of view: (USERB is a logon trigger that change current_schema to USERA) so, make USERB :

    select * from MYVIEW;
    
    

    and get an ORA-01031.

    If the user USERB perform only:

    SELECT A,B,C FROM ANOTHERVIEW@REMOTEDB;
    
    

    everything works fine.

    Dblink is created in public

    This problem does not occur on other 10 public database with similar assumptions link...

    Can you help me o redirect any link to metalink or something else?

    Thank you!

    IAIO wrote:

    USERB is a logon trigger that change current_schema to USERA

    Current schema to USERA definition allows user USERB reference user USERA belonging to objects without prefixing them with USERA. Then, when USERB emits:

    Select * from BIRD;

    Oracle translates him:

    Select * from USERA. BIRD;

    but the user session is always USERB. As a result, Oracle checks to see if USERB has the right to SELECT on USERA. BIRD. And based on ORA - 01031 USERB didn't. Needs will USE to grant select on BIRD to USERB.

    SY.

  • My firefox always frozen for a long time and this last show this message "Script: chrome://browser/content/browser.js:9933"How can I remedy. "

    I use 8 pro window, after installation of the 23.0.1 my browser started to freeze and atime after a long time promot with this message "Script: chrome://browser/content/browser.js:9933" with an option to stop script or continue, whatever one I choose that it always freezes over and over again.

    In order to be able to find the right solution to your problem, we need a few more non-personal on your part do the information as follows:

    • Click on the Firefox button in the top left, then click on the help menu and select troubleshooting information in the submenu. If you do not have a Firefox button, click Help on the top menu and select troubleshooting information in the menu.

    Now, should open a new tab containing your troubleshooting information.

    • At the top of the page, you should see a button that says "copy the text to the Clipboard. Until it clicks.
    • Now, go back to your post on the forum and click inside the box to answer. Press Ctrl + V to paste all of the information that you copied in the post on the forum.

    If you would like more information on the troubleshooting information page, please read the article, use the troubleshooting information to help solve the problems of Firefox.

    Thank you in advance for your help!

  • desktop computer takes a long time to load after uninstall of netware

    Dear Pascal, recently, by chance, I installed the client service for Netware on my PC. He asked to restart the computer, and after reboot, logon screens became classic. I uninstalled netware by accessing the properties of LAN. I managed to restore logon screens using Microsoft resources available on the net. However, my PC now takes * for long time for the desktop icons and toolbar are displayed. I use Microsoft Windows XP Version 2002 SP3, Intel Core2Duo processor P8600 @2.40 Ghz with 2 GB of RAM on Lenovo Thinkpad R400. I understand that it is after uninstalling the netware client that my office is very very slow. Help me for a faster loading of the desktop computer. Best regards, Reba Shankar

    Hey Reba,

    Thanks for choosing Microsoft Community!

    You have reached the right forum. Try to solve this problem.

    If I understand correctly, you have some performance issues on windows XP computer.

     

    Let us try the following steps:

     

    Method 1: Any installed program must be uninstalled from Add and remove programs. You can just remove shortcuts from other places like LAN properties.

    Run the following fix - it to uninstall client services for Netware.

    Solve problems with programs that cannot be installed or uninstalled:

    http://support.Microsoft.com/mats/program_install_and_uninstall

     

    Method 2: See the following article:

     

    How to make a computer faster: 6 ways to speed up your PC:

    http://www.Microsoft.com/atwork/maintenance/speed.aspx#fBid=uQRRD6ZPxkC

     

    Important notes:

    ·         Running chkdsk on the drive if bad sectors are found on the disk hard when chkdsk attempts to repair this area if all available on which data can be lost.

    ·         The data files that are infected must be cleaned only by removing the file completely, which means that there is a risk of data loss.

    Hope the helps of information. Don't answer if you need assistance, we will be happy to help you.

  • Windows 7 takes a long time to load the desktop after login

    Hello

    I am using windows 7 on my HP 530 laptop. My friend who installed and activated, but I think that it has installed the cracked version. After installation, it was really perfect. but after a while when I connected to the internet, some updates have been installed, and then when I logged in the windows, he invites me that you are using a pirated version or something like that (I don't know more actually). then I restored to my previous state and then everything was fine. After that I stopped the automatic updates, but these days my startup window is having a few problems. After entering the password, its taking a long time to load the office and its keep on the list "loading, please wait...". »

    I'm so sick of that, also, I have to restart my laptop by pressing the power button, and after the reboot, it works fine. But I need someone to answerwhy its taking a long time to load the desktop...?

    Also, please give me some advice to solve this problem, keep this idea in mind that my computer is virus free and got a good processor and RAM. I installed my windows in the C drive, and in my C drive only almost 2 GB of space is left (or almost). and there is no program running auto in msconfig, other than gtalk, Skype, etc.

    I'll be really grateful if someone please give me the solution.

    HP would have provided your preinstalled laptop with win, they would also have provided a way to recover your laptop to the specifications of the factory, either through discs of recovery or a hidden restore partition that you need to access in order to make recovery disks. How do you access a recovery partition is an option of HP, is not dealing with a MS - visit the HP website, specific to your model for more details on how.

    If an illegal win7 version has been installed, or you have to buy version of win7 you need, or you need to recover your laptop provided that the factory provided, by doing so, you lose everything on the phone, if you have lost or that you can not do the restore cd and then telephone HP support they would usually provide records for a small fee.

  • It is good to turn on the printer for a long time?

    Hi all

    It is good to turn on the printer for a long time? It causes health and ink?
    Thank you

    Hi AhamedSajad,

    Are there specific that appeal to you?

    Turn on the printer for a long time would not adversely affect his health. Nor does it affect the ink somehow.
    The ink could get used only when you use the printer to print.
     
    I hope this helps.
  • Did someone never received help help Adobe and support through Skype?

    I was chatting with a person through Skype which is help and Support and they offer my Adobe CS6 company for a reduced price. Most of the information seems accurate, but there seems to be no connection at all with Adobe Adobe site or whatever it is. I don't see any invitation to discuss with the help and support through Skype on this Web site or anywhere else.

    I'm just too paranoid and everyone chatted with Adobe through Skype?

    It's PROBABLY a scam... If you have a forum ID of the person, please report to beware of Help_Desk_ [Adobe uses NO Skype for support]

  • Just updated to Sierra and updated Pages at the same time. Now when I try to select a line of text I find myself with an insertion point where I stopped by selecting

    Today, I updated for Sierra and updated to the latest version of the Pages. Now I find that I am more able to select a line of text. When I try to do, I find myself with an insertion point where I stopped by selecting, but nothing is selected. This is a bug in the new version of pages or get my wrong settings?

    You use a Wacom tablet by chance?

    Solution: Press the shift key, just before stop selection. And Yes, that sounds like trouble in the Sierra.

  • Open with options: I want to add a new application to the list right click on file-&gt; open with and rearrange the list so my search app is first. I know that I can use open with-&gt; other and select any application, but it takes too much time since I u

    I want to add a new application to the list right click on file-> open with

    and also reorder the list so my search app is first / top of the list.

    I know that I can use open with-> other and select any application, but it takes too long I should use my intended application in this way several times a day.

    Basically, I'm looking for a configurable way configure open with, something more to send to Windows.

    Thank you very much for all the advice offered.

    The operating system, not you, not control that open with the menu command.

Maybe you are looking for

  • TECRA M1 problem - external monitor ressolution

    I have Toshiba tecra m1 laptop and I plugged in the vga cable external monitor LG W2252TE. The ressolution fixed by the graphics card on the external monitor's maximum: 1280 X 1024, I wanto ressolution on 1680 x 1050 pourdefinir, because it is an opt

  • Email recovery problems

    Hello My friend and I bought a laptop Toshiba TecraA9 flea market and we both have the same problem. When you want to receive our email on your pc - from our supplier - very often we get a message that there is no link! We also use poppeeper to retri

  • How can I measure the variable tension with the DMM and switch?

    Hello, engineer, I am a student, I want to measure the varying tensions from V to Via. I have the following equipment: SMU-1065 PXI-4065 PXI-2529. I use the PXI-8360 and PXI-8361 to connect with my PC. I hope I can do that when I have the next blood

  • Dead CD/DVD

    My CD drive on my Dell 2400 appears disabled (on Admin Managemnt yellow exclamation point) as this is my plugin dvd recordr/cd player recorder. How can I fix? Thank you

  • is a display of Windows Live Mail problem

    I had new e-mail messages look a problem for the last day bit is there known problems