Inflearn brand logo image
Inflearn brand logo image
Inflearn brand logo image
BEST
Programming

/

Database

High-Performance SQL Query Writing Tips for Software Developers

This course teaches you how to write performance-conscious queries during the SQL development phase, guided by a SQL Server expert. You can learn the basics for meeting query performance requirements along with practical case studies.

(4.6) 93 reviews

1,226 learners

  • sqlexpert
실무 꿀팁
초보 탈출
SQL
DBMS/RDBMS

Reviews from Early Learners

What you will learn!

  • Learn the basic rules and prohibitions for writing high-performance queries.

  • Basic knowledge for writing good quality queries

  • Indirect experience of common practical cases

Query writing determines performance and quality!
Learn solidly with a focus on practical skills. 👨‍💻

A few lines of incorrectly written queries
Are you experiencing performance issues ?

In terms of performance, poorly written queries are a major cause of DB performance and service performance degradation. It is common for queries written early in development to be result-oriented or implementations that are not suitable for SQL Server to cause performance problems later as data increases .

So, writing quality queries is important!

  • Basic rules and taboos for writing performant queries
  • Basic knowledge for writing quality queries
  • Indirect experience of common practice cases

As a SW developer, I would like to share my knowledge and experience so that I can understand and immediately apply to my work which types of queries or implementations may cause performance issues in the future when developing projects or solutions.


To these people
I recommend it.

SQL Server
Beginner/Intermediate Developer

SQL
Query User

For IT projects
Mainly involved developers

On query performance
Interested in~
Intermediate user

Query optimization
Worried about
Solution Developer

Writing a query
Need a standard
manager

Query Writing: Three Reasons Why You Must Know It!

  • 1️⃣ In practice, when implementing and writing queries, you can use better queries by considering performance.
  • 2️⃣ You can discuss with DB managers or field staff about queries that are expected to have performance issues.
  • 3️⃣ It helps you learn query tuning.

better quality ,
For better maintenance .

There are basic rules, taboos, and writing methods that must be followed from the development and implementation stages for index and query tuning.

In this training, developers can learn various rules and recommendations that should be considered in the query implementation phase, which will help them implement better quality and easier to maintain queries . In particular, knowledge sharing experts with long-term consulting and teaching experience in SQL Server use examples that commonly appear in practice as samples for each topic, so it will be directly helpful for practical use after training.

SQL Server
I'm a beginner
Can I take the class?

If you know the basics of SQL, it will be easier to understand and follow the content. If there is something you don't know in the middle, it will be helpful to learn the relevant sentence/command/grammar and listen to it again. Or you can use Q/A. 😊

MySQL,
PostgreSQL, etc.
With other DBMS
Even when developing
Could this apply?

There are subtle differences in architecture for each DBMS, such as indexes, statistics, locks, and query optimization, so the content of this lecture based on SQL Server may not be 100% applicable. However, I can tell you that a lot of the content is applicable to other DBMS as well.

SQL Server
Depending on the version
Is there a difference?

Most of the content is almost the same as the versions currently in use. Any differences will be explained in the lecture.


The following content
I am learning.

1. Query writing basics

  • Be careful when using SSMS or development tools on the operational DB~
  • Does the order in which WHERE and JOIN clauses are written affect performance?
  • What is the best way to do datetime literals or string literals and searches?
  • How do I differentiate between join conditions and search conditions?
  • Could the queries I've used so far be "semantic"?

2. Query Contraindications

  • What format should I write a conditional expression that is good for performance?
  • Are there any query taboos? Maybe I do them habitually?
  • Is it dangerous to use local variables and user-defined functions in the WHERE clause?

3. Write better queries

  • IN and BETWEEN, which one comes first? When is it better to use whom?
  • The main character of the aggregate function is NULL
  • Should I use UNION, ALL? Should I subtract them?
  • UPDATE and SELECT again? Just in one go
  • I really like the new functions and syntax in SQL Server^^
  • How to write a join statement? Unnecessary OUTER JOIN causing performance problems?
  • Subqueries are always slow? If used well, they are a cure.
  • A taste of the core features of query tuning, derived tables/CTE/APPLY
  • SELECT statement inside CASE? No, write it backwards.
  • Need a set difference query? Be especially careful with NOT IN
  • Make good use of recursive query and CTE
  • You're using query hints? Be careful~
  • In SQL Server, make sure to take care of locking issues when making queries~

4. Considerations when implementing cursors, views, and user-defined functions

  • Cursor? Implement in SQL if possible, but if necessary…
  • You didn't know about the STRING_AGG() function? You'll be surprised.
  • Gadget All-Purpose Arm! No, All-Purpose View? Be careful~
  • When custom functions and bulk searches meet, things get a lot heavier.
  • FORMAT() function? Be careful with bulk searches
  • (Appendix) Are you using an ORM like .NET EF, EF Core? Here is some advice

hello!
This is knowledge sharer Kim Jeong-seon .

