Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004
    Posts
    21

    Question Unanswered: eliminate distinct

    i have following query

    insert into #tbl_a
    select distinct e.id
    from e,
    t (index t_indx6),
    #c,
    #i,
    a
    where t.date >= @date
    and e.no = t.no
    and e.descr = "AB2"
    and t.key = i.key
    and t.tp = c.cd


    It takes a long time because of distinct. Is there a way to eliminate distinct?

  2. #2
    Join Date
    Jan 2004
    Posts
    51
    In the query you do not have any criteria for table a.. Probably that is taking long time..

  3. #3
    Join Date
    May 2004
    Posts
    21
    i do in my query, i was just trying to illustrate that i have distinct with a lot of joins and it takes a long time to execute

Posting Permissions

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