Thank you very much for making this. It's very useful.
@GrantFritchey25 күн бұрын
Happy to help.
@mohmwlhАй бұрын
thank you for your simple and directe response
@maranolen3338Ай бұрын
dude I love you i feel smarter
@GrantFritcheyАй бұрын
Thanks! Most kind.
@lavan0731Ай бұрын
Nice one and after creating the table, how to add the data entry in the columns
@GrantFritcheyАй бұрын
I haven't recorded that video, but here's a blog post: www.scarydba.com/2017/10/11/database-fundamentals-13-data-entry-t-sql/
@alleqziz2 ай бұрын
Thank you. It still works in 2024!
@GrantFritchey2 ай бұрын
You betcha it does.
@sudarshana28273 ай бұрын
Where is the script
@GrantFritchey3 ай бұрын
You can get it here: www.scarydba.com/2018/06/04/extended-events-the-system_health-session-and-waits/
@lost-prototype4 ай бұрын
This is wrong. Migration frameworks do this. Study the options and learn the tools. Stored procs are an antipattern. DBAs just can't help but get so much wrong...
@GrantFritchey4 ай бұрын
So when I said that ORM tools are awesome, I was wrong. OK. Got it. Thanks!
@lost-prototype4 ай бұрын
@@GrantFritchey Nope, nice try. ORMs are awesome. But DBAs get a lot wrong and are typically the least technically skilled in our field.
@NeverForget17764 ай бұрын
So out of curiosity what other ways do some think you can fix performance issues if it's not better hardware or code changes?
@GrantFritchey4 ай бұрын
Nope. Video said it all. Spend money or change the database. Sure, sometimes, there may be a server setting, optimize for ad hoc or cost threshold for parallelism, that may give you a boost. Once. Then, all other issues are, spend money or change the database. No one likes this answer, but it's the single best answer I have.
@NeverForget17764 ай бұрын
@GrantFritchey grant. I'm not arguing there are other answers only asking what other answers have you heard others give that warrant asking and answering the question
@GrantFritchey4 ай бұрын
@@NeverForget1776 Oh, I didn't think you were arguing. And I know a lot of people will spend time talking about server settings, database settings, service tiers on the cloud, and all those things do matter. It's just that they are almost never really game changers. Getting the cost threshold for parallelism to a value greater than 5 will help some. But only a little, in certain situations. And that bad code, incorrect structure, it's still there.
@joseantoniocisneros78454 ай бұрын
Good job explaining.
@5522strong5 ай бұрын
Great video Grant 👍
@seymanur85435 ай бұрын
tekrar kapatıp açtığımızda yine aynı şekilde bağlıcaz mı yada hangi aşamaları yapıcaz
@GrantFritchey5 ай бұрын
Yep. Exactly the same way. There is sometimes a bit of a delay after starting a container before you can connect to it, but, that's it. It'll just work.
@choroloco70315 ай бұрын
Do you know if deadlocks can also be caused by stored procedures caught in a circular reference?
@GrantFritchey5 ай бұрын
Probably. It does depend on what's going on with it though.
@SamboDari6 ай бұрын
This is a very useful video for me personally thank you a lot continue doing more.
@surenreddy79918 ай бұрын
We are missing your videos. 😢
@GrantFritchey8 ай бұрын
So sorry. Looking at ways to revive the channel.
@surenreddy79918 ай бұрын
Ahh.. it's informative and funny 😂😂
@GrantFritchey8 ай бұрын
Thanks!
@rodfalanga37708 ай бұрын
I just started watching this video. I see that you've got to run Docker Desktop to make Docker work. Does Docker only work while Docker Desktop is running?
@GrantFritchey8 ай бұрын
Great question. You have to have a Docker service running. I'm using the free version of Docker Desktop. There are other services, paid usually, that will do the same thing. But yeah, you have to have something running for there to be a Docker to call.
@rodfalanga37708 ай бұрын
@@GrantFritchey thank you!
@paulearlagbeko73139 ай бұрын
Honestly Mr. Grant, I now have 2 favorite tutors in learning IT. Your teaching is so understanding, and I'd like to have you as a mentor. I really enjoy the fact that you're being so honest about the real world. Most people hide the fact that in the real world, things aren't so easy but that also doesn't mean they are unachievable. Thanks very much and please keep making these videos for the sake of those of us who enjoy your teaching. We'll do our part as learners and viewers and again, please let me know if you'd accept to be my mentor.
@GrantFritchey9 ай бұрын
Far, far too kind. Thank you! Bad news is, I haven't made videos here for a while. I'll have to get back on it.
@btechlight9 ай бұрын
Your videos has helped me, It's sad to hear that you've not be making them for a while Please continue, they are really helpful, Its very realistic and natural. Thank you@@GrantFritchey
@yldzumutlu32879 ай бұрын
fake addresses quickly!
@ColossalSwordFormAndTechnique Жыл бұрын
Yeah. I put my address some other place 🤷 KZbin is weird, better to be safe
Thank you this is very helpful! I really appreciate your explanations--very clear!
@niketsharma Жыл бұрын
Can we change the plan while query is running?
@niketsharma Жыл бұрын
Can you compare parallel execution plan and force order. If we have force order then also we can change the plan?
@GrantFritchey Жыл бұрын
Not while the plan is running, no. After or before, not during.
@GrantFritchey Жыл бұрын
@@niketsharma You can force the plan and that can be a parallel plan (although the engine has some control over parallel plan use, so you can see forced plans not used) but there is no order forcing so I'm unsure what you're going for there.
@RudhinMenon Жыл бұрын
Thank you very much for such a precise explanation. Is it safe to say that the transaction with more number of actions gets killed ? DB2 is killing many transactions in case of app deadlocks, not sure how it decides which one should be killed. Much thanks.
@GrantFritchey Жыл бұрын
Thanks for the kind words. I don't know DB2 at all, so I can't comment. Within SQL Server, the estimated cost from the execution plan is used as the mechanism for deciding which transaction gets rolled back. The more expensive one is assumed to be the more costly to rollback. That's not always true, but it is largely true. Hope that helps.
@RudhinMenon Жыл бұрын
@@GrantFritchey thank you
@Gergall Жыл бұрын
Thanks! Didn't know I had to look for rpc_completed (or in my case rpc_starting since I was troubleshooting something that was erroring out without completing).
@GrantFritchey Жыл бұрын
Good catch. You can also look at causality tracking as a way to string together a bunch of related events under a common guid. I think I've got a video showing that somewhere. Handy when you want to watch the whole life cycle, statement recompiles, waits, everything all at once. However, there is added overhead.
@abdullahalajmi880 Жыл бұрын
What if AI learns/was developed to to setup and maintain itself and other AI's?
@GrantFritchey Жыл бұрын
Maybe someday. Maybe. Not today, and based on everything I've seen of AI, not in the immediate future.
@eliciaganesh7766 Жыл бұрын
thank you your video was very informative
@blackisblack22 Жыл бұрын
And? What's the point?
@GrantFritchey Жыл бұрын
Simply what it says. You can force a parallel plan on a query that otherwise would not go parallel.
@benik9 Жыл бұрын
This was very helpful. Thank you
@GrantFritchey Жыл бұрын
Happy to pitch in
@Kfox0963 Жыл бұрын
Thanks for the short and sweet demo!
@danielkassa5196 Жыл бұрын
You are always the best. You may not know but for many of us your videos lessons and book opened the door to great opportunities and be successful in our career.
@GrantFritchey Жыл бұрын
Those are very kind words. Thank you so much.
@tree-service Жыл бұрын
ae in the subject :) like and subscribe
@ReginaOforiBoateng Жыл бұрын
God richly bless you. This video is a life saver
@SoulSovereignty2 жыл бұрын
Thank you for this video! Something that would have been helpful is if you explained the circumstances or condition(s) that prevent the sproc parameters from being recorded (whether we're talking XEvents or old-school tracing).
@GrantFritchey2 жыл бұрын
Great question. This most commonly happens when the server is under severe load. The monitoring tool will stop collecting stuff.
@adamoneil74352 жыл бұрын
this is really good thank you
@Abassman19672 жыл бұрын
This is great info but what about dynamically generated queries such as those generated from Entity Framework? SO far I have not been able to capture the parameter value from these EF queries other than to capture the query plan as well. Yeah I know EF queries are horrible but that's where we are today with some of our applications.
@GrantFritchey2 жыл бұрын
You absolutely should be able to capture EF queries too. I've done that in the past. There's nothing special about them within SQL Server. And, 95%+ of EF queries are fine. Now, that last 5% are truly horrific, but I like to be clear about how these tools behave.
@nilsfrahm13232 жыл бұрын
I can give you ideas: Use query store, capture query plans, find one that used to run faster and force that one. Check if problem was caused by parameter sniffing, if you can alter code a bit, add option(recompile) or option(optimize for unknown). Check if some queries can use snapsot isolation (i.e. consistency not absolute critical) and enable that and use for some, it decreases locking. Check if using table functions, avoid them, check if deadlocks are mentioning them. Check if triggers cause deadlocks. Check if plans are bad due to Nested loops (cardinality issue), for some tables you can force Hash join with hints. Check db compatibility level, try using latest, like 2019 option. Use profiler, check query captured but also SET options, like arithabort or isolation level. There are things to check...
@andarilho_games2 жыл бұрын
Excelent explanation!
@helenk8522 жыл бұрын
Hi Grant, Thank you for all the help over the years. How to save the results of the trace session to a table?
@GrantFritchey2 жыл бұрын
Ooh, good question. You can't go straight to a table. You have to use fn_xe_file_target_read_file to query the output. You can then write that to a table. I have an example here of how to query: www.scarydba.com/2021/04/05/extended-events-embrace-the-xml/. Then it's just a matter of writing an INSERT statement. Thanks for the kind words. I hope this helps.
@Slamo282 жыл бұрын
how do you do CTE'S in azure data studio? I keep gettin syntax errors
@GrantFritchey2 жыл бұрын
Nothing special. They just work. What errors are you getting?
@Slamo282 жыл бұрын
@@GrantFritchey with cte as( select * from Employee4 ) ERROR Incorrect syntax near ')'. Disclaimer i am on a mac and downloaded azure data studio through some dashboard
@GrantFritchey2 жыл бұрын
@@Slamo28 I copied your code. Other than changing the name of table, it worked: with cte as( select * from HumanResources.Employee AS e ) SELECT * FROM cte No errors. Are you sure you're connected to a SQL Server instance?
@Slamo282 жыл бұрын
@@GrantFritchey yes. I am using Azure on a MAC though. downloaded it with the instructions from kzbin.info/www/bejne/nZ3bdmqtaalrrJo this youtube vid. i wonder if that has anything to do with it.
@GrantFritchey2 жыл бұрын
@@Slamo28 I don't have a Mac to test it for you, but I know lots of people who use it on their Macs. It should work.
@SoheilG2 жыл бұрын
so easy to understand thank you so much!
@GrantFritchey2 жыл бұрын
Happy to help. So many people get this wrong. It's important to understand.
@kristopherwilson1112 жыл бұрын
Please make more tutorials
@GrantFritchey2 жыл бұрын
working on a new book. It's chewing up my spare time. I'll sure try to get back to this.
@GrantFritchey2 жыл бұрын
And thank you
@jameschemgwie24492 жыл бұрын
Thanks.You are doing a great job .I learned alot from this
@phamduong35402 жыл бұрын
<3
@thrice55602 жыл бұрын
Easy explanation, thank you.
@GrantFritchey2 жыл бұрын
Thanks! Happy to help.
@BobbyValenzuela2 жыл бұрын
Great stuff man!
@GrantFritchey2 жыл бұрын
Thanks! Appreciate the kind words.
@BobbyValenzuela2 жыл бұрын
@@GrantFritchey this needs way more views, checking out you're other great content 🔥
@abiodunfrancis61552 жыл бұрын
Great info! Get a virual environment to practise rather than on your primary OS. I'm learning!
@GrantFritchey2 жыл бұрын
Thanks. Alternatively, look at Docker Containers. No install at all, just start playing with SQL Server.