Whats the problem with this query?

Its doing huge sort operations and is throwing the following all the time.
ORA-1652: unable to extend temp segment by 256 in tablespace
Unable to figure out if I should be increasing the sort area size. I initially increased the TEMP space by 50% to 3 G and it still fails. Any recommendations ?
SELECT distinct b.*,
f.carrier_id
FROM po a
JOIN (SELECT c.asn_shipment_id,
c.po_cd,
c.po_ln,
c.ve_cd,
c.itm_cd,
d.shipped_date,
c.qty_shipped,
d.transport_id
FROM po_asn_line_interface c
JOIN po_asn_interface d
ON to_char (c.asn_shipment_id) = to_char (d.asn_shipment_id)
WHERE c.stat_desc = 'ASN header invalid.'
AND d.stat_desc = 'Single vendor error: 1User-Defined Exception'
AND EXISTS (SELECT 1
FROM po_asn_line_interface e
WHERE c.po_cd <> e.po_cd
AND to_char(c.asn_shipment_id) = to_char(e.asn_shipment_id))) b
ON to_char (a.po_cd) = to_char (b.po_cd)
JOIN po_ln f
ON a.po_cd = f.po_cd
AND f.ln# = b.po_ln
WHERE a.stat_cd = 'O'
AND NOT EXISTS (SELECT 1
FROM po_ln$actn_hst e
WHERE e.po_cd = b.po_cd
AND e.ln# = b.po_ln
AND po_actn_tp_cd in ('SVB', 'RCV'))

Hi,
The types of SQL statements that can cause database sorts to occur include the following:
* ORDER BY
* GROUP BY
* SELECT DISTINCT
* UNION
* INTERSECT
* MINUS
* ANALYZE
* CREATE INDEX
* Joins between tables on columns that are not indexed
Making sure that all foreign key columns are indexed will also help reduce sorting when tables are joined via primary and foreign key columns. See also if you can avoid use DISTINCT clause in your SQL statement.
Cheers

