SQL Query Optimization | SQL Query Optimization and performance tuning
HTML-код
- Опубликовано: 25 июл 2024
- SQL Query Optimization | SQL Query Optimization and performance tuning
In this video we have discussed tips and tricks by which we can optimize any SQL query and improve performance.
Want more similar videos- hit like, comment, share and subscribe
❤️Do Like, Share and Comment ❤️
❤️ Like Aim 5000 likes! ❤️
➖➖➖➖➖➖➖➖➖➖➖➖➖
Please like & 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 : • AWS Data Engineer Basic
Azure data engineer playlist : • Azure Data Engineer
SQL PLAYLIST : • SQL playlist
➖➖➖➖➖➖➖➖➖➖➖➖➖
📣Want to connect with me? Check out these links:📣
Join telegram to discuss t.me/+Cb98j1_fnZs3OTA1
➖➖➖➖➖➖➖➖➖➖➖➖➖
what we have covered in this video:
n this video of code decode we have demonstrate how to optimize and fine tuned the SQL queries
asked in Sql interview question and answers
This video has Best Practices of SQL and Ways to fine tune your SQL Queries
SELECT fields instead of using SELECT *
Avoid SELECT DISTINCT
Create joins with INNER JOIN (not WHERE)
Use WHERE instead of HAVING to define filters
Avoid too much JOINs on your query: use only what is necessary!
Avoid cursors at all costs!
SELECT DISTINCT is a handy way to remove duplicates from a query. SELECT DISTINCT works by GROUPing all fields in the query to create distinct results. To accomplish this goal however, a large amount of processing power is required. Additionally, data may be grouped to the point of being inaccurate. To avoid using SELECT DISTINCT, select more fields to create unique results.
Some SQL developers prefer to make joins with WHERE clausesThis type of join creates a Cartesian Join, also called a Cartesian Product or CROSS JOIN.
In a Cartesian Join, all possible combinations of the variables are created
This is an inefficient use of database resources, as the database has done 100x more work than required. Cartesian Joins are especially problematic in large-scale databases, because a Cartesian Join of two large tables could create billions or trillions of results.
To prevent creating a Cartesian Join, use INNER JOIN instead:
➖➖➖➖➖➖➖➖➖➖➖➖➖
Hope you liked this video and learned something new :)
See you in next video, until then Bye-Bye!
➖➖➖➖➖➖➖➖➖➖➖➖➖
#sqlserver #sqlinterviewquestions #sqlinterviewquestionsandanswers #sqlinterviewquestions
tags
query optimization
sql query optimization,
sql server optimization,
query optimization sql,
sql server query optimization tips,
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,
query optimization explanation,
gate smashers,
learn coding,
naresh technologies
thank you for such excellent content. Hoping for more!
completed this whole SQL interview questions as i am also following your ADF series.
nice way explanation..as I am working on SQL based project, I can relate to all these points
Thank you very much sir
Hi, thank you so much .Can you please make a detailed video on how to optimize query by checking execution plan
Yes please do one video about index
Thanks for sharing knowledge
Sure
This is good and simple explanation but please do make it with sql query so that we can see a practical demo
hi,
what is the difference between query optimization and performance tuning with respect to sql query.
After checking execution plan what should be next step all mentioned above or do we need to check execution plan later .As we already know the issue how to approach to make sql query run faster.
NICE Explanation but i would be very useful if you have provided examples 😃
Will do that
Thanks
👍
DO VIDEO ON THE INDEX WITH TAKING AN EXAMPLE
Hi
Hi bro, . Use EXISTS instead of IN is ok , but how to relate count() and exists
This is so funny, you need to fix your Mic
Yeah that is the problem please suggest any mic
Sir I'm sorry but I need to comment this, it was truly a pain listening you. Your mic is understandable you can change that and improve the sound, but the way you talk... Not talking about your accent, you never breathe while you speak. Please pay attention to punctuation.
Valuable content though, keep it up.
Working on it thanks