Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003

    Question Unanswered: re: any oracle expert suggestions

    hi! ,

    In a procedure

    I have a main cursor to select records ...

    the cursor consists of four select statements unioned....

    select 1
    union all
    select 2
    union all
    select 3
    union all
    select 4

    it is necessary to use UNION ALL instead of UNION to reduce processing
    time ...

    --- WITHOUT having to create temporary tables
    how can i remove duplicate records if they come up using pl/sql in the proc ?

    thanks for any help suggestions tip etc ..

  2. #2
    Join Date
    Nov 2003
    down on the cube farm, left then right then another left
    What benefit is it to reduce processing time if you do not get the result you want? Why do you believe "union all" is reducing your processing time? Is it because the union is not taking the time to remove the dups? (Duh!). Sorry, I am in a mood this morning.

    It seems to me that any processing time you save using union all will be lost when you try and reprocess your list to remove dups. Just use union and be done with it.
    NOTE: Please disregard the label "Senior Member".

  3. #3
    Join Date
    Sep 2002
    Provided Answers: 1
    Todd, you have my sympathy! I think of it this way: if there was a way to combine the benefits of UNION with the performance of UNION ALL, why wouldn't Oracle re-implement UNION to work that way already?

Posting Permissions

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