SQL Interview Question and Answers | Optimize/Fine Tuning Queries | SQL Best Practices | Code Decode

preview_player
Показать описание
In this video of code decode we have demonstrate how to optimize and fine tuned the SQL queries
asked in Sql interview question and answers

Udemy Course of Code Decode on Microservice k8s AWS CICD link:

Course Description Video :

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:

Subscriber and Follow Code Decode

#sqlinterviewQuestions
#sqlbestpractices
#sqlfinetuning
Рекомендации по теме
Комментарии
Автор

Great kickstarter for devs who don't want spend unnecessary time on the web. Straight to the point. You guys have to continue with this series. It's a request. Thanks alot !

shreeram_kulkarni
Автор

The way you explain the concepts was amazing & crystal clear ..
Could you Please make vedios on how to write junit test cases

sankeerthpulyala
Автор

Please continue this series. Even I have the idea of SQL but there are some good concept that I was not aware of it.

anantsingh
Автор

It was very much needed
Tomorrow I'm going to have a small discussion with Oracle (probably pre interview)
This might help

parulsinghchauhan
Автор

Great efforts team, keep up the good work, explaining the things never be the easy task, you guys are making it in a best possible way, Hope to see more videos from you..!, As well as with part - 2

veerayuvakishore
Автор

This content is very good. Please create second part of it.

josephpudupermanil
Автор

Thank you so much for making such kind of video's keep it up and I am waiting for your next part

Cricket_lovers
Автор

Thanks a lot for your dedication towards making this easy to understand.Please upload the second video as well eagerly waiting 👏👏

siddharthshinde
Автор

Thanks for explanation, please create part 2

gopikrishna
Автор

Pls create rest of question also in separate Your videos are very useful thanks for sharing your We are waiting for you next video 😊

saradasantosh
Автор

Very nice but not complete without second part. Not able to find next video.. plz share link here for second part.

milindmalwadkar
Автор

Need more SQL video for preparation of interview 4+ experience

Priyankapatel-zmvq
Автор

Performing joins is also a Cartesian product in itself

ParthPandey-vlwj
Автор

This is so informative.. SO MUCH.. Please do make a part 2. Would love to know the rest of the points as well 🙂

kiranchoudhary
Автор

Very informative video, the performance improvement of an API timing is one of the biggest challenge for a backend developer. Thank you for sharing this knowledge 🙏

aman_deep
Автор

Please continue this series it will help million's of developers .Thanks

nancysingh
Автор

Thank you so much for sharing this video. Please share the second part also. Really helpful for interview preperations.

shikshadubey
Автор

Very good tutorial, please upload next part and have a detailed discussion of cursors and other advance topics . Thank you

akashsaha
Автор

fantastic video please upload the next video that would be helpful.🙂

funforkids
Автор

What a compilation! You are doing great job! Keep it up!

mitulvaghela
visit shbcf.ru