Query taking long time with DISTINCT

后端 未结 2 526
刺人心
刺人心 2021-01-29 02:58

I\'m using Microsoft Access 2003. One form in my project takes a long time to appear to users.

This is the applicable query:

SELECT DISTINCT tb_Konze         


        
相关标签:
2条回答
  • 2021-01-29 03:16

    The use of distinct is essentially doing a group by so you only get "unique" records. If you don't have any duplicate records then this is not needed.

    I would place my focus on your joins, instead of the distinct clause.

    0 讨论(0)
  • 2021-01-29 03:17

    I will suggest get distinct ids and then in column query get your desired columns.

    something like this

    Select (select Fehlerpfad from FehlerCodes_akt_Liste where id=A.id ) as col1, ...
    from
    (
       Select distinct ids from table
       .........
    ) A
    
    0 讨论(0)
提交回复
热议问题