Channel | Publish Date | Thumbnail & View Count | Download Video |
---|---|---|---|
Publish Date not found | 0 Views |
In this video, we discussed tips and tricks that will help us optimize any SQL query and improve its performance.
If you want more similar videos: click like, comment, share and subscribe
️Like, share and comment ️
️ Like Aim for 5000 likes! ️
Like and share the video.
Chapters:
0:00 Introduction
0:44 what is sql query optimization
1:54 INDEXING in SQL
5:09 UNION VS UNION ALL
6:02 SELECT, TOP, LIMIT IN SQL
7:19 SQL OPTIMIZATION OTHER TRICKS
AWS DATA ENGINEER: https://www.youtube.com/playlist?listPLOlK8ytA0MghBR5BIBY9nDGZMwc1nrztc
Azure data engineer playlist: https://youtube.com/playlist?listPLOlK8ytA0MghBrzu0i6WlTBdoO1WdwV_e
SQL PLAYLIST: https://www.youtube.com/playlist?listPLOlK8ytA0MggGXIKmbfZ-_Xqcos3JKdV-
Would you like to connect with me? Check out these links:
Join Telegram to discuss https://t.me/Cb98j1_fnZs3OTA1
what we discussed in this video:
In this code decoding video, we demonstrated how to optimize and refine the SQL queries
asked in SQL interview question and answers
This video covers SQL best practices and ways to refine your SQL queries
SELECT fields instead of SELECT *
Avoid SELECT DISTINCT
Creating joins with INNER JOIN (not WHERE)
Instead of having to define filters, use WHERE
Avoid too many JOINs on your search: use only what is necessary!
Avoid cursors at all costs!
SELECT DISTINCT is a useful way to remove duplicates from a query. SELECT DISTINCT works by GROUPING all fields in the query to create separate results. However, achieving this goal requires a large amount of processing power. Furthermore, data can be grouped in a way that makes it inaccurate. To avoid using SELECT DISTINCT, select more fields to create unique results.
Some SQL developers prefer to create joins with WHERE clauses. This type of join creates a Cartesian join, also known as a Cartesian product or CROSS JOIN.
A Cartesian join creates all possible combinations of the variables
This is an inefficient use of database resources as the database did 100x more work than it needed to. Cartesian joins are especially problematic in large-scale databases, because a Cartesian join of two large tables could produce billions or trillions of results.
To avoid creating a Cartesian join, use INNER JOIN:
I hope you enjoyed this video and learned something new 🙂
See you in the next video, see you then Bye-Bye!
#sqlserver #sqlinterviewquestions #sqlinterviewquestionsandanswers #sqlinterviewquestions
labels
search optimization
SQL query optimization,
sql server optimization,
query optimization sql,
optimization tips for sql server queries,
sql query optimization interview questions,
SQL performance tuning and query optimization,
SQL optimization queries with examples,
how to speed up SQL queries,
SQL Interview Questions and Answers,
sql query optimization interview questions and answers,
performance tuning,
explanation about query optimization,
gate breakers,
learn to code,
naresh technologies
Please take the opportunity to connect and share this video with your friends and family if you find it helpful.