Hints FIRST_ROWS and order by not working together

Hi,
We are facing an issue like we are using hint FIRST_ROWS with a query which have a order by clause, if we are giving both together
it is not working and if we remove either order by or hint it is working
SELECT /*+FIRST_ROWS*/ * FROM (SELECT MYROWS.*,
ROWNUM RN FROM (SELECT * FROM V_REPORT WHERE START_DATE > '22-SEP-04'
AND END_DATE < '22-SEP-08' AND
(GEO_ID in (select GEO_ID from loc where anc = 0))
ORDER BY
ENTITY,OPERATION,NAME
MYROWS)
A simliar query from other view is working fine.
Please help me on the same.

David_Aldridge wrote:
Solomon Yakobson wrote:
Well, ORDER BY implies all rows must be fetched first and then ordered. So yes, FIRST_ROWS does not make much sense in that situation, does it?.
SY.Not in every case -- sometimes an index can be used by the optimizer to returen rows in the correct order without having identified the entire result set.
FIRST_ROWS is deprecated in favour of FIRST_ROWS(n), by the way. http://download.oracle.com/docs/cd/B19306_01/server.102/b14223/usingpe.htm#i1009413
And even if the result set needs to be ordered and no index can be used to avoid the sort operation Oracle offers for "top n" and "pagination" queries the "ORDER BY STOPKEY" optimization which only keeps the top n rows to sort (probably in memory if n is small enough) and eliminates the remaining ones which can make a huge difference if the volume to sort is large.
I've written a note about issues like that recently.
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/

Similar Messages

  • My itunes and iphone are not working together. all my software is up to date. what i can do? i need to manage my phone!!

    I'm getting extremely frustrated with my iphone and mac.
    i have the iphone 4, and the mac is leopard.
    I plugged my phone it to manage my music, and a message popped up saying i needed software 10.6.8 or higher.
    so i downloaded the 10.7. it's still not working!
    i have very little space left on my phone and i need to manage everything.
    what do i do??
    someone please help!!!!

    We need clarification here.
    Please don't just state version numbers, also state which software.  iTunes 10.7 requires OSX 10.6.8 or higher.  Leopard is OSX 10.5.8.  You have two alternatives right now.  One is to stay with Leopard for a while (ultimately you should upgrade) and install iTunes 10.6.3 which is the last version to work with Leopard.  This should work with iOS6 on an iPhone4.  The other is to call Apple and order OSX 10.6 (Snow Leopard) and upgrade the computer to 10.6.8 which will allow you to run iTunes 10.7.  The caveat is we know nothing about which computer you run and if it even can run any system higher than Leopard.
    Here is iTunes 10.6.3
    iTunes 10.6.3 - http://support.apple.com/kb/DL1575
    If you want to try upgrading:
    Get more information about your computer. Go to the Apple in the upper left corner of any window, then "About this Mac" and "More Info..."  Copy and paste the information here, but omit the serial number and Hardware UUID (if present).  If it says something about Intel or Core Duo or Core 2 Duo in the processor you can upgrade to Snow Leopard (assuming you have sufficient RAM/"memory").  If it says PPC or PowerMac, you cannot.
    Kappy 08/2012 post on upgrading to Snow Leopard, then Lion or Mountain Lion -  https://discussions.apple.com/message/19401628 - including how to get Snow Leopard and Lion since Apple removed them from the online store. 
    It would help when posting issues here if you would state exact error messages you see.  "It's still not working!" while a description of the situation does not speed us to a diagnosis of the underlying issue.

  • My Keynote and iPhoto are not working together to build stacked photos

    I am new to the Mac world (1st day on the Mac) and I am trying to stack 3 photos on to one Keynote slide. I cannot get my photos in iPhoto to come up when I click on Media.
    What am I doing wrong?

    We need clarification here.
    Please don't just state version numbers, also state which software.  iTunes 10.7 requires OSX 10.6.8 or higher.  Leopard is OSX 10.5.8.  You have two alternatives right now.  One is to stay with Leopard for a while (ultimately you should upgrade) and install iTunes 10.6.3 which is the last version to work with Leopard.  This should work with iOS6 on an iPhone4.  The other is to call Apple and order OSX 10.6 (Snow Leopard) and upgrade the computer to 10.6.8 which will allow you to run iTunes 10.7.  The caveat is we know nothing about which computer you run and if it even can run any system higher than Leopard.
    Here is iTunes 10.6.3
    iTunes 10.6.3 - http://support.apple.com/kb/DL1575
    If you want to try upgrading:
    Get more information about your computer. Go to the Apple in the upper left corner of any window, then "About this Mac" and "More Info..."  Copy and paste the information here, but omit the serial number and Hardware UUID (if present).  If it says something about Intel or Core Duo or Core 2 Duo in the processor you can upgrade to Snow Leopard (assuming you have sufficient RAM/"memory").  If it says PPC or PowerMac, you cannot.
    Kappy 08/2012 post on upgrading to Snow Leopard, then Lion or Mountain Lion -  https://discussions.apple.com/message/19401628 - including how to get Snow Leopard and Lion since Apple removed them from the online store. 
    It would help when posting issues here if you would state exact error messages you see.  "It's still not working!" while a description of the situation does not speed us to a diagnosis of the underlying issue.

  • Bluetooth Mouse and Thinkpad T520 not working together at all

    Hi All (first post),
    System:
    Lenovo T520
    Windows 7
    Microsoft Bluetooth mouse
    Problem: Not working at all, or working only sporadically.
    History: Laptop is a bit over year old (warranty ends in June 2015 IIRC). The sales clerk recommended a bluetooth mouse, so I bought a Microsoft Bluetooth 5000. After the initial pairing difficulties were resolved, they worked swimmingly for about a year. Then I started more and more frequently having to re-pair them (remove device, let Windows find it again, pair them,...). As the mouse had taken a bit of beating, I bought another one a week ago. Didn't really help. The first time I asked Win7 to find the device, it couldn't. The Bluetooth radio was on, and the mouse had a fresh set of batteries, and all the other braindead suggestions of Win7 were eliminated. The bluetooth radio was working, because it detected the neighbors daughter's smartphone through a concrete wall, but not the mouse. I kept pressing the button in the bottom of the mouse that presumably makes it broadcast "I'm here".
    I moved to another room. This time detection and pairing up the device went fine. But after I had switched the laptop and the mouse off, and rebooted - nothing happened. I had to go through the remove/add device cycle again. Moving to a different room again. At first nothing. Then Windows finds the device, but gives the error code 0x800070015 (or something like that, not sure about the number of zeros), and fails to configure it.
    Any idea what is going on? Why is this becoming progressively worse?
    Elsewhere in this forum it was suggested that I should disallow windows to power off USB root hubs. I tried that but it had no effect.
    Regards,
    Jyrki

    Sorry. The error code was 0x80004005. This is the code I get from Add Device ->, when I try to enter 0000 as the paring code (suggested by the mouse start guide. If I try to pari them without a code, Control Panel first indicates that the piece of Hardware was added ok, but it before I get any use out of the mouse, the freshly added pic of the mouse disappears. The red/green light on the mouse never stops blinking.

  • Is there any way to get around the issue of AE7 and Lion OS not working together?

    I use AE7 for graduate studies and business and just can't understand why it won't work together.

    Why?  Because Adobe has other priorities, in simplest terms.  As with most commercial software producers, Adobe is looking to maximize their profits while their software developers are constrained to operate and optimize within their available development budgets, and also while delivering the corporate plans and schedules set by Adobe management.
    What to do for this case?  Migrate off of the Adobe software, migrate off of Mac OS X, deploy a virtual machine or Boot Camp (with Snow Leopard) and Adobe After Effects, or wait for Adobe to sort this out.  For sufficiently large-scale customers of Adobe, they can chat directly with Adobe management around whether a bounty will expedite the work.  (These are the usual answers, of course.)

  • Microsoft word 2013 function home and end keys not working together on HP Envy X2

    Please help I've tried out Microsoft Office Word 2013 on two HP Envy X2 11.6" laptops/touch screen with keyboard and when I am in a Word document and am at the end or beginning of a document and select the FUNCTION KEY AND THE HOME OR END KEY, it does nothing. This is not the case in Internet Explorer or a web browser.  There is a problem with the HP keyboard and Office 2013 or maybe any Word app. Help me as I use documents alot and rely on this function heavily.  I can only page up or scroll up using the bar. It is not ideal.
    Astaastra

    Hi rosedoc12,
    I have done some research and I have found a document that will show you how to disable or lock the fn key.
    http://h10025.www1.hp.com/ewfrf/wc/document?cc=us&​lc=en&docname=c02035108
    Thank you,
    Please click “Accept as Solution ” if you feel my post solved your issue.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Thank you,
    BHK6
    I work on behalf of HP

  • IPod Touch and iTunes Will Not Work Together.

    I just received a new iPod Touch 32GB yesterday and have had nothing but troubles trying to get it to play nicely with iTunes. The Touch is currently version 1.1.5/4B1 (I believe updated to this sometime yesterday).
    I am running iTunes v. 7.7.1 (11). When I connect the Touch to my iMac with iTunes running (even though I have it checked, just plugging the Touch in does not open iTunes) nothing happens for a long time and then I get a spinning beach ball which I have let go on for more than 20 minutes at one time.
    The Touch and iTunes work fine independently. The last two times after force quitting iTunes, I have received the following error: iTunes could not connect to the iPhone (??) "" because an unknown error occurred (OxE8000035).
    Does anyone know what this error is, & how do I resolve these issues?
    <Edited by Moderator>

    At least atm -
    I have re-installed iTunes after restarting the iMac and then restarted again, the Touch connected and showed right away after that and I am happily, currently syncing.
    If it goes bottoms up again, I'll be back!

  • Focusrite Sapphire and Core Audio not working together in Logic 8

    Hello all.
    We're having some trouble with our Logic 8 at work.
    Today we connected a Bose home speaker system to our Mac Pro via USB.
    Once removed and back to our usual output of the Focusrite Sapphire, core audio is malfunctioning within Logic, and the software crashes at the initialising stage.
    To offer details;
    · We normally run our audio through the Focusrite Sapphire
    · Today (the first and last time) we ran the audio through a Bose home system
    · We can run system sound though the Sapphire no problem
    · Core audio works fine in Logic when the Sapphire is disconnected from the Mac
    · The system is an 8 core Mac Pro running Leopard. The software is Logic Studio 8
    · Additional software running is Spectrasonics' Omnisphere and East West's Play
    We tried to view the crash report in Console, alas that is crashing upon start up too.
    Any help would be most appreciated, we're scratching heads and beards.
    I've searched the forum for the past year to see if there has been an identical issue.
    Lou.

    Ahh OK, ( I'm presuming you're using the normal Saffire, not the LE or the pro? )
    go here:
    http://www.focusrite.com/support/software/saffire/
    Download the latest software and install, also within that file there will a firmware updater, run that too.
    Let me know the results.

  • Google Calendar maps and iPhone maps not working together anymore

    For several months I was accessing google calendar through Safari. I was able to click on the map link and it would take me to the iPhone maps. About a week ago it started to take me to Google mobile map page, which is not integrated into anything on the iPhone maps such as that GPS thingy which is kind of useful. Anyone have any thoughts on how I can get this to go back?
    I did the upgrade to 2.2 already and no changes.

    I agree. I posted about this about a month ago and the only answer I got was that perhaps it was the way which google was choosing to handle the functionality. I think the feature where you can click on an address in your Google Calendar (and it should work on your Iphone Calendar as well), and it comes up in the Iphone Maps application, is completely necessary, as the map in safari is basically worthless. I had previously bragged about this feature, and now it's gone?! BRING IT BACK!

  • InDesign CS5.5 - locked objects and align tools not working together

    In earlier versions of InDesign I used the Align palette, spacing 0 mm, and "dragged in" other objects to perfect fit to the center object. InDesign drags in objects from the right this way. So if I needed to drag in objects from the left side I locked the center object first and InDesign understood what I wanted to do.
    In CS5 and 5.5 this is not possible anymore. If I lock an object it is not selectable. But there is a preference setting for this so I change it. Now I can select the locked object. But when I try to align it with another object there is an error message saying I can't move this object because it i locked. Well... I am not trying to move it hence the lock I applied...
    I don't understand this changed behaviour. If a locked object is out of play I might as well use the layer palette and lock objects that way.
    Could someone please shed some light on this?

    Apparently the distribute spacing command only uses the top object as a reference. I would say that's a bug.

  • WPA security with both time capsule and airport express not working together

    I want to set WPA security on my time capsule so that my teenager can not access wireless with out permission but when I add a security key my airport express disappears from list.
    I have tried setting a password then the time capsule restarts and when it does the aiport express is gone from list and can not be found when rescanned.
    Do I need to set time capsule and then reset airport express by pluggin it directly into desktop and resetting its software?
    Thanks

    I would suggest, reconnecting the Express to the TC again. Use the AirPort Utility to make ALL configuration changes including the network extending settings. Then restart both base stations and check that the settings are still good. Then disconnect the Express and give it a few minutes to initialize. It should connect. If not, then the issue may be either the distance or obstructions (like walls, ceilings, floors, etc.) that is preventing the Express from getting a signal from the TC that is adequate enough to extend.

  • Airport Express and Extreme are not working together

    My new airport extreme came up just fine. All my Macs and PCs connected effortlessly.
    The same can not be said for my Airport Express. I reset it, and it takes the config, then vanishes. Connected directly to my Mac, to the Airport Express, or via wireless to the express, it still just disappears and gives a blinking amber light.
    I tried re-installing 6.3 firmware, with no luck. Any ideas?

    Dan,
    Thanks for the clarification. The behavior you're encountering sounds as if it may be the expected behavior of an Airport Express after it has been set to client mode, but wasn't able to join the network. Typically when setting up an Airport Express you'd want the unit to be in the same room as the Extreme, and then if the Airport LED is not going green then it's typically an authentication association relates situation. Have you reviewed knowledge base article http://docs.info.apple.com/article.html?artnum=302153 ?
    Regards,
    Chris

  • IPhoto and Front Row not working together

    I've been having this problem since I got my mac just a few months ago, I figured I was doing something wrong and didn't want to worry about it. Well today I figured I would try again and see why when I go into Front Row it says that I don't have any pictures in my iPhoto libary... in reality my iPhoto is full of pictures. Am I doing something wrong or what?
    Thank you.

    Hello,
    I have exactly the same problem. A full and well organized iPhoto but Front Row does not find a photo because I have none in my archive.
    Is there an opinion to "reset" Front Row? Or does anyone have a solution for that problem?
    Tanks a lot.
    Benni
    Macbook Pro   Mac OS X (10.4.10)  

  • Java NetBeans and Firefox will not work together

    I'm just beginnig to learn Java an have installed jdk 1.6.0 and NetBeans IDE 5.5.
    In NetBeans I have the possibility to chose Firefox as a tool to read docs (over the internet).
    But when I try to set it up with the following parameters:
    /usr/bin/mozilla-firefox -remote "openURL({URL})"I get the following error:
    Cannot execute /usr/bin/mozilla-firefox.
    Check that valid external browser property is set.
    From Tools menu choose Options.
    Click Advance Options button, expand External Tool and Settings node,
    then expand Web Browsers and choose valid browser.The only thing I can imagine is there will be something wrong with the command but I can't figure out whats wrong.
    The Firefox shell-script is located an named as above (/usr/bin/mozilla-firefox)
    and when I click at it in konqueror i start nicely.
    So ...??

    Hello everyone... unfortunately i have a similar issue. I have a fresh load of openSuSE 10.2 on a Dell Laptop. It is (intended to be) my main Java/AJAX development box, and I cannot get NetBeans to launch Firefox. A detailed account of my symptoms is below:
    OS Config:
    openSuSE 10.2
    Firefox 2.0 (openSuSE pre-packaged version)
    IDE Config:
    configuration:
    A) Browser set to Firefox (/usr/bin/firefox), arguments: -remote "openURL({URL})"
    B) No browser windows open
    1. Try to launch project (or click on a link in the Welcome page to go to NetBeans.org) and nothing happens. Status bar says "Running command /usr/bin/firefox" but nothing happens.
    2. Run command /usr/bin/firefox -remote "openURL(http://www.google.com)" from a terminal get message "no running window found"
    configuration:
    A) Browser set to Firefox (/usr/bin/firefox), arguments: -remote "openURL({URL})"
    B) At least 1 browser window open
    1. Try to launch project (or click on a link in the Welcome page to go to NetBeans.org) and nothing happens. Status bar says "Running command /usr/bin/firefox" but nothing happens.
    2. Run command /usr/bin/firefox -remote "openURL(http://www.google.com)" from a terminal and new browser opens with google.com
    configuration
    A) Browser set to Firefox (usr/lib/firefox), arguments: URLB) No browser window open.
    1. Launch project or click on link on welcome screen and Firefox launches with correct URL. However, upon closing firefox, I get the error from Netbeans stating that it could not run command /usr/bin/firefox (although everything ran fine)
    2. run command /usr/bin/firefox http://www.google.com from the terminal and it launches firefox to google, but blocks (keeps focus away from the terminal window) until you close firefox and you are given back control of the terminal.
    configuration
    A) Browser set to Konqueror, arguments : {URL}
    B) No browser window open
    1. Launch a project or click on any of the links, and everything runs like a champ, no fuss from NetBeans.
    This didn't happen on my SuSE Linux Enterprise Desktop 10.0 install a few weeks back. That, however, came with Firefox 1.5.x and I dont recall if I updated it to 2.0. At any rate, it seems to be something with the way the -remote command is executed. Does anyone have any more ideas? I want to use this machine for my Java/AJAX and really don't want to have to default to Konqueror.
    Thanks in advance!
    ~v
    Message was edited by:
    vyrt1go

  • Generics and Auto-boxing not working together

    Why does the following code produce a compile error:
    "Type mismatch: cannot convert from char to Character."
    public class X<Character> {
         private Character c;
         private Integer i;
         public X() {
              c = 'a';
              i = 12;
    }Note that if I change the class declaration to class X<Integer>, I'll get the error about converting from int to Integer, but the char error will disappear.

    I believe that the <Character> type parameter is hiding the java.lang.Character class. Your code is equivalent to this:
    public class X<T> {
         private T c;
         private Integer i;
         public X() {
              c = 'a';
              i = 12;
    }So what you really want is something like
    public class X<T> {
         private Character c;
         private Integer i;
         public X() {
              c = 'a';
              i = 12;
    }or maybe this, depending on what you're really trying to do
    public class X<T extends Character> {
         private T c;
         private Integer i;
         public X() {
              c = 'a';
              i = 12;
    }Of course, since Character is final, that doesn't really make sense either.
    Perhaps you could explain a bit more about what you're actually trying to accomplish.
    Edited by: jverd on Feb 26, 2010 11:24 AM
    Edited by: jverd on Feb 26, 2010 11:25 AM

Maybe you are looking for