No video

6 Query Tuning Techniques - Solve 75% SQL Server Performance Problems (by Amit Bansal)

  Рет қаралды 137,874

SQLMaestros

SQLMaestros

Күн бұрын

Looking for comprehensive, deep-dive training on SQL Server Performance Tuning? Explore SQLMaestros All-In-One Performance Tuning Bundle. 5 courses at a highly discounted price. bit.ly/sqlmaes...
The bundled content focuses on internals, troubleshooting, query tuning, performance optimization, tips, tricks, and loads of content from the real world.

Пікірлер: 85
@rohitsakalle
@rohitsakalle 2 жыл бұрын
Very nice content....8:10 Non Sargability , 2nd Not using Index 18:40 Implicit Conversion 29:30 DPS 38:00, Bookmark lookup 56:00, Parameter sniffing 1:12:11 (Community service ;-D)
@OmarBela12
@OmarBela12 2 жыл бұрын
not all heroes wear a cape... thank you!
@pralaysangma8019
@pralaysangma8019 Жыл бұрын
DPS was a life and career changing event for me and helped me to leap towards my great career journey as a SQL Developer. DPS indeed instilled me the confidence that I could also become a SQLMaestros with a different work experience altogether. Your videos are all worth watching, and missed attending those live sessions. Hope to join those sessions personally soon ! You are amazing Amit and please continue the great work and continue to transform our lives ! May God continue to bless you and your upcoming sessions.
@bwzffgh7
@bwzffgh7 Жыл бұрын
Another hidden performance trick is to be careful about using NVARCHAR and VARCHAR interchangeably. I've had instances where query performance was improved by over 80% by simply casting nvarchars to varchar or varchar to nvarchar in the underlying data or subqueries. More often than not, converting early and staying consistent with data types can improve performance. Don't discount the cost of casting between types.
@alangrichmond-sz2ct
@alangrichmond-sz2ct 5 ай бұрын
VERY clear and excellent explanation i use all the queries on my ssms and it worked correctly thanks very much from Texas USA
@cwtrain
@cwtrain 3 жыл бұрын
"Not *your* performance problems, your *SQL Server* performance problems." Bruh. Why you gotta do me like that? Hehe. Cheers. These videos are excellent.
@PepeFuego369
@PepeFuego369 7 ай бұрын
Great video. Keep doing these. I would love to see how you simulate a situation where tempdb is full and a query is still running
@rohit090893
@rohit090893 Жыл бұрын
It was clear and concise explanation. I understood it completely. Thanks for this video.
@TellaTrix
@TellaTrix Жыл бұрын
Really nice explanation on Tunning SQL by Amit
@alianwar2433
@alianwar2433 2 жыл бұрын
Really appreciate your contents which is quite Informative. Keep up the good work in future also. Thanks Buddy.
@gozinto87
@gozinto87 2 жыл бұрын
This course is brilliant. Thank you sir very much. Greetings from germany
@robdemarco3722
@robdemarco3722 2 жыл бұрын
Amit, this is great... Time to build out a zero to hero course :-).... Id help and Id take it after haha. Thank you sir.
@arunsharma-cb6nn
@arunsharma-cb6nn Жыл бұрын
this is a good example
@Sreedevi2901
@Sreedevi2901 3 жыл бұрын
Very detailed explanation in a very simple way.
@sdbjakeer
@sdbjakeer 3 жыл бұрын
Very nice. I've got answers for many of my questions..
@shreyadutta5817
@shreyadutta5817 Жыл бұрын
Excellent explanation
@abhaysingh4578
@abhaysingh4578 3 жыл бұрын
Very very Very informative. Thanks a lot. Keep posting some ticks and tips also as a short videos.
@sujithkumarjack
@sujithkumarjack Жыл бұрын
Excellent explanation Keep it up!!
@user-lw5uh9ir7y
@user-lw5uh9ir7y Жыл бұрын
You are just Amazing ...!!! Kudossssssssssss
@subhanishaik7310
@subhanishaik7310 2 жыл бұрын
thanks for useful information.....keep post about sql server
@tapanb7ind
@tapanb7ind 2 жыл бұрын
specifically liked the implicit/explicit conversions improving performance
@juancarlosvasquezgarcia2896
@juancarlosvasquezgarcia2896 Жыл бұрын
excellent explanation, great contribution, thank you!
@vinku3666
@vinku3666 3 жыл бұрын
Awesome details covered Thankyou.
@nagarajm889
@nagarajm889 2 жыл бұрын
Great video Amit. However, Pinal Deve says index has nothing to do with performance, index is the culprit, delete the indexes if you want to improve performance. Now, I'm confused, two SMEs say two different things. Correct me if I'm wrong
@mariopalma5260
@mariopalma5260 2 жыл бұрын
Do your own testing, Mr Lazy
@bwzffgh7
@bwzffgh7 Жыл бұрын
Index has nothing to do with performance? The entire point of indexes is performance. Granted, there are scenarios where indexes can hurt performance, but just blankly saying "index has nothing to do with performance" is just wrong.
@SuperWhatusername
@SuperWhatusername 2 жыл бұрын
very helpful SQLMaestros, Thanks again
@jegadeesr7213
@jegadeesr7213 3 жыл бұрын
While optimizing T-SQL Queries, in the logical query execution plan, what are the top 3 operators which we should eliminate / optimize?
@tvskumar1990
@tvskumar1990 3 ай бұрын
How to improve performance of a view where only joins are used without any 'WHERE' available.
@sanjeetsingh1406
@sanjeetsingh1406 3 жыл бұрын
Superb explanation.. magical video
@khalilkazi700
@khalilkazi700 2 жыл бұрын
Very good content. Exceptional way to explain topic
@udayakoju07
@udayakoju07 3 жыл бұрын
Very useful information, thanks for sharing the video
@asharichardson1789
@asharichardson1789 2 жыл бұрын
Very useful! Thanks for the video
@issaceinstein7061
@issaceinstein7061 3 жыл бұрын
Hi Amit, Great Explanation... But i couldn't understand why you change the Business Logic to make SQL Server Faster.? For Example; Take Seek, you change the Business logic to show us what makes scan and seek, good till that... But how to make the Scan converted to Seek without changing the Business Logic.?
@reikooters
@reikooters 2 жыл бұрын
He didn't change the business logic. I believe you're talking about what he says at 13:50 (section starts at 11:25) - what he's saying is if you are changing your query to improve the performance, you must make sure that your new query is logically the same - that means, your modified query must always still return exactly the same result that the old query did. Otherwise if you don't, then if this query was a part of some application, then your change has just introduced a bug where the system isn't returning the correct results any more. In his example, he is querying a DateTime column for records on a particular date (i.e. from midnight to midnight - the 24 hour period of that date). In the first (bad) query, he achieves this in his WHERE clause by converting the DateTime value to a string which does not include the time component, and compares it to a string of the date he wants to get results for. In the fixed query, the new WHERE clause is selecting rows where the value is >= the date he wants results for AND < the following day. The improvement is that he's not converting the column to a string, instead he's keeping the data as a DateTime as it already was. The result is that the query will return results for that entire day, from midnight to midnight. Meaning, his new query is logically the same and returns exactly the same results - that's the part where he says to make sure your modified query is logically the same. In the improved query, now SQL Server is able to use the index to find the data much faster (seek - skipping only to the relevant rows in the table) because it isn't doing the string conversion. In the old query it would need to do a scan - it would need to convert the DateTime to a string for every row in the table before it is able to do the string comparison to get the results.
@dhanashrikarale454
@dhanashrikarale454 3 жыл бұрын
Very nice looking for this from long time
@mrunalahire2113
@mrunalahire2113 3 жыл бұрын
Really informative with all possibilities
@vinodkumar-zh1gv
@vinodkumar-zh1gv 3 жыл бұрын
Can you please explain how to use query store with example this very helpful to everyone
@higiniofuentes2551
@higiniofuentes2551 Жыл бұрын
In the second case: if you are looking for first name "ken" with the index last name+first name+middle name what would be the solution without creating a new index to be a seek and not scan?
@malllikaavvari2543
@malllikaavvari2543 2 жыл бұрын
Sir it's really nice explanation 👌
@hutchm92
@hutchm92 3 ай бұрын
Thank you!
@abhayvachhani8088
@abhayvachhani8088 Жыл бұрын
Thank you it's new to learn
@jitendrarajbhar9286
@jitendrarajbhar9286 3 ай бұрын
Thank you very much
@Shaolin80000
@Shaolin80000 2 жыл бұрын
In the first example why didn’t you just remove the conversion and put the modified date in the same format as your solution ‘yyyy/mm/DD’?
@abhishek.goel007
@abhishek.goel007 Жыл бұрын
Sir for recompile, I have a question At the same time procedure run if another request comes at that time what will happen? Is error occurred?
@AtulKumar-lx4iy
@AtulKumar-lx4iy 2 жыл бұрын
at 11:25 convert...='01/01/2020' is not the same as 14:23's in where clause , here ">=" is being used instead of "=", then why are you saying that the output of the query will be the same ?
@sunilshinde4595
@sunilshinde4595 2 жыл бұрын
video is really helpful.but need a guidance , i came across a bug in sql query , which returns incorrect records 1 in 1000 records. how to tackle such issues, request you please make a video of such scenarios.
@win-hut41
@win-hut41 3 жыл бұрын
Yes really useful section all the SQL server developers
@higiniofuentes2551
@higiniofuentes2551 Жыл бұрын
Thank you for this very useful video!
@SChaks1
@SChaks1 2 жыл бұрын
This is very helpful. Thanks a lot!
@rohitjaiswal8116
@rohitjaiswal8116 Жыл бұрын
Thanks 🙏
@CalvinPuah
@CalvinPuah 2 жыл бұрын
Very informative. Thank you very much!
@P5toraskar1986
@P5toraskar1986 Жыл бұрын
Super session. Great thanks.
@kopalsoni4780
@kopalsoni4780 3 жыл бұрын
Can anyone explain why 'INCLUDE' is being used to create the index? At: 9:30 mins, Line 16-18 TIA!
@ajirahman5289
@ajirahman5289 2 жыл бұрын
Awesome very clearly explained
@kirankadam2616
@kirankadam2616 2 жыл бұрын
Nice sir very helpful for me 👍
@manishvadher9717
@manishvadher9717 3 жыл бұрын
I have one query that take too much time. here is the explanation that I make -> there are 300 columns in one table. -> I want to filter on all 300 column with like operator i.e. column_name like '%[search term]%' can you help to improve this query
@ulmann800
@ulmann800 2 жыл бұрын
Use reverse(column) and use xxxx% instead of %xxxx
@heshamabdo6024
@heshamabdo6024 2 жыл бұрын
Great information thank you
@anonymous8633
@anonymous8633 3 жыл бұрын
Can you share where to find the database to test myself? I found AD2016 but it has TransactionHisotry table!
@DBDilipOnly
@DBDilipOnly 3 жыл бұрын
Thanks for sharing knowledge
@ahmedo.975
@ahmedo.975 2 жыл бұрын
Very toot content very very helpful Thanks sir
@SuperWhatusername
@SuperWhatusername 2 жыл бұрын
Thanks
@kopalsoni4780
@kopalsoni4780 3 жыл бұрын
At 54:58, the result of 4th problem's fix gives me same result as with implicit parameterization. Can anyone help me with the reason?
@zaxxx3
@zaxxx3 2 жыл бұрын
any idea on how to tune table where column need like '%%'
@ryandavies4894
@ryandavies4894 3 жыл бұрын
Whats the impact of explicit conversions on sargability?
@rajeshraj-rq4th
@rajeshraj-rq4th 3 жыл бұрын
Hi Amit, when i execute the below query getting error select q.query_hash, q.number_of_entries, t.text as sample_query, p.query_plan as sample_plan from (select top 20 query_hash, count(*) as number_of_entries, min(sql_handle) as sample_sql_handle, min(plan_handle) as sample_sql_handle from sys.dm_exec_query_stats group by query_hash having count(*) > 1 order by count(*) desc) as q cross apply sys.dm_exec_sql_text(q.sample_sql_handle) as t cross apply sys.dm_exec_query_plan(q.sample_sql_handle) as p Msg 8156, Level 16, State 1, Line 32 The column 'sample_sql_handle' was specified multiple times for 'q'. Please assist me
@kopalsoni4780
@kopalsoni4780 3 жыл бұрын
Problem is in min(plan_handle) as sample_sql_handle. Change it to: , min(plan_handle) as sample_plan_handle
@raghubondalapati1381
@raghubondalapati1381 2 жыл бұрын
Very helpful!
@deepakd1453
@deepakd1453 3 жыл бұрын
Thanks I gained some knowlege
@piyushp394
@piyushp394 3 жыл бұрын
is there any scenario where indexes will reduce the performance? please help me out from this
@pizzaiolom
@pizzaiolom 3 жыл бұрын
The more indexes you have on a table, the slower INSERT commands will be since after every insert, EVERY index will be updated. That scales really badly if you have a big table with various columns with too many indexes, not to mention it will consume more disk storage. Indexes trade insert performance in favor of search performance but its usually not an issue if you use indexes in a smart way (IE not having an index for unused columns and such)
@piyushp394
@piyushp394 3 жыл бұрын
@@pizzaiolom thanks a lot
@manmohanmundhraa3087
@manmohanmundhraa3087 Жыл бұрын
amazing tips
@closed482
@closed482 3 жыл бұрын
Excellent
@surbhidwivedi29
@surbhidwivedi29 Жыл бұрын
It was awesome
@AshishSingh-ep5tt
@AshishSingh-ep5tt Жыл бұрын
I want to join performance tuning class? Can any body pls help me?
@SQLMaestros
@SQLMaestros Жыл бұрын
Please drop an email to contact@sqlmaestros.com
@sanjayschopra5316
@sanjayschopra5316 2 жыл бұрын
I have implemented Table Partitioning in Azure Sql Server and my table is working fine but sometimes It takes time to retrieve data like in 1 min it retrieves more than 1 lakh records and sometimes i get only 15000 .Please help me on this
@MasterBeastieshow
@MasterBeastieshow 3 жыл бұрын
good job :)
@nagasaivelpuri8167
@nagasaivelpuri8167 Жыл бұрын
Yes for 38:20
@ajitraghav8675
@ajitraghav8675 3 жыл бұрын
28 min has been passed and still have focus ... Nice
@ashishvishwakarma2732
@ashishvishwakarma2732 3 жыл бұрын
My sql server occupying 95% of memory and hence system become slow. How can I fix it. It's a virtual machine and have 60 gb ram. Pls help me.
@sjcsystems
@sjcsystems 3 жыл бұрын
Lots of useful content but skipped first 10 minutes or so...
@dhananjayjena6682
@dhananjayjena6682 2 жыл бұрын
hi
SQL Server Performance Tuning Made Easy - Pinal Dave | Craft 2019
47:13
Kind Waiter's Gesture to Homeless Boy #shorts
00:32
I migliori trucchetti di Fabiosa
Рет қаралды 15 МЛН
Schoolboy Runaway в реальной жизни🤣@onLI_gAmeS
00:31
МишАня
Рет қаралды 4,1 МЛН
女孩妒忌小丑女? #小丑#shorts
00:34
好人小丑
Рет қаралды 87 МЛН
He bought this so I can drive too🥹😭 #tiktok #elsarca
00:22
Elsa Arca
Рет қаралды 11 МЛН
What is Parameter Sniffing in SQL Server?
18:02
SQLMaestros
Рет қаралды 4,5 М.
The five-step guide to SQL tuning | CloudWorld 2022
25:59
Oracle
Рет қаралды 19 М.
SQL performance tuning and query optimization using execution plan
49:23
How to Troubleshoot a Slow Running Query in SQL Server by Amit Bansal (Recorded Webinar)
57:13
DataPlatformGeeks & SQLServerGeeks
Рет қаралды 13 М.
SQL Server High Memory Usage
19:47
SQLMaestros
Рет қаралды 4,9 М.
SQL Query Optimization. Why is it so hard to get right?
1:39:24
Brent Ozar Unlimited
Рет қаралды 35 М.
SQL Server Index Tuning - Multi Column Seeking (by Amit Bansal)
18:15
5 Ways to Improve Your SQL Queries
10:04
Kahan Data Solutions
Рет қаралды 91 М.
Kind Waiter's Gesture to Homeless Boy #shorts
00:32
I migliori trucchetti di Fabiosa
Рет қаралды 15 МЛН