Similar Messages

  • Whats the problem with this page

    hi,
    i have problem with this page
    page
    it loading the video but not showing any content related to
    the video.
    i use
    [code]
    var netCon:NetConnection = new NetConnection();
    netCon.connect(null);
    var netStr:NetStream = new NetStream(netCon);
    netStr.addEventListener(AsyncErrorEvent.ASYNC_ERROR,
    getError);
    var video:Video = new Video();
    video.attachNetStream(netStr);
    addChild(video);
    video.x=201;
    video.y=125;
    function getError(e:AsyncErrorEvent) {
    play_btn.addEventListener(MouseEvent.MOUSE_DOWN, playVideo);
    function playVideo(e:MouseEvent) {
    netStr.resume();
    removeEventListener(KeyboardEvent.KEY_DOWN, keyPressHandler
    this.addEventListener(Event.ENTER_FRAME, fileLoaded);
    var loaderBar:Sprite = new Sprite();
    addChild(loaderBar);
    function fileLoaded(e:Event) {
    var percent:Number = (netStr.bytesLoaded * 100 ) /
    netStr.bytesTotal;
    loaderBar.graphics.clear();
    loaderBar.graphics.beginFill(0xDE2C18);
    loaderBar.graphics.drawRect(205,378,percent * 4.32,5);
    loaderBar.graphics.endFill();
    if (percent==100) {
    this.removeEventListener(Event.ENTER_FRAME, fileLoaded);
    [/code]

    here is the full code
    and i have an error saying:
    ArgumentError: Error #2004: One of the parameters is
    invalid.
    at flash.display::Graphics/drawRect()
    at VIDEOPLAYER_fla::MainTimeline/fileLoaded()
    [code]
    import flash.display.Sprite;
    import flash.net.NetConnection;
    import flash.display.SimpleButton;
    import flash.net.NetStream;
    import flash.events.NetStatusEvent;
    import flash.media.Video;
    import flash.events.MouseEvent;
    import flash.events.KeyboardEvent;
    import flash.events.Event;
    import flash.display.Graphics;
    import flash.text.*;
    var netCon:NetConnection = new NetConnection();
    netCon.connect(null);
    var netStr:NetStream = new NetStream(netCon);
    netStr.addEventListener(AsyncErrorEvent.ASYNC_ERROR,
    getError);
    var URL:String =
    "/hakans/videos/BEDUK_AUTOMATIK00.flv?start=";
    var offset:uint = 1048576;
    var tamURL:String = URL + offset;
    trace(tamURL);
    var video:Video = new Video();
    video.attachNetStream(netStr);
    video.x=201;
    video.y=125;
    netCon = new NetConnection();
    netCon.addEventListener(NetStatusEvent.NET_STATUS,
    netStatusHandler);
    netCon.addEventListener(SecurityErrorEvent.SECURITY_ERROR,
    securityErrorHandler);
    function netStatusHandler(event:NetStatusEvent):void {
    switch (event.info.code) {
    case "NetConnection.Connect.Success":
    connectStream();
    break;
    case "NetStream.Play.StreamNotFound":
    trace("Unable to locate video: " + tamURL);
    break;
    function connectStream():void {
    netStr.addEventListener(NetStatusEvent.NET_STATUS,
    netStatusHandler);
    netStr.addEventListener(AsyncErrorEvent.ASYNC_ERROR,
    asyncErrorHandler);
    netStr.play(tamURL);
    addChild(video);
    function securityErrorHandler(event:SecurityErrorEvent):void
    trace("securityErrorHandler: " + event);
    function asyncErrorHandler(event:AsyncErrorEvent):void {
    // ignore AsyncErrorEvent events.
    function getError(e:AsyncErrorEvent) {
    var myTextBox:TextField = new TextField();
    var myText:String = "Bytes loaded";
    function TextWithImage()
    addChild(myTextBox);
    myTextBox.text = myText+netStr.bytesLoaded;
    /*--------------< Videoyu Durdurma, Oynatma ve Başa
    Alma >------------------*/
    stage.addEventListener( KeyboardEvent.KEY_DOWN,
    keyPressHandler );
    function keyPressHandler( e:KeyboardEvent ):void {
    // if the spaceBar is pressed then toggle video play/pause
    if( e.charCode == 32 ) {
    netStr.togglePause();
    play_btn.addEventListener(MouseEvent.MOUSE_DOWN, playVideo);
    function playVideo(e:MouseEvent) {
    netStr.resume();
    removeEventListener(KeyboardEvent.KEY_DOWN, keyPressHandler
    pause_btn.addEventListener(MouseEvent.MOUSE_DOWN,
    pauseVideo);
    function pauseVideo(e:MouseEvent) {
    netStr.pause();
    stop_btn.addEventListener(MouseEvent.MOUSE_DOWN, stopVideo);
    function stopVideo(e:MouseEvent) {
    netStr.pause();
    netStr.seek(0);
    fastforward_btn.addEventListener(MouseEvent.MOUSE_DOWN,doForward);
    function doForward(e:MouseEvent):void {
    var f:int = 1; //you can schange the skipping time here
    netStr.pause();
    netStr.seek(netStr.time + f);
    netStr.resume();
    rewind_btn.addEventListener(MouseEvent.MOUSE_DOWN,doRewind);
    function doRewind(e:MouseEvent):void{
    var x:int = 2;
    netStr.pause();
    netStr.seek(netStr.time - x);
    netStr.resume();
    fullscreen_btn.addEventListener(MouseEvent.MOUSE_DOWN,doFull);
    function doFull(e:MouseEvent):void{
    stage.displayState = StageDisplayState.FULL_SCREEN;
    /*--------------< Videoyu Durdurma, Oynatma ve Başa
    Alma / >------------------*/
    /*--------------< Video İçin Yükleme Bilgi
    Çubuğu >------------------*/
    var loaderBg:Sprite = new Sprite();
    loaderBg.graphics.beginFill(0xc78f8e);
    loaderBg.graphics.drawRect(205 , 378 , 430 , 5);
    loaderBg.graphics.endFill();
    addChild(loaderBg);
    this.addEventListener(Event.ENTER_FRAME, fileLoaded);
    var loaderBar:Sprite = new Sprite();
    addChild(loaderBar);
    function fileLoaded(e:Event) {
    var percent:Number = (netStr.bytesLoaded * 100 ) /
    netStr.bytesTotal;
    loaderBar.graphics.clear();
    loaderBar.graphics.beginFill(0xDE2C18);
    loaderBar.graphics.drawRect(205 , 378 , percent * 4.32 , 5);
    loaderBar.graphics.endFill();
    if (percent==100) {
    this.removeEventListener(Event.ENTER_FRAME, fileLoaded);
    /*--------------< Video İçin Yükleme Bilgi
    Çubuğu / >------------------*/
    /*--------------< Video Meta Bilgileri
    >------------------*/
    var metaObject:Object = new Object();
    netStr.client = metaObject;
    metaObject.onMetaData = getMetaInformation;
    var lengthOfVideo:Number = 0;
    function getMetaInformation(e:Object):void {
    lengthOfVideo = e.duration;
    trace("Genişlik :" + e.width);
    trace("Yükseklik :" + e.height);
    /*--------------< Video Meta Bilgileri /
    >------------------*/
    /*--------------< Videonun Durum Çubuğu
    >------------------*/
    //may cause problem part
    var GraphicsExample :Sprite = new Sprite();
    var size:uint = 10;
    var bgColor:uint = 0x999999;
    var borderColor:uint = 0x999999;
    var borderSize:uint = 0;
    var cornerRadius:uint = 9;
    var gutter:uint = 5;
    var dragBar:Sprite = new Sprite();
    var halfSize:uint = Math.round(size / 2);
    dragBar.graphics.beginFill(bgColor);
    dragBar.graphics.lineStyle(borderSize, borderColor);
    dragBar.graphics.drawCircle(halfSize, halfSize, halfSize);
    dragBar.graphics.endFill();
    dragBar.x=201;
    dragBar.y=376;
    addChild(dragBar);
    var drag:Boolean = false;
    this.addEventListener(Event.ENTER_FRAME, setDragBar);
    function setDragBar(e:Event) {
    if (!drag) {
    dragBar.x = ((netStr.time / lengthOfVideo) * 429) + 201;
    /*--------------< Videonun Durum Çubuğu /
    >------------------*/
    /*--------------< Videonun Kaydırma Çubuğu
    >------------------*/
    dragBar.addEventListener(MouseEvent.MOUSE_DOWN,
    startDragging);
    dragBar.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    dragBar.buttonMode = true;
    var rect:Rectangle = new Rectangle(205,378,429,0);
    function startDragging(e:MouseEvent) {
    drag = true;
    netStr.pause();
    dragBar.startDrag(false,rect);
    function stopDragging(e:MouseEvent) {
    dragBar.stopDrag();
    drag = false;
    netStr.resume();
    this.addEventListener(Event.ENTER_FRAME, reSetVideo);
    function reSetVideo(e:Event) {
    if (drag) {
    netStr.seek(Math.floor(((dragBar.x-201) / 429) *
    lengthOfVideo ));
    /*--------------< Videonun Kaydırma Çubuğu
    / >------------------*/
    netStr.addEventListener(NetStatusEvent.NET_STATUS,
    netStatusHandler1);
    function netStatusHandler1(e:NetStatusEvent):void
    switch (e.info.code)
    case "NetStream.Seek.InvalidTime":
    trace("You have seeked too far ahead, the video hasn't fully
    loaded yet");
    break;
    case "NetStream.Play.StreamNotFound":
    trace("Unable to locate video");
    break;
    /*--------------< Video Ses Kontrolü
    >------------------*/
    sound_btn.addEventListener(MouseEvent.MOUSE_DOWN, setSound);
    var checkSound:Boolean = true;
    var soundTrans:SoundTransform = new SoundTransform();
    function setSound(e:MouseEvent) {
    if (checkSound) {
    soundTrans.volume = 0;
    checkSound = false;
    } else {
    soundTrans.volume = 1;
    checkSound =true;
    netStr.soundTransform = soundTrans;
    /*--------------< Video Ses Kontrolü /
    >------------------*/
    [/code]

  • Whats the Problem with this Company?

    Most Company's want to keep there Customers happy it seems I am disappointed in everything except the reception is good. I bought a Smart phone and if you go over your limit it cost to use it.. Man my bill is higher than the Twin Towers used to be... And still I have to pay if I go over a specific amount for sharing photo's what is this? yu say its unlimited everything then they change that and say something else it sounds to me like Greed has gone to Verizon's account with all of us.. I am ashamed this is happening to all of us.. I know people who can do anything without being charged with other company's why is it this one doesn't care about our Wallets and be so happy that they have customers that actually pay there bill each month and give us a break... Shame.. Verizon.. I do love you but don't like your plans.. They are not ethical. To us.. or For us.. You need to change your plans and stop changing everything each month to something else when Your told you have unlimited everything then that is what it should be.. Now you have gone to far...

    http://m.digitaltrends.com/opinion/opinion-its-a-trap-beware-carriers-new-unlimited-talk-and-text-plans/   This site is one of many that explains how the cash cows of "talk & texting" has declined.  And it mentions family usage as you are doing.  Personally I don't talk much on the phone, I don't text much or for that matter use a load of data. So I am basically overpaying for everything. But I like knowing I have it available if I need it.  I love taking photos of the places my wife and I travel to. I upload to Facebook every step of the trip, so our friends and family have the pictures. I use a photo upload to Walgreens to print them out in hard copy for our photo albums, I also burn them to cd/dvd so I just don't use talking that much. Those texts can add up however. I use around 600 to my friends. But only from me and not my wife.  The emergency phone also very rarely sends texts or makes calls so no big deal there. But my wife uses her phone for calls, and that Netflix, You Tube and TW Cable TV so she loves data. But ours is unlimited not tiered or metered. She is happy that is all that matters.

  • Whats the problem with this code?

    import javax.swing.JOptionPane;
    public class change{
      int coins[] = {1,5,10,25,50};
      int change=0;
      public void backtracking(coins,change){
        int b=0;
        for(int i=0; i<=4; i++){
          if (coins[i] <= change){
            b = max(b, coins[i]+backtracking(i, change - coins));
    System.out.println("Output: "+b);
    public static void main(){
    int input = JOptionPane.showInputDialog("Amountof the change? ");
    backtracking(coins, input);

    Here's a few, for starters
    import javax.swing.JOptionPane;
    public class change{
    //class names should start with capital letters
      int coins[] = {1,5,10,25,50};
      int change=0;
      public void backtracking(coins,change){
    //this is a method signature, needs type identifiers etc, something like public void backtracking(int[] anyIntArray,int anyInt)
        int b=0;
        for(int i=0; i<=4; i++){
    //here, 4 is a magic number, if you mean <= all the elements of coins[], use < coins.length
          if (coins[i] <= change){
    //coins[i] will never be less then change(which is 0)
            b = max(b, coins[i]+backtracking(i, change - coins));
    //there is no method max declared anywhere
    System.out.println("Output: "+b);
    public static void main(){
    //main method signature is incorrect, will compile, but will error
    int input = JOptionPane.showInputDialog("Amountof the change? ");
    //you're trying to put a string into an int
    backtracking(coins, input);
    //you have not created an instance of class Change, to use this method

  • Please tell me what is the problem with this code

    Hai,
    Iam new to Swings. can any one tell what is the problem with this code. I cant see those controls on the frame. please give me the suggestions.
    I got the frame ,but the controls are not.
    this is the code:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class ex2 extends JFrame
    JButton b1;
    JLabel l1,l2;
    JPanel p1,p2;
    JTextField tf1;
    JPasswordField tf2;
    public ex2()
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    setTitle("Another example");
    setSize(500,500);
    setVisible(true);
    b1=new JButton(" ok ");
    p1=new JPanel();
    p1.setLayout(new GridLayout(2,2));
    p2=new JPanel();
    p2.setLayout(new BorderLayout());
    l1=new JLabel("Name :");
    l2=new JLabel("Password:");
    tf1=new JTextField(15);
    tf2=new JPasswordField(15);
    Container con=getContentPane();
    con.add(p1);
    con.add(p2);
    public static void createAndShowGUI()
    ex2.setDefaultLookAndFeelDecorated(true);
    public static void main(String ar[])
    createAndShowGUI();
    new ex2();
    }

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class ex2 extends JFrame
        JButton b1;
        JLabel l1,l2;
        JPanel p1,p2;
        JTextField tf1;
        JPasswordField tf2;
        public ex2()
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            setTitle("Another example");
            b1=new JButton(" ok ");
            p1=new JPanel();
            p1.add(b1);
            p2=new JPanel();
            p2.setLayout(new GridLayout(2,2));
            l1=new JLabel("Name :");
            l2=new JLabel("Password:");
            tf1=new JTextField(15);
            tf2=new JPasswordField(15);
            p2.add(l1);
            p2.add(tf1);
            p2.add(l2);
            p2.add(tf2);
            Container con=getContentPane();
            con.add(p1, BorderLayout.NORTH);
            con.add(p2, BorderLayout.CENTER);
            pack();
            setVisible(true);
        public static void createAndShowGUI()
            ex2.setDefaultLookAndFeelDecorated(true);
        public static void main(String ar[])
            createAndShowGUI();
            new ex2();
    }

  • Vector, what is the problem with this code?

    Vector, what is the problem with this code?
    63  private java.util.Vector data=new Vector();
    64  Vector aaaaa=new Vector();
    65   data.addElement(aaaaa);
    74  aaaaa.addElement(new String("Mary"));on compiling this code, the error is
    TableDemo.java:65: <identifier> expected
                    data.addElement(aaaaa);
                                   ^
    TableDemo.java:74: <identifier> expected
                    aaaaa.addElement(new String("Mary"));
                                    ^
    TableDemo.java:65: package data does not exist
                    data.addElement(aaaaa);
                        ^
    TableDemo.java:74: package aaaaa does not exist
                    aaaaa.addElement(new String("Mary"));Friends i really got fed up with this code for more than half an hour.could anybody spot the problem?

    I can see many:
    1. i assume your code snip is inside a method. a local variable can not be declare private.
    2. if you didn't import java.util.* on top then you need to prefix package on All occurance of Vector.
    3. String in java are constant and has literal syntax. "Mary" is sufficient in most of the time, unless you purposly want to call new String("Mary") on purpose. Read java.lang.String javadoc.
    Here is a sample that would compile...:
    public class QuickMain {
         public static void main(String[] args) {
              java.util.Vector data=new java.util.Vector();
              java.util.Vector aaaaa=new java.util.Vector();
              data.addElement(aaaaa);
              aaaaa.addElement(new String("Mary"));
    }

  • I was playing candy crush and I had too much problem with my bill your charge too much I want to know what is the problem with this game cost

    HELLO
    I was playing candy crush and I had too much problem with my bill your charge too much I want to know what is the problem with this game cost

    Take it up with iTunes Support - we are not Apple here, we are just users like you:
    http://www.apple.com/support/itunes/ww/
    Cheers,
    GB

  • What is the problem with this Stored Procedure

    Hi ,
    What is the problem with this Stored Procedure ?Why is it giving errors ??
    CREATE or replace  PROCEDURE getEmpName
    *(EMP_FIRST OUT VARCHAR2(255))*
    BEGIN
    SELECT ename INTO EMP_FIRST
    FROM Emp
    WHERE EMPNO = 7369;
    END ;
    */*

    You don't specify precision in procedure arguments.
    (EMP_FIRST OUT VARCHAR2(255))should be
    (EMP_FIRST OUT VARCHAR2)Since you asked what's wrong with it, I could add that it needs formatting and the inconsistent use of upper and lower case is not helping readability.

  • My iphone 4 suddenly blank, i thought it is out of battery and put on a charger, but in few minutes later my iphone turns to be too hot on the right half side of its body. i pull off the charger. whats the problem is this?

    my iphone 4 suddenly blank, i thought it is out of battery and put on a charger, but in few minutes later my iphone turns to be too hot on the right half side of its body. i pull off the charger. whats the problem is this?
    the next day i tried to connet with itunes on pc, but its undetectable. what should i do? i think i will need to delete notes, pivtures and video recordec by the iphone itself but how to do this since the phone cant be on at all. lease help me. its only 7moths old since i buy it

    i try to reset but nothing happened. & my warranty had end bcause i bought thru small dealer with a month's shop warranty only. due to problem of getting hot of the iphone's right side body, is it may cause of battery problem? how much will it cost to solve/repair this kind of problem?
    thank you for ur help earlier

  • Why is Apple so bad at providing customers with information on what the problem with email is and what they are doing to fix it?

    Why is apple not providing information on what the problem withe email is and what they are doing to fix, along with a time frame for fixing the problem.

    It was because the problem was major.  If you do not know tech, you should know that a two day outage usually indicates some type of virus, hack, or a bad software load that they had to unravel.  The common way to solve that is to rebuild servers and put back into service.  That takes time.
    Apple did not want to admit this problem.  My guess at this stange was that they loaded new software that might be associated with the new IOS and it crashed.  To reveal this would be to cast into doubt their future revenue.
    Either way.  Run do not walk away from Icloud products and services.  Apple has demonstrated they can not be a business partner.

  • New IMac is crashing randomly because of "Panic Kernel Error." Now IMac startup disk is not visible and will not mount. What the story with this machine. Running 10.6.7

    New IMac is crashing randomly because of "Panic Kernel Error." Now IMac startup disk is not visible and will not mount. What the story with this machine. Running 10.6.7

    Almost certainly, some sort of hardware problem on your logic board. 
    Make an appointment and take it to your local Apple Store: http://www.apple.com/retail/geniusbar/

  • TS1398 I have 2 ipads 1st  ipad 2G and ipad 3G whats the problem with the 3G ipad the wifi is now getting connected to the wifi modem and the ipad 2G is getting connected no problem with the 2G ipad what should i do...?????  And i had checked with my rout

    I have 2 ipads 1st  ipad 2G and ipad 3G whats the problem with the 3G ipad the wifi is now getting connected to the wifi modem and the ipad 2G is getting connected no problem with the 2G ipad what should i do...?????  And I had checked with my iball baton router with the iball sevice provider.

    Hi there Paula120,
    You may find the troubleshooting steps in the article below helpful.
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/ts1538
    -Griff W. 

  • Whats the problem in this vi?

    Dear all,
    with loads of help from many members of this group we designed the following attached vi.
    but we made some changes recently to get a running/scroll display. basically the program has two loops, one for data acquistion and one for data generation. the acquistion loop designed to update 1 data point at a time and generation loop designed to update 1000 points at a time. but now the vi works in a funny way. when the program starts it runs the acquisition loop first and when the stop key is pressed it runs the generation loop. to stop the program, i have to abort it. can anyone point me what the mistake is and direct me in the right way please.
    Attachments:
    broadband_filt_unfilt.vi ‏714 KB

    Dear all,
    thanks for your suggestions. i changed the looping structure and it is working fine. thanks dev for mentioning that example program once again. i should've had a look on that program more carefully the first time u mentioned. i simply followed the principle on that program and it did the magic.  thanks once again.
    anyway, but as usual i have one problem now. i am not sure whether u remember the case loop u helped me with in the earlier stages for recording purposes. briefly it had been designed to record for a given number of time, depending on the number of data per cycle. it  had two options, when we press the record button, it can record for the defined amount of time or the recording can be stopped before the defined amount of time is over and so the record button will be ready for the next go.
    but for some reasons, i m lacking the second option now. i can record without any problem for the defined amount of time but if i stop the recording during that period, i cant able to restart the recording again. but i have to stop the program and have to start to do that. can u tell me whats the reason for this please.
    i attached the program as usual.
    Many thanks.
    Rishe.
    Attachments:
    narrowband_filt_unfilt.vi ‏812 KB

  • Problem with this query

    Hi
    We are using this query
    SELECT ...........
    FROM TRIP JOIN TRIPEXTENSION ON TRIPEXTENSION.TRIPID = TRIP.TRIPID JOIN FOREIGNRECLOC ON FOREIGNRECLOC.TRIPID = TRIP.TRIPID JOIN CUSTSEGCONTROL ON CUSTSEGCONTROL.TRIPID = TRIP.TRIPID JOIN CUSTOMERCONTROL ON CUSTOMERCONTROL.CUSTOMERID = CUSTSEGCONTROL.CUSTOMERID JOIN CUSTOMER ON CUSTOMER.CUSTOMERID = CUSTSEGCONTROL.CUSTOMERID LEFT JOIN TRIPSEGMENT ON TRIPSEGMENT.TRIPSEGMENTID = CUSTSEGCONTROL.TRIPSEGMENTID LEFT JOIN TRIPSEGMENTEXTENSION ON (TRIPSEGMENTEXTENSION.TRIPSEGMENTID = TRIPSEGMENT.TRIPSEGMENTID AND TRIPSEGMENTEXTENSION.TRIPID = TRIP.TRIPID) LEFT JOIN TICKET ON CUSTOMERCONTROL.TICKETID = TICKET.TICKETID WHERE FOREIGNRECLOC.TRIPID IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) AND ((TRIP.STATUS <> ? AND (CUSTSEGCONTROL.DELETEDITEM = 0 OR CUSTSEGCONTROL.DELETEDITEM is null )) OR (TRIP.STATUS = ?)) AND TRIPEXTENSION.EOTTIME = CUSTSEGCONTROL.EOTTIME AND TRIPEXTENSION.EOTTIME = CUSTOMERCONTROL.EOTTIME AND TRIPEXTENSION.EOTTIME = TRIP.EOTTIME
    It is taking long time to execute and causing timeout. The columns used in where clause are as follows
    FOREIGNRECLOC.TRIPID - PRIMARY KEY
    TRIP.STATUS - NO INDEX/CONTAINS LOW CARDINALITY DATA
    CUSTSEGCONTROL.DELETEDITEM - NO INDEX/CONTAINS LOW CARDINALITY DATA
    TRIPEXTENSION.EOTTIME/CUSTSEGCONTROL.EOTTIME/CUSTOMERCONTROL.EOTTIME/TRIPEXTENSION.EOTTIME - NO INDEX/CONTAINS HIGH CARDINALITY DATA
    Our 'experts' said something 'seriously' wrong with this query. Can anyone provide any suggestion/observation on this?
    thanks and regards,
    SUMIT

    Hi Devid
    Thans for your response. The result of explain plan is
    SQL> SELECT * FROM TABLE(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    | Id  | Operation                        | Name                      | Rows  | Bytes | Cost (%CPU)|
    |   0 | SELECT STATEMENT                 |                           |     1 |   592 |    51   (8)|
    |   1 |  TABLE ACCESS BY INDEX ROWID     | FOREIGNRECLOC             |     1 |    16 |     1   (0)|
    |   2 |   NESTED LOOPS                   |                           |     1 |   592 |    51   (8)|
    |   3 |    NESTED LOOPS                  |                           |     1 |   576 |    50   (8)|
    |   4 |     NESTED LOOPS                 |                           |     1 |   569 |    50   (8)|
    |   5 |      NESTED LOOPS                |                           |     1 |   511 |    49   (9)|
    |   6 |       HASH JOIN                  |                           |     1 |   397 |    42  (10)|
    |   7 |        HASH JOIN                 |                           |    11 |  3443 |    36   (9)|
    |   8 |         HASH JOIN                |                           |    13 |  3588 |    29   (7)|
    |   9 |          HASH JOIN               |                           |   327 | 51339 |    10  (10)|
    |  10 |           TABLE ACCESS FULL      | TRIP                      |   270 | 17820 |     3   (0)|
    |  11 |           HASH JOIN              |                           |   327 | 29757 |     7  (15)|
    |  12 |            TABLE ACCESS FULL     | TRIPSEGMENT               |   123 |  9225 |     3   (0)|
    |  13 |            TABLE ACCESS FULL     | TRIPSEGMENTEXTENSION      |   327 |  5232 |     3   (0)|
    |  14 |          TABLE ACCESS FULL       | CUSTSEGCONTROL            |  3180 |   369K|    19   (6)|
    |  15 |         TABLE ACCESS FULL        | CUSTOMERCONTROL           |  2658 | 98346 |     6   (0)|
    |  16 |        TABLE ACCESS FULL         | CUSTOMER                  |   464 | 38976 |     5   (0)|
    |  17 |       TABLE ACCESS BY INDEX ROWID| TRIPEXTENSION             |     1 |   114 |     7   (0)|
    |  18 |        INDEX RANGE SCAN          | EXTENSION_TRIPID_FK_INDEX |     7 |       |     1   (0)|
    |  19 |      TABLE ACCESS BY INDEX ROWID | TICKET                    |     1 |    58 |     1   (0)|
    |  20 |       INDEX UNIQUE SCAN          | SYS_C0011530              |     1 |       |     0   (0)|
    |  21 |     INDEX UNIQUE SCAN            | SYS_C0011533              |     1 |     7 |     0   (0)|
    |  22 |    INDEX RANGE SCAN              | TRIPSEGEXT_TRIPID_INDEX   |     1 |       |     0   (0)|
    Note
       - 'PLAN_TABLE' is old version
    32 rows selected.thanks and regars,
    SUMIT

  • What is the problem with this code ? Race condition??

    Guys,
    The idea behind the attached code is quite simple.
    I have a 2D parent array. First, I print a subset of this array into a table control (based on a sensor selection). Now, I want edit the numbers in the table. I need the changes to be reflected in the table and the parent 2D array. (In simple terms, this is like replacing the the edited array subset into the parent 2D array)
    The problem is when I change(edit) any entry in the table, the entry changes back to its original value. The change doesnt seem to be reflecting on the parent 2D array and the table. .
    Can anyone tell me where the problem is?
    Thanks
    Ravi
    Solved!
    Go to Solution.
    Attachments:
    Alarm threshold test.vi ‏14 KB

    I agree with Chris, here's an idea (of whatI think your code does):
    The case structure in your code was unnecessary, all the cases were the same so I removed them.
    The sequence structure was unnecessary.
    Ton
    Message Edited by TonP on 11-20-2008 07:52 PM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!
    Attachments:
    Alarm threshold test_BD.png ‏19 KB

Maybe you are looking for

  • AT NEW .. ENDAT

    HI, I was trying to use the Do.. Varying statement to get the 1st 3 amount in Databaste Table PA0008. However, when i tried to code the program as below and in debug mode, inside the AT New.. ENDAT the value is always zero. After the ENDAT statement,

  • User Status change problem in Process Order

    Hi, We are in process of upgrading our system from 4.6C to ECC 6.0. I have a problem with User status change for process Orders. In 4.6C we are using the profile x with settings: 10     ZNEW     Created process order     10     90     1     1     ZST

  • Creating an InDesign Portfolio for print, PDF, and the iPad | Adobe & You: Be Seen. Be Heard. Stand Out. | Adobe TV

    Discover how you can display your work in beautiful ways with Adobe InDesign CS6. Learn how to start creating a portfolio for print and prepare to adapt your portfolio for PDF, interactive PDF, and the iPad. Utilize the example portfolio assets to be

  • When i update to OS 5 will my contacts be erased?

    Will my contacts, photos and messages be deleted after i update to OS 5?

  • 2% of total amount

    Hi all, I have a scenario like this . i have one calculated key figure Total Amount and based on that key figure i want 2 % of that Total Amount . I have tried in BEx Explorer . i had put formula like this . Total amount % 2 but geting *  value in re