History

  • CEO/Director of Sequlo Co., Ltd. (www.sqlroad.com) (since 2005)
    • SQL Server consulting, technical support, lectures, solution development
  • Development of SQLBigEyes (SQL Server performance monitoring solution, www.sqlbigeyes.com)
    • Development of SQLBigEyes (SQL Server performance monitoring solution, www.sqlbigeyes.com)
  • Microsoft Data Platform MVP
    • Awarded for 24 years since 2002 (currently until 2025), MVP Achievement Award in 2008

Qualifications and Certifications

  • MCT, Azure DBA, MCITP and many more

Teaching activities (since 1999)

Outside activities

  • Co-author of SQL Server MVP Deep Dives Vol 2 (Manning Pubs)
  • Kim Jeong-seon's SQL Server Consulting Story Season 13 in progress
  • SQL Unplugged Seminars for 5 years
  • SQL PASS Korea Chapter Leader
  • Speaker participation in Microsoft Ignite, BITEC, Tech Camp, MVP Camp, TechEd, MSDN, etc.

Frequently Asked Questions
Check it out.

Q. Is this a lecture that non-majors can also take?

If you have basic or experience using SQL, you can take this course. Even if you are a little lacking, you can learn the basics you need while taking the course.

Q. Is there anything I need to prepare before attending the lecture?

You can install the SSMS program provided by SQL Server or a similar program that can use queries, and download the demo DB and SQL script provided in advance. The demo DB configuration will be explained in the training.

Q. Are there any notes regarding taking the course (environment required, other things to keep in mind, etc.)?

I need SQL Server for demos and assignments. If possible, the latest version (2019 as of 2021) is good, but an older version is also fine.

Q. How is it different from the training content on the topic of "Query Tuning"?

Query tuning covers the overall process, methods, and cases of diagnosing and analyzing query performance and improving performance through cause tracking and resolution. Since this is not covered in this course , please refer to it, and this part will be explained again in the first half of the training video.


Recommended for
these people

Who is this course right for?

  • SQL Server junior to mid-level developer

  • Solution Developer

  • A developer who mainly participates in IT projects

  • Mid-to-entry level developers interested in query performance

  • A manager who needs query writing standards

Need to know before starting?

  • SQL Basics

Hello
This is

1,655

Learners

134

Reviews

61

Answers

4.7

Rating

4

Courses

(주)씨퀄로 대표컨설턴트/이사, SQLBigEyes Monitoring Solution Developer
Microsoft Data Platform MVP (Award, 2002 ~ 현재)
MCT, Azure DBA, MCITP, MCDBA
SQL PASS Korea Chapter Leader

Email: jskim@sqlroad.com
Homepage: www.visualdb.net (인프런 쿠폰 코드 제공)
Youtube: 김정선 SQL TV
강의: 스킬서포트교육센터@서울

Curriculum

All

34 lectures ∙ (6hr 12min)

Course Materials:

Lecture resources
Published: 
Last updated: 

Reviews

All

93 reviews

4.6

93 reviews

  • result님의 프로필 이미지
    result

    Reviews 1

    Average Rating 3.0

    3

    100% enrolled

    mysql 에서 좋은 쿼리를 작성하기 위해 수강을 하였는데요, sql server 기반으로 동영상 강의가 제작되어 일부 동영상 강의는 별 도움이 되지 못했으며, 일부 중요한 내용들도 쿼리 튜닝 강의로 대체한다는 내용이 아쉬웠습니다. 하지만 제가 몰랐던 내용을 알게 된 내용은 좋았습니다. mysql 다루는 사람들에게는 추천하지는 못하겠지만 sql server 를 다루시는 분들에게는 좋은 강의 인듯 합니다.

    • 김정선SQL
      Instructor

      안녕하세요, result님 제 설명보다 더 좋은 실제 경험담을 올려주시니 감사합니다! 비슷한 조건을 가진 분들이 과정을 판단하는데 도움이 되겠습니다. 부분적으로나마 도움이 되셨다니 다행입니다. 고맙습니다~ 김정선 드림

  • dreamania님의 프로필 이미지
    dreamania

    Reviews 4

    Average Rating 5.0

    5

    100% enrolled

    너무 좋은 강의 감사합니다^^ 이 강의만 충분히 이해하면 성능이슈 쿼리의 80%이상은 사라질 거 같네요!!!

    • 김정선SQL
      Instructor

      좋은 평가에 감사드립니다~ :D

  • mhryu님의 프로필 이미지
    mhryu

    Reviews 1

    Average Rating 5.0

    5

    100% enrolled

    잘봤습니다.

  • dgjung님의 프로필 이미지
    dgjung

    Reviews 1

    Average Rating 5.0

    5

    100% enrolled

    • 임수민님의 프로필 이미지
      임수민

      Reviews 3

      Average Rating 5.0

      5

      62% enrolled

      Limited time deal ends in 7 days

      $105,600.00

      20%

      $102.30

      sqlexpert's other courses

      Check out other courses by the instructor!

      Similar courses

      Explore other courses in the same field!