Query is immediate in sqlplus but doesn't finish in Apex

OK, so i wrote this fairly simple 4 table query for a report. This query when run from SQL Developer or directly in SQL Plus runs and completes in less than a second.
I create an APEX application that would run this same query and the report never completes. The APEX page never actually displays.
I know that's not a lot of information...i can provide it if necessary. Here is the explain plan of the query from autotrace:
15:50:46 >;
  1  select c.customer||' '||c.name, so.opportunity_name,  ui.name, so.estimated_project_value, so.resolution_date, smn.note
  2  from s.sales_opportunity so, s.sales_mgmt_notes smn, s.user_initials ui, s.customer c
  3  where smn.sales_mgmt_note_key = so.resolution_sales_mgmt_note_key
  4  and so.resolution_date > sysdate - 365
  5  and ui.key = so.owner_user_initials_key
  6  and so.resolution = 'L'
  7* and so.customer_key = c.key
15:50:48 >set autotrace traceonly explain statistics
15:50:59 >/
369 rows selected.
Execution Plan
Plan hash value: 3997948256
| Id  | Operation               | Name                  | Rows  | Bytes | Cost (%CPU)| Time        |
|   0 | SELECT STATEMENT          |                  |     91 | 32032 |   815   (2)| 00:00:10 |
|   1 |  NESTED LOOPS               |                  |        |        |          |        |
|   2 |   NESTED LOOPS               |                  |     91 | 32032 |   815   (2)| 00:00:10 |
|   3 |    NESTED LOOPS           |                  |     90 |  9360 |   541   (2)| 00:00:07 |
|   4 |     NESTED LOOPS          |                  |     90 |  6390 |   450   (2)| 00:00:06 |
|*  5 |      TABLE ACCESS BY INDEX ROWID| SALES_OPPORTUNITY        |     90 |  4770 |   359   (2)| 00:00:05 |
|*  6 |       INDEX RANGE SCAN          | IOPPORTUNITY_RESOLVEDATE |   393 |        |      3   (0)| 00:00:01 |
|   7 |      TABLE ACCESS BY INDEX ROWID| USER_INITIALS         |      1 |     18 |      1   (0)| 00:00:01 |
|*  8 |       INDEX UNIQUE SCAN      | UI_PK              |      1 |        |      0   (0)| 00:00:01 |
|   9 |     TABLE ACCESS BY INDEX ROWID | CUSTOMER             |      1 |     33 |      1   (0)| 00:00:01 |
|* 10 |      INDEX UNIQUE SCAN          | CUST_PK             |      1 |        |      0   (0)| 00:00:01 |
|* 11 |    INDEX RANGE SCAN          | ISMN_NOTE_KEY         |      1 |        |      2   (0)| 00:00:01 |
|  12 |   TABLE ACCESS BY INDEX ROWID     | SALES_MGMT_NOTES        |      1 |   248 |      3   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   5 - filter("SO"."RESOLUTION_SALES_MGMT_NOTE_KEY" IS NOT NULL AND "SO"."RESOLUTION"='L' AND
           "SO"."OWNER_USER_INITIALS_KEY" IS NOT NULL)
   6 - access("SO"."RESOLUTION_DATE">SYSDATE@!-365)
   8 - access("UI"."KEY"="SO"."OWNER_USER_INITIALS_KEY")
  10 - access("SO"."CUSTOMER_KEY"="C"."KEY")
  11 - access("SMN"."SALES_MGMT_NOTE_KEY"="SO"."RESOLUTION_SALES_MGMT_NOTE_KEY")
Statistics
       1  recursive calls
       0  db block gets
       2810  consistent gets
       0  physical reads
       0  redo size
      73724  bytes sent via SQL*Net to client
     784  bytes received via SQL*Net from client
      26  SQL*Net roundtrips to/from client
       0  sorts (memory)
       0  sorts (disk)
     369  rows processedEdited by: ChrisLHT on Mar 30, 2012 12:46 PM
Edited by: ChrisLHT on Mar 30, 2012 12:56 PM

So you have no item references in the Apex query predicate - right? I had a similar issue that I never really traced the cause of, but adding ALL_ROWS hint resolved my particular query. See if using SELECT /*+ ALL_ROWS */ and SELECT /*+ FIRST_ROWS */ from SQLplus can reproduce the issue.

