Union or union all...tough task

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • holdingbe
    New Member
    • Jul 2007
    • 78

    Union or union all...tough task

    Hi all,

    I execute union scripts.. it will take long time but i use union all instead of union i got output at very short time..I don't know how to eliminate the duplicate rows using union all....
    Please help me
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    try using DISTINCT , that might help

    Comment

    • holdingbe
      New Member
      • Jul 2007
      • 78

      #3
      Originally posted by debasisdas
      try using DISTINCT , that might help

      i used distinct but the sam time will be taken

      Comment

      • debasisdas
        Recognized Expert Expert
        • Dec 2006
        • 8119

        #4
        could u kindly post your query with table structure please, for my reference.

        Comment

        • holdingbe
          New Member
          • Jul 2007
          • 78

          #5
          Originally posted by debasisdas
          could u kindly post your query with table structure please, for my reference.

          Sorry, i unable to give the table structure

          Comment

          • debasisdas
            Recognized Expert Expert
            • Dec 2006
            • 8119

            #6
            same here

            Sorry ,i am unable to give you the answer.

            Comment

            • sarehaman
              New Member
              • Jul 2007
              • 1

              #7
              Originally posted by holdingbe
              Hi all,

              I execute union scripts.. it will take long time but i use union all instead of union i got output at very short time..I don't know how to eliminate the duplicate rows using union all....
              Please help me

              Union
              checks the each and every row ..
              whether any duplicate row are existing in the database
              and avoid them before returns the rows .. for this entire process takes the time..
              but in Union all
              Can't take risk to check for duplicate.
              So its returns all row which are returned from the query...
              okay

              good luck

              Comment

              Working...