big small problem request

Hi all

I run a query in 9.2 and take 6 min.:

Select E.cam1, E.cam2, E.cam3
TABA E
WHERE E.date =
(SELECT MAX (date)
TABA F
WHERE F.camp1 = E.camp1
AND camp.2 = E.camp2
AND F.date <
ADD_MONTHS (to_date ('200903' |')) 01', 'RRRRMMDD'), 1));

explain the plan:
--------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | Cost |
--------------------------------------------------------------------
| 0 | SELECT STATEMENT | 1. 51. 365K |
| 1. HASH JOIN | 1. 51. 365K |
| 2. VIEW | VW_SQ_1 | 1 559 K | 52 M | 64243 |
| 5: GROUP SORT BY | 1 559 K | 20 M | 64243 |
| 4. TABLE ACCESS FULL | TJTSICTA | 1 559 K | 20 M | 53504 |
| 5. TABLE ACCESS FULL | TJTSICTA | 31 M | 475 M | 53504 |


When I run in 10g:

query take 25 minutes.
Explain the plan:

-------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | TempSpc | Cost |
-------------------------------------------------------------------------
| 0 | SELECT STATEMENT | 4. 212. 443K |
|* 1 | FILTER |
| 2. HASH GROUP BY. 4. 212. 443K |
|* 3 | HASH JOIN | 30 M | 1527M | 1094M | 148K |
|* 4 | TABLE ACCESS FULL | TJTSICTA | 30 M | 749 M | 51962 |
| 5. TABLE ACCESS FULL | TJTSICTA | 30 M | 780 M | 51962 |

How can I rewrite the query better plan?

Thank you.

Hello

Try:

SELECT cam1, cam2, cam3
  FROM (
  SELECT E.cam1,E.cam2,E.cam3,
      ROW_NUMBER() OVER (PARTITION BY cam1, cam2 ORDER BY date DESC) row_num
    FROM TABA E
   WHERE E.date < ADD_MONTHS(to_date('200903'||'01','RRRRMMDD'),1))
 WHERE row_num <= 1;

And you have errors in your query, what could not possibly run.

Tags: Database