Similar Messages

  • SQL query works in the SQLPlus, but fires parse error after being cut and pasted into

    One of our client has a SQL query like this:
    SQL> SELECT LNAME,
    2 QUOTA/12,
    3 (SELECT SUM(CAMT) FROM CONSULTING WHERE CONSULTANT = P.EMPLOYEE
    4 AND ACTIVITYCODE = 'C'AND
    5 CDATE BETWEEN '01-JAN-2001' AND '31-JAN-2001') AS SUM,
    6 (SELECT SUM(CAMT) FROM CONSULTING WHERE CONSULTANT = P.EMPLOYEE
    7 AND ACTIVITYCODE = 'C'AND
    8 CDATE BETWEEN '01-JAN-2001' AND '31-JAN-2001') -
    QUOTA/12 AS PL
    9 FROM PERSONNEL P
    10 ORDER BY LNAME;
    Running the above query in the SQLPlus returns appropriate resultsets to the
    user. After the same SQL being cut and pasted into a portal report
    component, running the report component fires the following error:
    Failed to parse query
    Error:ORA-00911: invalid character (WWV-11230)
    Failed to parse as XXX - SELECT LNAME, QUOTA/12, (SELECT SUM(CAMT) FROM
    CONSULTING WHERE CONSULTANT = P.EMPLOYEE AND ACTIVITYCODE = 'C'AND CDATE
    BETWEEN '01-JAN-2001' AND '31-JAN-2001') AS SUM, (SELECT SUM(CAMT) FROM
    CONSULTING WHERE CONSULTANT = P.EMPLOYEE AND ACTIVITYCODE = 'C'AND CDATE
    BETWEEN '01-JAN-2001' AND '31-JAN-2001') - QUOTA/12 AS PL FROM PERSONNEL P
    ORDER BY LNAME; (WWV-08300)
    Cursor is not open
    Is this because of the multi-table queries, or something else? Is there any
    way around this? Any information regarding this will be highly appreciated.
    Thanks.
    null

    Sunny,
    From the error message that you posted it seems that you are putting a semicolon ";" at the end of your query. I checked the query that you have posted. It is working fine for me. (I am using 3.0.8) but I feel it will work in your version also. I tried the query without a ";" at the end --It worked.
    I tried with ";" at the end -- It gave the error that you have posted. So remove the ";" at the end and it should work. If you are still getting the same error then pls write down the version you are using. I will check in that version.
    Thanx,
    Chetan.

  • Installer starts up-but doesn't finish

    Windows 8.1 64 bit 3770K 16 GB of ram.
    I was trying to reinstall Dreamweaver once again. However, something is very strange. I backed up all of my applications to an external hard drive because I hate CDs.
    However, something is very strange. The installation program initializes-I get the little rectangle and the bar goes to the right saying installation is starting up. The bar goes to the very end-normally that would formally start the install process, but then the program just quits. It doesn't even allow me to start to install the program. I used a registry cleaner to see if that would fix it. It did not. I am not having trouble installing applications from any other source-just Adobe. I also got the same error when I was trying to install an older version of Premiere elements just to see if it was Dreamweaver specific but it's not. Any idea what could be causing this and how I could fix it?

    It is not easy to say what is wrong there. If possible try to backup all important data and install OS using delivered recovery media. I just hope there is no some problem with HDD.

  • C310 install runs but doesn't finish on Dell Inspiron w/ Windows 7, 64-bit

    Whether I run the installation off the disk or a downloaded file, it progresses almost all the way to the end and then just closes. No files get installed.
    The printer is installed on several other W7-64 bit PCs on this network. I tried the HNDU tool and it finds the printer, but says there are no drivers installed.

    Thanks, I was hopeful, but I'm still in the same boat. If I felt comfortable that PSE8 would work on 64bt W7, I'd upgrade, but maybe it is time to look elsewhere for an editing program.

  • XML sql query not displayed using SQLPLUS

    Have a registered schema and 1 xml document successfully inserted using Oracle 10.2.0.3.0
    I then run the following query:
    select extract(object_value,'/warehouse/warehousename')from xwarehouses;
    Expecting 1 record to be returned in SQLPLUS but get the following result:
    EXTRACT(OBJECT_VALUE,'/WAREHOUSE/WAREHOUSENAME')
    1 row selected.
    Can anyone shed any light?

    Thanks A-non.
    I checked the long and longchunksize settings and they are the same as yours.
    Your sample code runs perfectly but still my original problem remains.

  • Recently my phone updated itself to ios 7, it wont let me sign into my iphone app store to download apps,i click on an app i want it just clicks but doesn't start to download  any help?

    recently my phone updated to ios 7, it wont let me sign into my iphone app store to download apps,i click on an app i want and it just clicks but doesn't start to download, i can see thats its not signed in so i tried to re set up my account under the app store in settings , but its just a grey area and wont let me click to input any information. this happened right after i updated my phone, any help?

    Hi SarahHannah,
    If you are having trouble activating iMessage, this article contains relevant troubleshooting steps:
    iOS: Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/ts4268
    Take care,
    - Ari

  • My iPhone 5S won't show up in iTunes to sync. It charges still and it opens iPhoto, but doesn't even register in iTunes

    My iPhone 5S won't show up in iTunes to sync. It charges still and it opens iPhoto, but doesn't even register in iTunes. I have no idea what to do and nothing is working!
    And the other night while i was trying to sync my phone, it was working until "Error message (-50)" started coming up every time i tried to sync or update my phone's software through itunes on my computer. eventually, itunes quit and i unplugged my phone and updated it wirelessly. i have no idea why any of this is happenings. Itunes is still acting weird for me too.

    Error -50 is generally associated with firewalls or anti-virus software as described here:
    http://support.apple.com/kb/TS1583
    Separately, are you using iTunes 11.1.4?

  • My ipod charges, but doesn't sync to itunes

    My iPod charges, but doesn't sync with iTunes.

    This is the Mac OS X Technologies > iSync forum - you are a Windows user.
    iSync is a Mac-only application for syncing Contacts and Calendars to mobile phones and PDAs. It has nothing whatsoever to do with Windows, iPods or iTunes.
    Try posting in the iTunes for Windows forum.

  • HT5622 Hi, can you help me for my payment account? It's always show " Your payment method was declined..." How can I fix it? There's only 3 to choose fpr Visa, Master Card and Amex.. But doesn't have "None".. I can't download any apps from app store :(

    Hi, can you help me for my payment account? It's always show " Your payment method was declined..." How can I fix it? There's only 3 to choose fpr Visa, Master Card and Amex.. But doesn't have "None".. I can't download any apps from app store

    http://support.apple.com/kb/ht1918

  • Iphone 4s upgraded IOS from 5.1.1 to 6.1.1. WIFI it's unusable. Phone it's connected, but doesn't navigate.... or navigate like a SNAIL.

    HI, Sorry for my BAD english, I'm Italian. I have an Iphone 4s.. four day ago, I upgraded my IOS from 5.1.1 to 6.1.1 (thinking that 6.1.1 was mature). This is WORST decision I was made. WIFI it's unusable. iPhone it's connected, but doesn't navigate.... or navigate like a SNAIL.
    I'm a computer technician and cisco CCNP... after some speedy try, I was able to use WIFI with WEP and not with WPA....
    Best result was with an 802.11/B AP  with 128bit WEP (no problem at ALL).......  I think there is a problem IOS - WPA and 802.11G AP...
    I hope this can help some user...... for me it's absolutely USELESS info because all my customer uses different AP with different encription so I CAN'T use anymore my phone.... I switch to galaxy sIII until apple resolve this issue.
    I'm an apple fan since 1987 (MY MAC II)  and NEVER has problem or problem was immediately resolved but
    on last THREE year, apple was made some mistake.... using CUSTOMER as TESTER....
    After 20 year of apple, if all continue so. I MUST abandon APPLE.

    I know that only some iphone 4s are affected by this problem but....
    before write, please CONNECT BRAIN and verify your info...
    So .... My brain and my iPhone are working, Yours are not.
    for your reference, HALF internet (including APPLE support ) are FULL of post regarding this issue....
    Do you actually knows how big the Internet is? Do you also know how many iPhones is out there?
    Stop BS.
    I'm an iphone fan since FIRST MODEL (2007) and an APPLE fan since MACII..
    My post would be a temporary solution for who are affected by this issue, for use wifi until apple fix it..
    I don't care what you have used since bla bla that won't change the facts.
    you don't know my skill so.... be propositive instead of....
    You don't know mine either
    Message was edited by: ckuan

  • The wifi at my school isn't very good. And I can't send iMessages through it. It works for some apps like score center and my radar app, but doesn't work for other apps like clash of clans and iMessage. How can I get it to work on that  wifi network

    The wifi at my school isn't very good. And I can't send iMessages through it. It works for some apps like score center and my radar app, but doesn't work for other apps like clash of clans and iMessage. How can I get it to work on my school wifi. I have an iPhone 4S on AT&T and iOS 7.04

    In a roaming network, your "main" router is the device that would require port mapping/forwarding to be configured in order to access the IP camera from the Internet. This router is also the one that would be provide the private IP address for the camera which you will want to be a static one.
    So as you described your network, the IP cameras should be getting an IP address or you assigned it a static one and this is the address that you would enter in the Private IP address (or equivalent depending on the router used) field when setting up port mapping.
    If you are not able to access this camera from the local network, then this should be troubleshot first.

  • Iphoto icon bounces in the dock but doesn't open

    iphoto icon bounces in the dock but doesn't open

    Hi Terence, I hope you can help me too. I have a problem with opening iPhoto. It has always worked fine but now as soon as I click on the icon in the Dock or connect my camera I get the enclosed screen (see below). I have tried to re-install from iLife 11 Install Disk with no joy. I have moved my plist file to Trash. Any further suggestions please will be greatly appreciated.
    Many thanks,
    Brian
    Process:         iPhoto [240]
    Path:            /Applications/iPhoto.app/Contents/MacOS/iPhoto
    Identifier:      com.apple.iPhoto
    Version:         ??? (???)
    Build Info:      iPhotoProject-5270000~1
    Code Type:       X86 (Native)
    Parent Process:  launchd [90]
    Date/Time:       2012-03-27 13:00:05.482 +0100
    OS Version:      Mac OS X 10.6.8 (10K549)
    Report Version:  6
    Interval Since Last Report:          155049 sec
    Crashes Since Last Report:           6
    Per-App Crashes Since Last Report:   6
    Anonymous UUID:                      413183FB-E0A0-4D96-A97D-68916344CB13
    Exception Type:  EXC_BREAKPOINT (SIGTRAP)
    Exception Codes: 0x0000000000000002, 0x0000000000000000
    Crashed Thread:  0
    Dyld Error Message:
      Library not loaded: /Library/Frameworks/iLifePageLayout.framework/Versions/A/iLifePageLayout
      Referenced from: /Applications/iPhoto.app/Contents/MacOS/iPhoto
      Reason: image not found
    Binary Images:
    0x8fe00000 - 0x8fe4162b  dyld 132.1 (???) <39AC3185-E633-68AA-7CD6-1230E7F1CEF4> /usr/lib/dyld
    Model: MacBook2,1, BootROM MB21.00A5.B07, 2 processors, Intel Core 2 Duo, 2 GHz, 2 GB, SMC 1.13f3
    Graphics: Intel GMA 950, GMA 950, Built-In, spdisplays_integrated_vram
    Memory Module: global_name
    AirPort: AirPort Extreme, Atheros 5416: 2.1.14.6
    Bluetooth: Version 2.4.5f3, 2 service, 19 devices, 1 incoming serial ports
    Network Service: Built-in Ethernet, Ethernet, en0
    Network Service: AirPort, AirPort, en1
    Serial ATA Device: WDC WD3200BEVT-11ZCT0, 298.09 GB
    Parallel ATA Device: HL-DT-ST DVDRW GWA4080MA
    USB Device: Built-in iSight, 0x05ac  (Apple Inc.), 0x8501, 0xfd400000 / 3
    USB Device: USB2.0 Hub, 0x05e3  (Genesys Logic, Inc.), 0x0608, 0xfd100000 / 2
    USB Device: USB2.0 Hub, 0x05e3  (Genesys Logic, Inc.), 0x0608, 0xfd140000 / 5
    USB Device: USB Audio CODEC, 0x08bb  (Texas Instruments Japan), 0x2900, 0xfd142000 / 7
    USB Device: Hub, 0x05ac  (Apple Inc.), 0x9102, 0xfd141000 / 6
    USB Device: Hub, 0x05ac  (Apple Inc.), 0x9118, 0xfd141100 / 8
    USB Device: Studio Display, 0x05ac  (Apple Inc.), 0x9218, 0xfd141130 / 9
    USB Device: Desktop, 0x0bc2  (Seagate LLC), 0x3300, 0xfd110000 / 4
    USB Device: Apple Internal Keyboard / Trackpad, 0x05ac  (Apple Inc.), 0x021a, 0x1d200000 / 2
    USB Device: IR Receiver, 0x05ac  (Apple Inc.), 0x8240, 0x5d200000 / 2
    USB Device: Bluetooth USB Host Controller, 0x05ac  (Apple Inc.), 0x8205, 0x7d100000 / 2

  • Double clicking on a file launches the app but doesn't open the file anymore. Why?

    Double clicking on a file launches the app but doesn't open the file anymore. Why?

    I would post in the Illustrator forum here http://forums.adobe.com/community/illustrator or the Dreamweaver forum here http://forums.adobe.com/community/dreamweaver. One of these product forums will be able to help.

  • My Safari icon/app is missing. I How do i get it back? I try settings - general - restrictions - safari - off / on but doesn't work

    My Safari icon/app is missing. I How do i get it back? I try settings - general - restrictions - safari - off / on but doesn't work

    First, it might be you simply put Safari in a folder somewhere. Try searching for it using Spotlight. Drag down on the screen to display the Spotlight search bar and type "Safari". If you see Safari, it is still accessible on your iPad. If not, try the following.
    Reset your iPad by simultaneously pressing and holding the Home and Sleep/Wake buttons until you see the Apple Logo. This can take up to 15 seconds so be patient and don't release the buttons until the logo appears. Try again to see if the problem persists.
    Finally, if that doesn't help, try turning off restrictions, then turning them back on.

  • Just installed Final Cut Express 4 but doesn't open

    Hey I'm a dummy but....Just installed Final Cut Express 4 but doesn't open tells me I don't have the AGP graphics card,my ATI Radeon X1600?Do some imac 1.83 Intel Core Duo come with out it?I'm freek'n stuck!!Any help would be Greatly appreciated!!

    Al's suggestion should solve the problem.
    However, if you get fed up with hitting the esc key every time you open FCE you could try this permanent cure .......... it's nowhere near as frightening as it sounds and only takes a minute !
    For a permanent cure edit the info.plist like this:-
    1. Right click on the FCE icon (in Applications NOT the Dock) and select "Show Package Contents".
    2. Open the "Contents" folder and double click the "info .plist". It should open automatically in TextEdit - if it doesn't, choose TextEdit manually.
    3. Around 15 or so lines down you will see AGP. Delete it and put in PCI.
    4. Close the window and when asked if you want to save the changes, say yes.

Maybe you are looking for

  • Right way to jump between pages?

    I am in trouble to find the correct way to jump between pages,I have a page alluser.jsp, in which all usergroups and users are displayed,corresponding to every user's item,I place a link to delete this user,as below: <a href="removeuser.jsp?userName=

  • Crystal Report Runtime

    Dear Readers, First off, if I am writing this topic in the wrong forum, I appologize. Secondly,  I am out of ideas on how to troubleshoot my problem and have resorted to this community in hope that I could find a solution. Situation: We have a softwa

  • Get LUN ID and TARGET ID

    Given an entry in /dev/rmt, how do you programmatically get its LUN ID and target ID? It shows up in dmesg's output but I'm wondering if there's a call to uSCSI to get in. Under Linux, you can use ioctl(fd, SG_GET_SCSI_ID, &info) to get it. Thanks, Q

  • Block order by credit check

    Dear expert, I have a requirement like that: The first one, I re-export to customer and must create a sales order for re-export, how can I do? and where will I config to it? how can the system understand that this is sales order for re-export? The se

  • Swetypv behavior in older system

    SWE2 i think is the equivalent transaction for to SWETYPV in older system 4.5B In the SWETYPV we have an option where we can set Event Linkage: Behavior Upon Error in Receiver to do not change linkage. Do we have some thing we can do in the older sys