Oracle resultset.last() will cost long time while the resultset is large

we want to get the count of returned resultset rows through used last() & getRowNum() of oracle resultset . But this way the oracle driver will cache all rows in memory of our local machine and cost long time . we thought the resultset maybe cost many time on network.
can i set any preferences,make rs.last don't transfer by network and the last() method only work in DB server.
how to solve the problem.
thanks so much~!

No. The way Oracle cursors work, the only way to find out how many rows are in a ResultSet is to fetch each row. Since cursors are read-only structures, the driver has to cache the result if it is going to allow you to retrieve the data without re-executing the query. Increasing your fetch size may decrease the amount of time required to fetch all the rows, but you'll still have to go through all that effort.
One alternative would be to add a COUNT(*) (or more generically COUNT(*) OVER ()) to the query and use that value (which will be repeated for every row in the result) to determine how many rows are being returned.
Justin

Similar Messages

  • Dear all, I have a MacBook Pro bought in April 2011. Last April, it got stuck while the wheel was spinning and I had to force it shut. That cost me my hard drive. Now, it's stuck again. I tried esc, cmd tab, moving the trackpad on the apple, but no. HELP!

    Dear all, I have a MacBook Pro bought in April 2011. Last April, it got stuck while the wheel was spinning and I had to force it shut. That cost me my hard drive. Now, it's stuck again. I tried esc, cmd+tab, moving the trackpad on the apple, but no. HELP!

    Dear John,
    thank you for your prompt reply. After I sent the email, I left the wheel spinning to see if it would eventually stop. It didn't, but after a while the screen turned blue, so I decided to switch everything off with a forced shut-down. I could not restart with the OS DVDs because I am currently away from home, but fortunately everything was more or less fine after restarting. It then got stuck again, I forced it shut again, restarted again, and now it seem to work but I won't overdo it and will switch off smoothly after writing this (unless it gets stuck again). Last April I have replaced the HD, so it's now just under 6 months old. And, of course, since the crash occurred when I was abroad and had backed up just before I left, I have lost only a few days' work. Still, and I know this will make me hugely unpopular here, with my 5 previous laptops running on MS Windows I never had a problem. Which does not mean I loved the OS, or I would not have switched to Mac.
    Anyway, and this is the main reason for this message, thank you very much again for your speedy intervention.
    Claudia

  • Oracle grid infrastructure installation take long time on step 15 (perform prerequisite checks )

    Oracle grid infrastructure installation take long time on step 15 (perform prerequisite checks ) 
    I'm starting install and configure Oracle RAC 11gR2 on redhat 6.3 , when i reached step 15 (perform prerequisite checks ) it's taking long time more than 10 hours and still checking .... i closed it and start installation again it's same still waiting in perform prerequisite checks 75% complete
    it is normal ?? what should i do ?? how i can monitoring installation steps and why this step take all this time please help .

    Pl identify which exact version of 11gR2 - currently only 11.2.0.3 is certified/supported on Linux 6.x - Oracle® Database - if you are using 11.2.0.1 or 11.2.0.2, then you will need to use Linux 5.x
    HTH
    Srini

  • My ipad will no longer connect to the laptop. it comes up with usb not recognized. also when trying to connect to the power the first time i connect, nothing, but when i unplug from ipad and plug in a second time it charges

    my ipad will no longer connect to the laptop. it comes up with usb not recognized. also when trying to connect to the power the first time i connect, nothing, but when i unplug from ipad and plug in a second time it charges

    yeah tried all that. the only thing that i havent tried is to delete itunes completely and restart. its the same with the ipad. i havent done a master reset. i just think it has to be something rather simple as it acknowledges that i have plugged in the ipad as it makes the noise it just come up usb not recognized. it shows up as an unknown device that doestn have  any drivers
    its driving me round the bend at the minute

  • During last weeks, when I connect my macbook it stays long time with the color wheel turning around. Finally I have to hard-reset. Any clue?

    during last weeks, from time to time, when I connect my macbook it stays long time with the color wheel turning around. Finally I have to hard-reset. Any clue?
    It's Mac OS X 10.7.3

    It's Mac OS X 10.7.3
    The startup disk may need repairing.
    Use Lion Recovery for that.

  • My iPhone will no longer pick-up the wifi at home(comcast). My mom used to have comcast and I used to connect there as well, but she changed to verison and I connect there, but no longer can get the comcast wi-fi at home.  the wi-fi settings are ok there,

    My iPhone will no longer picks-up the wifi at home(comcast). My mom used to have comcast and I used to connect there as well, but she changed to verison and I connect there, but no longer can get the comcast wi-fi at home.  The wi-fi settings are ok there, but blank at home now.  The phone's network settings are fine because I can join other wifi networks.  I've done a reset with no results.  Is there a manual way for me to restore the comcast wifi from the router?

    First thanks for the reply and second sorry about the confusion.  I was unable to get the full message out, but here's the problem:
    Like I had mentioned, for a long time both me and my Mom had comcast and as soon as I came into both dwellings the phone would automatically jump onto either wifi network.  Then a while ago she verison and used the same Belkin router.  So there was no problem and my phone jumped on her system as usual, but at some point something happened and when I got home I noticed that the phone asked to be put on my system.  I would input the password, but it would say "unable to connect" to the network.  I did the standard things like check the network settings on the phone itself and they were fine.  Then I did a reset (actually twice) with the same result.  It seems like the phone ability to pick-up wi-fi is ok because when I go to my University I can log-in with no problem.  The only thing I noticed is when I look at the settings (on the iPhone) for the router at home the whole thing is blank.  My question is: Is there a manual way to get the phone to pick-up my router?  I need to have it on my network at home because I use DocumentsToGo a lot.  Thanks again for your response again and I hope things are clear now.  Have a great day.
    Michael

  • Will no longer connect to the internet

    All of a sudden Adobe Digital editions will no longer connect to the internet.  It was fine before last Tuesday. Check internet settings and firewall and nothing helps. Why is it doing this and how can we fix it.  Windows 7 - 64 bit

    Did this [[Cannot connect after upgrading Firefox|start after upgrading firefox?]]
    Generally if Firefox can't connect, but other applications can, it's a configuration problem with a [[Firewalls|software firewall]], either one you installed yourself, one that was included with other security software, or the built-in Windows Firewall.

  • I have a very old (by computer standards) MacBook Pro, and a newer one.  I've been using the old one mostly for iTunes, into which I have only CD entries.  For a long time, years, the old MacBook pro ceased entering the song titles.  This is very time con

    I have a very old (by computer standards) MacBook Pro, and a newer one.  I've been using the old one mostly for iTunes, into which I have only CD entries.  For a long time, years, the old MacBook pro ceased entering the song titles.  This is very time consuming for me, so I finally investigated a bit further.
    I discovered how to enter the track titles onto my newer MacBook Pro, and was so pleased!  But when I tried to do the same with the other laptop, it failed. 
    What I did, basically, was what the Apple Help suggested--choose iTunes General Preferences, etc.etc.  And yes, I did upgrade the old laptop to the newest iTunes version.
    Am I just wasting my time here? Is there some reason why an older Mac Pro will not do what the newer one will, with regard to iTunes?
    My older laptop is a 2.6 GHz Core Duo; it has 36 GB of "memory available."  The newer one  a 2.3 GHz Intel Core i7. It has 284 GB of memory available.
    Both are using the same version of Snow Leopard--10.6.8.

    I have a very old (by computer standards) MacBook Pro, and a newer one.  I've been using the old one mostly for iTunes, into which I have only CD entries.  For a long time, years, the old MacBook pro ceased entering the song titles.  This is very time consuming for me, so I finally investigated a bit further.
    I discovered how to enter the track titles onto my newer MacBook Pro, and was so pleased!  But when I tried to do the same with the other laptop, it failed. 
    What I did, basically, was what the Apple Help suggested--choose iTunes General Preferences, etc.etc.  And yes, I did upgrade the old laptop to the newest iTunes version.
    Am I just wasting my time here? Is there some reason why an older Mac Pro will not do what the newer one will, with regard to iTunes?
    My older laptop is a 2.6 GHz Core Duo; it has 36 GB of "memory available."  The newer one  a 2.3 GHz Intel Core i7. It has 284 GB of memory available.
    Both are using the same version of Snow Leopard--10.6.8.

  • I am trying to do a full Time Machine Backup to a new external disk. The backup starts, and it says "Time remaining about 4 days." That seems like a very long time, but the real problem is that the computer "logs off" after a few hours, and the b.u. stops

    I am trying to do a full Time Machine Backup to a new external disk. The backup starts, and it says "Time remaining about 4 days." That seems like a very long time, but the real problem is that the computer "logs off" after a few hours, and the backup stops. The system preferences are set to "Never" for Computer sleep and Display sleep. The computer does not ordinarily log off automatically, but it has done this twice since I started the Time Machine backup.

    If you have more than one user account, these instructions must be carried out as an administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Enter the word "Starting" (without the quotes) in the String Matching text field. You should now see log messages with the words "Starting * backup," where * represents any of the words "automatic," "manual," or "standard." Note the timestamp of the last such message. Clear the text field and scroll back in the log to that time. Select the messages timestamped from then until the end of the backup, or the end of the log if that's not clear. Copy them (command-C) to the Clipboard. Paste (command-V) into a reply to this message.
    If all you see are messages that contain the word "Starting," you didn't clear the search box.
    If there are runs of repeated messages, post only one example of each. Don't post many repetitions of the same message.
    When posting a log extract, be selective. Don't post more than is requested.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Some personal information, such as the names of your files, may be included — anonymize before posting.

  • After purchasing songs at the itunes store, ipod touch will no longer synch with the itunes library at all. Also a lock symbol is now on the ipod touch. How do I fix this

    After purchasing songs at the itunes store,  my ipod touch will no longer synch with the itunes library at all. It won't send the purchases to the device and it won't synch any other music to the device. Also a lock symbol is now displayed at the top of the ipod touch. How do I fix this.
    This was the first purchase I made.

    Are you following these instructions?
    iTunes: Syncing media content to iOS devices and iPod
    Where is the lock icon on the screen?

  • After downloading Yosemite, my HP Photosmart D110 printer will no longer work. The wireless connection is fine but says it cannot find my printer when trying to print.

    After downloading Yosemite my printer, a HP Photosmart D100 will no longer print. The wireless connection is fine, and a test page printed perfectly directly from my printer. When trying to print from my computer, it says it cannot connect or find the printer. I tried downloading the most updated software from HP website but it doesn't appear to be helping.

    Try resetting the printing system.
    OS X Mavericks: Reset the printing system
    If you have the printers IP address open Terminal (applications/Utilities) and at the prompt type: ping {printerIP}. You will get a reply or failure.
    Network Printer Troubleshooting
    HP – Wireless Printing Center
    HP – Printer Not Found During Wireless Installation

  • HT201210 Itunes will no longer open with the error message MSVCR80.dII is missing from the computer, and I'm advised to reinstall itunes but that hasn't worked.  What else can I try?

    Itunes will no longer open with the error message MSVCR80.dII is missing from the computer, and I'm advised to reinstall itunes but that hasn't worked.  What else can I try?
    Thanks for your help
    Pippa

    Click here and follow the instructions.
    (98708)

  • My Mac Book Pro suddenly will no longer connect to the Internet at my house. Help?

    My Mac Book Pro suddenly will no longer connect to the Internet at my house. My son's MacBook connects just fine. My MacPro connects at work, at Starbucks, etc. just fine, but not at my house. My son's however has no problem whatsoever. I assume that since his computer connects that the router and modem is not the problem. And since my computer connects everywhere but here . . . . it is not a hardware issue. When directly connecting my MacBook Pro to the modem or router the problem was the same. . . no connection. Help?

    From the menu bar, select
               ▹ About This Mac
    Below the "OS X" legend in the window that opens, the OS version appears. Click the version line twice to display the serial number. If the number is missing or invalid according to this web form, take the machine to an Apple Store or other authorized service center to have the problem corrected.

  • My ipad will no longer connect to the internet. Everything else does.

    My ipad 1 will no longer connect to the internet. Everything else does. and nothing new was done to the ipad. It's running ios 4 and was fine since the day it came out.

    Emma-
    In Safari, press on the Bookmarks icon and select History.  Then press on Clear History at the top of that menu, and see it there is any improvement.
    If not, try unplugging your WiFi router for a few seconds.  Then reset the iPad's network.  Go to Settings-General-Reset-Reset Network Settings.  You will need to reconnect the iPad to WiFi.
    Fred

  • Since updating my ipad it will no longer connect to the internet

    since i've updated my software on my ipad it will no longer connect to the internet. my husbands iphone will not connect either. my laptop connects immediately and my internet signal is full strength. is there something we are missing?

    Hello dchoffa,
    Thank you for using Apple Support Communities!
    I would start with this troubleshooting from the article named:
    iOS: Troubleshooting Wi-Fi networks and connections
    http://support.apple.com/kb/TS1398
    Be sure you're in range of your Wi-Fi router (access point).
    Tap Settings > Wi-Fi and turn Wi-Fi off and on. If your W-Fi setting is dimmed, follow these steps.
    Confirm that your Wi-Fi router and cable or DSL modem are connected to power, turned on, and connected to the Internet. If not, refer to your network administrator or Internet service provider (ISP) for assistance.
    Restart your iOS device.
    Tap Settings > Wi-Fi and locate the Wi-Fi network to which you're connected.
    Tap and Forget this Network.
    Try to connect to your desired Wi-Fi network.
    Note: You may need to enter your Wi-Fi password again if your network requires one.
    Turn your Wi-Fi router off and on2. If your ISP also provides cable or phone service, check with them before attempting this step to avoid interruption of service.
    Update your device to the latest version of software.
    Update your Wi-Fi router to the latest firmware2. For AirPort Base Stations, install updates using the AirPort Utility.
    If the above troubleshooting does not resolve the issue, I would next try the troubleshooting in one of the other sections down toward the bottom that fits your scenario.
    Regards,
    Sterling

Maybe you are looking for