Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004
    Posts
    57

    Unanswered: Optimize UNION OR INTERSECT OPERATOR

    Hello!
    My application's search is based on some queries grouped through union or intersect operator.
    My problem is that I would like to optimize the search and I cannot optimize UNION or INTERSECT operator.
    If I add the times of all the queries I get a number infinitely small than the time obtain by the reunion or intersection of these queries.
    For example, if I have:
    select 1
    union (intersect)
    select 2
    union (intersect)
    select 3
    etc.

    If I add the select1, 2, 3 etc. response time I will get a very small result comparing with the union (Intersect) result time. I cannot use union all because I need to eliminate the duplicates.
    Can you give me an advice regarding this optimizing problem?
    Thanks in advanced.

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Maybe, if you post the query and the output from TKPROF. Presumably all tables and indexes have been analyzed?

  3. #3
    Join Date
    Jul 2003
    Posts
    2,296
    yeah, post the SQL
    - The_Duck
    you can lead someone to something but they will never learn anything ...

Posting Permissions

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