DBAsupport.com Forums - Powered by vBulletin
Page 4 of 4 FirstFirst ... 234
Results 31 to 33 of 33

Thread: Collection error!!

  1. #31
    Join Date
    Jun 2004
    Posts
    125
    Got it. Okay I ran bith with UNION and UNION ALL.

    With UNION:

    It ran the second query first, and then the first.
    Time it took: Elapsed: 00:00:14.94

    With UNION ALL:

    It ran the first query and then the second:
    Time it took: Elapsed: 00:00:14.06

    With my Select for the function
    Time it took: Elapsed: 00:00:14.50

    So, should I change my function to have UNION ALL, instead of using a cursor?

  2. #32
    Join Date
    May 2005
    Posts
    31
    So, should I change my function to have UNION ALL, instead of using a cursor?
    Follow Tom Kyte's Mantra http://asktom.oracle.com/pls/ask/f?p...:1205168148688 :

    o if you can do it in a single sql statement - do so.
    o if you cannot, do it in as little PLSQL as you can.
    o if you cannot, because plsql cannot do it, try some java (eg: sending an email
    with an attachment)
    o if you cannot do it in java (too slow, or you have some existing 3gl code
    already) do it in C as an extproc.
    Last edited by Bonker; 06-16-2005 at 11:32 AM.
    Experience is a hard teacher because she gives the test first, the lesson afterwards.

  3. #33
    Join Date
    Jun 2004
    Posts
    125
    I discern from his Mantra that I should use UNION ALL in my report, instead of nested table. I thought theier website went down. This new looks really cool. Thanks for helping.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width