Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7784545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:06:43+00:00 2026-06-01T20:06:43+00:00

What do you mean? can I make this query easier und make the performance

  • 0

What do you mean? can I make this query easier und make the performance better?

SELECT DISTINCT tb_Bauteile.ID,
                tb_Bauteile.Name,
                tb_Bauteile.Blatt_nr,
                FehlerCodes_akt_Liste.Fehlerpfad,
                FehlerCodes_akt_Liste.Pfad_Bezeichnung,
                FehlerCodes_akt_Liste.Steuergerät,
                FehlerCodes_akt_Liste.Kommentar
  FROM ((tb_Pinnummern INNER JOIN tb_Bauteile ON
        tb_Pinnummern.Bauteil = tb_Bauteile.ID) INNER JOIN tb_Fahrzeug ON
        tb_Pinnummern.SG = tb_Fahrzeug.Motor_SG)
 INNER JOIN FehlerCodes_akt_Liste
    ON tb_Bauteile.CDT = FehlerCodes_akt_Liste.CDT
 WHERE (((tb_Bauteile.Blatt_nr) LIKE "5*") AND
       ((tb_Fahrzeug.ID) = forms ! frm_fahrzeug ! id))
 ORDER BY FehlerCodes_akt_Liste.Fehlerpfad;

Thank you very much for your opinions

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T20:06:44+00:00Added an answer on June 1, 2026 at 8:06 pm

    Reformat it, and remove all the unnecessary parantheses and it’s actually quite easy to read (Note that when I wrote this answer, the query in the question was unformatted text!)

    SELECT DISTINCT 
        tb_Bauteile.ID, tb_Bauteile.Name, tb_Bauteile.Blatt_nr,   
        FehlerCodes_akt_Liste.Fehlerpfad, FehlerCodes_akt_Liste.Pfad_Bezeichnung,
        FehlerCodes_akt_Liste.Steuergerät, FehlerCodes_akt_Liste.Kommentar
    FROM 
          tb_Pinnummern INNER JOIN 
          tb_Bauteile 
          ON tb_Pinnummern.Bauteil = tb_Bauteile.ID INNER JOIN 
               tb_Fahrzeug 
               ON tb_Pinnummern.SG = tb_Fahrzeug.Motor_SG INNER JOIN 
                   FehlerCodes_akt_Liste 
                   ON tb_Bauteile.CDT = FehlerCodes_akt_Liste.CDT 
    WHERE tb_Bauteile.Blatt_nr Like "5*" 
    AND   tb_Fahrzeug.ID = [forms]![frm_fahrzeug]![id] 
    ORDER BY FehlerCodes_akt_Liste.Fehlerpfad;
    

    You can also alias your table names to make those simpler, e.g.

    SELECT DISTINCT b.ID, b.Name
    FROM tb_Bauteile AS b
    WHERE b.Blatt_nr LIKE "5*"
    

    Adding indexes on the fields used in your Join and Where clauses would generally improve performance. Note that an index on tb_Bauteile.Blatt_nr would improve performance here, as your LIKE clause only has a trailing wildcard. However, if your LIKE clause was LIKE '*5' then performance would not be improved.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can't make out what these 2 lines mean: var template = $(# +
How can we make universal light box i mean same code for all light
Can somebody tell me what does this mean? I'm going trough Java book and
I'm trying to run the following MySQL query: mysql> SELECT num.value, agro.mean, agro.dev ->
Please can you suggest me an example in classic asp and ajax to make
can we output a .jpg image or .gif image in C? I mean can
I want to block few mobile numbers from my application. I mean can receive
Does that mean that I can't share a Form between delphi 2007 and 2009?
I am learning C#.Can I mean closure as a construct that can adopt the
Note: when I say static string here I mean memory that can not be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.