Similar Questions

  • Signature Playbook WebWorks problem request

    1. I created an app PlayBook using WebWorks
    2. I developed my application using Eclipse WebWorks 2.0 plugin.
    3. I have compiled my Eclipse app which produces a file zip "myapp.zip."
    4. I create a my zip file .bar file by running the following at the command prompt:

    "C:\BlackBerry SDK\PlayBook\BlackBerry WebWorks SDK for Tablet 2.0.0.4\bbwp\bbwp.exe" 'C:\Users\myname\workspace\myapp\build\myapp. Zip"o"C:\Users\myname\workspace\myapp\build\Packaged ".

    5. I try to connect the bar file at the command prompt: (password changed)

    ""C:\BlackBerry SDK\PlayBook\BlackBerry WebWorks SDK for Tablet 2.0.0.4\bbwp\blackberry-tablet-sdk\bin\blackberry-signer"- cskpass - verbose mypassword--keystore"C:\Signing Files\MyP12Key.p12"- storepass mypassword C:\Users\myname\workspace\myapp\build\Packaged\myapp.bar" RDK

    I get the following error:

     

    Answer = answer of Signature
    Confirm = null
    Error = Code signing request failed because Application-Development-Mode in manifest is present and is not set [false].
    ]
    barsigner error: Server error: Code signing request failed because Application-Development-Mode in manifest is present and is not set [false].

     

    What is the problem?

    W00T!  I think it was her! There are a few things that are a little unclear.  but I got through it.  I published a blog post with all the instructions (copied) as well as a few notes to make it clearer to my blog.

    Thank you very much for your help Tim!

  • Small problem with scrollbars

    Hello

    I've implemented a custom Manager where I paint the scroll arrows myself.  It works fine on the touch non-ecran models, but when I try to scroll on the storm, the scroll bars are being developed faster than the screen is repainted, it looks like a big mess.

    Any ideas on how I can avoid this?

    I have attached a screenshot to illustrate the problem.

    FYI, my solution has worked.

    in the constructor:

    setScrollListener(this);
    

    Add this method in the handler:

    public void scrollChanged(Manager manager, int newHorizontalScroll, int newVerticalScroll) {
        invalidate();
    }
    

    I don't notice any effect on performance.

  • Small problem with the events of the listener

    I have a small interface with 5 radio buttons and a buttonfield and when i click buttonfield I create an event. all this works fine, but when I want to go back to the previous page I see pop up with 3 had to 'save, ignore, reject' and when I click on one of them I create a duplicate of the trial before.

    How can I go to the previous page without showing the pop-up with 3 coiches and without creating duplicate event?

    It's the listener code

    FieldChangeListener listener = new FieldChangeListener() {}
          
    ' Public Sub fieldChanged (field field, int context) {}
     
    {if (delivery. IsSelected())}
                               
    Time zone tz = TimeZone.getTimeZone ("GMT"); We want the time gmt
    Calendar gc = Calendar.getInstance (tz);  It gives the time date and gmt
                     
    int ore = gc.get (Calendar.HOUR_OF_DAY);
    int min = gc.get (Calendar.MINUTE);
    s int = gc.get (Calendar.SECOND);
                     
    Co co = new coordinate (longitude, latitude, ore, min, sec, 9, "Delivered");
    CoorVect.addElement (co);
    Dialog.Inform ("send event");
                       
    } else {}
    {if (GuastoMeccanico.IsSelected ())}

    Time zone tz = TimeZone.getTimeZone ("GMT"); We want the time gmt
    Calendar gc = Calendar.getInstance (tz);  It gives the time date and gmt
                         
    int ore = gc.get (Calendar.HOUR_OF_DAY);
    int min = gc.get (Calendar.MINUTE);
    s int = gc.get (Calendar.SECOND);
                         
    Co co = new coordinate (longitude, latitude, ore, min, sec, 9, "Guasto Meccanico");
    CoorVect.addElement (co);
    Dialog.Inform ("send event");

    } else {}
    {if (IncidenteStradale.IsSelected ())}

    Time zone tz = TimeZone.getTimeZone ("GMT"); We want the time gmt
    Calendar gc = Calendar.getInstance (tz);  It gives the time date and gmt
                          
    int ore = gc.get (Calendar.HOUR_OF_DAY);
    int min = gc.get (Calendar.MINUTE);
    s int = gc.get (Calendar.SECOND);
                          
    Co co = new coordinate (longitude, latitude, ore, min, sec, 9, "Incident Stradale");
    CoorVect.addElement (co);
    Dialog.Inform ("send event");

    } else {}
    {if (LavoriInCorso.IsSelected ())}
                             
    Time zone tz = TimeZone.getTimeZone ("GMT"); We want the time gmt
    Calendar gc = Calendar.getInstance (tz);  It gives the time date and gmt
                           
    int ore = gc.get (Calendar.HOUR_OF_DAY);
    int min = gc.get (Calendar.MINUTE);
    s int = gc.get (Calendar.SECOND);
                           
    Co co = new coordinate (longitude, latitude, ore, min, sec, 9, "Works in Corso");
    CoorVect.addElement (co);
    Dialog.Inform ("send event");
    } else {}
    {if (SenzaConsegna.IsSelected ())}
                                          
    Time zone tz = TimeZone.getTimeZone ("GMT"); We want the time gmt
    Calendar gc = Calendar.getInstance (tz);  It gives the time date and gmt
                            
    int ore = gc.get (Calendar.HOUR_OF_DAY);
    int min = gc.get (Calendar.MINUTE);
    s int = gc.get (Calendar.SECOND);
                            
    Co co = new coordinate (longitude, latitude, ore, min, sec, 9, "Not delivered");
    CoorVect.addElement (co);
    Dialog.Inform ("send event");

    } else {}
    Dialog.Inform ("Nessun elemento indication!");
    }
    }
    }
    }
    }
    }
    };

    Added on-screen, this code will replace the popup screen.

    I don't understand the second part of the question, that is to say the second invent.  Add this code and make sure that the popup is removed and then tell us if all your problems are solved.

    Also search the doc for this method in the object Screen to understand how it works.

    /*
    * Override to ignore the save/discard/Cancel dialog box
    */
    public boolean onSavePrompt() {}
    Returns true;
    }

  • Small problem of calculation for the size of the Page when using overflow online

    Hello world:

    It seems to me that in 11g when I use:

    (1) a presentation of table form
    (2) overflow online
    (3) calculate the width of the Table

    The calculation does not take into account the width of the "twistie" as I call it, which is a small triangular arrow pointing at the time where there is something to the overflow inline and points downwards when you look at what is in the overflow online.

    Pages that have these 3 features have a scroll bar on the bottom, which needs a little more room. I guess that's the width of "twistie" is not taken into account.

    I looked on this forum as well as the Release Notes to see if it was a known problem, but did not find, and I can send you a unit with the HRSchema test, if you want to.

    I realize that I can use the "pixels" instead of calculating the width of the Table, but I thought I should report it to you if you didn't know already.

    Mary
    U

    Mary,

    You use JDeveloper 11.1.1.4?
    I so that explained. This version of JDev has some annoying layout changes. The good news is that JHeadstart 11.1.1.3 who has just been released should solve these problems of presentation.

    Steven Davelaar,
    Jheadstart team.

  • Can anyone help please with Javascript. 2 small problems.

    Hello. I created a dynamic PDF form with fields. I have 2 problems that I don't know that someone can help me with. (Someone I can email this PDF on request).

    PROBLEM 1. In this form, I have a table (in fact I think that it is a form of sub) which has 3 buttons associated with it ('Add Row', 'Delete Row' and (line Clear').) A single button adds a new line. It works, but effectively, it duplicates the line (and all the fields/cells of text contained in the line) and this new line at the bottom of any existing lines. What I'm asking, is for this button (the button gets duplicated with the line) to place the new line immediately below the line where it is clicked. That is to say, imagine you open the document, complete line (at this stage it is only) and click on the button 'Add Row '. You now have 2 rows (large), while you complete the second row. Now, here's my problem, if you press the button "Add a line" on the first line, a new 3rd line is added at the bottom and not between line 1 and line 2.

    Actually if you have dozens of lines filled and you need to insert a line of amendment, currently it is impossible without deleting all the lines to the point where you want to check/insert.

    PROBLEM 2. In this line of alphanumeric text, the are two fields (called "Rate" and "Loading") where dollar amounts are entered. As the form is filled (lines can be generated dynamically and there fields filled out manually by the user) there may be potentially dozens of lines in a completed form and, as each line has several fields of alphanumeric text, one can imagine of forming columns once there is more than 1 line. At the end of the form, the totals are automatically calculated. I created a button to reset (clear) all amounts in these two specific areas (columns), but in all ranks. Unfortunately there is something wrong with my script syntax like this button does not. (I want this facility as the end of the form, which is a draft budget, I need to send two copies - one accountants with numbers and logistics and a second copy to another Department that I don't want to give the figures, so I need the key to clear the numbers without having to erase each cell individually).

    Any help that anyone can give would be much appreciated.

    Please send me an email to

    [email protected] If you want I send you the file.

    See you soon

    Bradd

    Send the form to

    [email protected] and I will give it a go... include a reference back to this forum announcement.

    Paul

  • Small problem with Photoshop CS3

    Hi, I have a little problem with Photoshop CS3, I don't know if it's because only option of Windows that I messed up, but the thing is that I got in all the options, or some sort of preferences.

    http://img256.imageshack.us/img256/3554/62467600.jpg

    I don't speak of the 'little window' (I don't know the exact name) come, in this case, the filter and analysis options, they just turn right and usually, down it on their left side. It's really annoying.

    Not a big deal, but I can not really work properly. I hope you guys can help me, and this is my first post, I hope I don't break any rules.

    You have activated the left-handed Tablet support in your system settings. Turn the power off and everything will be back to normal.

    Mylenium

  • Small problem with the tween class?

    Hey everyone, I have a site that incorprerates several different interpolations, interpolation, running on a timer in the main movie(scrolling text), another developed with a button click (scrolling images) in a film that is loaded into the main movie. My problem is that tweens sometimes freeze, especially the scrolling text and from time to time, random images, interpolation of images scroll freezes. I should mention that I have several different EventListeners in the background to mouse clicks, and I have small (15 k) SWFs loaded into the film every 3.5 seconds. If anyone knows why the tweens freeze sometimes? could it have something to do with the loading and the EventListeners, or I have to live with?

    Thank you for reading and suggestions that you may have;


    The draft of the site is www.sunnysideosc.ca (select Gallery > pictures)

    Interpolations of freezing is usually caused by the instance of Tween getting the garbage collector. You must have the persistence of a reference to the Tween to prevent it of to GC would be. In other words, if you do this:

    new Tween(obj,'x',etc...)
    

    While Tween will get destroyed the tracks of time following GC. Instead, follow these steps:

    tween = new Tween(obj,'x',etc...)
    

    steerage "would be a property of the object in scope when the Tween is created.

    Also, you can create the Tween instance once at the beginning and assign to a property and use Tween.continueTo () to make the animations.

  • small problem with the printer dialog box

    I recently added a Brother printer to my IMac and ran into a minor problem.  When I put in place using my WiFi and AirPrint, the dialog box has a convenient box for the black and white that I was able to check in one easy-to-replace step and just print in color.  However, the alarm time and the answer is a bit slow.  So, I then plugged a cable and add this version of the printer.  Now the box is missing and nothing I've been able to do, to delete and add new printer allowed me to bring that?  Any ideas on how I can get this feature practice appears in the dialog box with the printer connected to the cable?  Thank you.

    If I understand correctly, you have now two entries separated for this printer to Print & Scan? It's OK, although AirPrint is better for various reasons.

    I understand the printer takes an unacceptable amount of time to wake up to when choosing the AirPrint printer, and you want to avoid this.

    If you have added a separate entrance - one for the USB printer connected - how who you? Did you leave the print & Scan install this printer automatically on its own, or did you download and install a driver of brother separately?

  • When I click on the home page, it gives me the page but oriented to the bottom of the page. What is a small problem with the last update? How to fix it please.

    Updated Firefox to day today. Suddenly, my homepage is upward. When I click on home, he goes to the correct page, but pulls down of it every time. I want to straighten it please.

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/tools > Modules > appearance/themes).

  • Small problem...

    Gentlemen, I recently came across a problem with my account on a update Skype Skype, so I tried to uninstall and reinstall Skype. Now when I try to uninstall (basic Skype), I get a message #2203 my question is how can I uninstall Skype ANDS reinstall.

    Thank you...

    Sorry, President of the i shouldn't have messed with my Environmental Variables. In addition, my time was not established correctly, installed like a charm, very robust program Skype... Thank you and good day...

  • State machine gets stuck (small problem)

    Hello

    I have a problem with the state machine, I have atteched dummy code that my problem can be considered. When I hit the exit button and the menu popup appears, the YES button works as it should, but when I type no., my program gets stuck. I tried initializing controls, but no effect

    Thank you for your help.

    I think it will be easier to use a case OPI event.

    Jean-Marc

  • Small problem with Audio with m9500y

    I just updated my computer to Vista Home Premium x 64 to Windows 7 Home Premium x 64. I've only updated, I did a clean install. My sound works, but when I plug my headphones (at the front), the sound still plays across the screen. I looked at the device and it says it's working properly. I don't want to uninstall, because I don't know where to find the software for the audio components before. I managed to figure out that I can get the headphones to work if I do the helmet, the default playback device.

    I'll have to reinstall it the device, or there at - it another way to fix it?

    Thanks for your help.

    Hello

    Try downloading and installing a slightly older Realtek driver on the link below.

    FTP://ftp.HP.com/pub/softlib/software11/COL30523/PV-75647-2/sp44431.exe

    After it has installed, restart the PC.

    If the above did not help, run the troubleshooter automated Microsoft on the link below to see if that helps or highlights the problem.

    http://Windows.Microsoft.com/en-us/Windows-Vista/tips-for-fixing-common-sound-problems

    Kind regards

    DP - K

  • Windows 7 and Wow (World of Warcraft) big time problem (logs out of wow and my internet)

    Hi I have a problem when I go in the world of warcraft after 30 seconds later, I get disconnected not only Wow, but on the internet and I can't understand why does. So what I did was to look on the fourms to warcraft and couldn't find a solution to my problem, so I tried to combine my local connection and my wireless connection make jumper but I get a message saying "an unexpected error occurred while configuring the network bridge." I use a wireless router but I do not have a cause of Wired internet cables will not reach my room. the router I use is NEXT Max range model Netgear Wireless-N Router WNR834B v2 and the usb adapter that I use for this router is brought Max NEXT Wireless USB Adapter WN121T. I recently received this new hp computer which has windows 7 64-bit on it and I really want to play because of wow I just put a sheet in): anyway hope to hear from someone

    Sounds like it might be related to the same problem I have, the two thing I did her seemed to help was to disable ipv6 (click the icon at the bottom right of your screen network, click on "Network and sharing Center", then click on LAN or wireless network, you must do two of them IMO.  Once you have done this, click 'Properties', then click to clear the check in the box for "Internet Protocol version 6" and then select "internet protocol version 4", and click Properties. "  Then click on the button "Advanced".  Once you have done that click on the tab "wins" and below, it will be 'net bios settings' and click on one to disable.

  • a big small multiple vs vi

    Is it better to develop a program in a single VI or multiple screws that are smaller and that instances of the screw in the main VI?

    Could you please tell me some advantages and disadvantages?

    Thank you!

    The advantages of a modular outweigh the benefits you could win (as appropriate) on a single, monolithic VI. Thinking about. With a single monolithic VI, you have something that's going to be great to manage and require a lot of screen real estate just for coding. This paradigm is not limited to LabVIEW, as it applies to any programming environment.

Maybe you are looking for