- Видео 387
- Просмотров 308 544
Erik Darling (Erik Darling Data)
США
Добавлен 4 янв 2019
SQL Server stuff. Like and subscribe.
If you like what you see here, you'll love my advanced performance tuning training:. This link will get you 75% off your order:
training.erikdarling.com/?coupon=SPRINGCLEANING
If you like what you see here, you'll love my advanced performance tuning training:. This link will get you 75% off your order:
training.erikdarling.com/?coupon=SPRINGCLEANING
An Advanced SQL Server Query Profiling Technique
Become a member! www.youtube.com/@ErikDarlingData/join
Click here for 50% off a health check: training.erikdarling.com/darling-data-health-check?coupon=HEALTHCHECK
If you like what you see here, you'll love my advanced performance tuning training:
training.erikdarling.com/?coupon=SPRINGCLEANING
Script:
gist.github.com/erikdarlingdata/058c649d950c06a17f2c001d78355d41
Click here for 50% off a health check: training.erikdarling.com/darling-data-health-check?coupon=HEALTHCHECK
If you like what you see here, you'll love my advanced performance tuning training:
training.erikdarling.com/?coupon=SPRINGCLEANING
Script:
gist.github.com/erikdarlingdata/058c649d950c06a17f2c001d78355d41
Просмотров: 643
Видео
The Broken fn_xe_file_target_read_file DMF In SQL Server
Просмотров 2149 часов назад
Become a member! www.youtube.com/@ErikDarlingData/join Click here for 50% off a health check: training.erikdarling.com/darling-data-health-check?coupon=HEALTHCHECK If you like what you see here, you'll love my advanced performance tuning training: training.erikdarling.com/?coupon=SPRINGCLEANING Vote on the feedback item: feedback.azure.com/d365community/idea/5f8e52d6-f3d2-ec11-a81b-6045bd7ac9f9
Of RECOMPILE Hints And Query Store: Where Are My Parameter Values?!
Просмотров 23911 часов назад
Become a member! www.youtube.com/@ErikDarlingData/join Click here for 50% off a health check: training.erikdarling.com/darling-data-health-check?coupon=HEALTHCHECK If you like what you see here, you'll love my advanced performance tuning training: training.erikdarling.com/?coupon=SPRINGCLEANING
Another Video For My Friend Brent About Automatic Tuning
Просмотров 49113 часов назад
Become a member! www.youtube.com/@ErikDarlingData/join Click here for 50% off a health check: training.erikdarling.com/darling-data-health-check?coupon=HEALTHCHECK If you like what you see here, you'll love my advanced performance tuning training: training.erikdarling.com/?coupon=SPRINGCLEANING
A Video For My Friend Brent About Automatic Tuning
Просмотров 88416 часов назад
Become a member! www.youtube.com/@ErikDarlingData/join Click here for 50% off a health check: training.erikdarling.com/darling-data-health-check?coupon=HEALTHCHECK If you like what you see here, you'll love my advanced performance tuning training: training.erikdarling.com/?coupon=SPRINGCLEANING
Why You Should Always Use Unicode For Dynamic SQL
Просмотров 68418 часов назад
Become a member! www.youtube.com/@ErikDarlingData/join Click here for 50% off a health check: training.erikdarling.com/darling-data-health-check?coupon=HEALTHCHECK If you like what you see here, you'll love my advanced performance tuning training: training.erikdarling.com/?coupon=SPRINGCLEANING
How To Get Rid Of NOLOCK Hints Forever
Просмотров 712День назад
Become a member! www.youtube.com/@ErikDarlingData/join Click here for 50% off a health check: training.erikdarling.com/darling-data-health-check?coupon=HEALTHCHECK If you like what you see here, you'll love my advanced performance tuning training: training.erikdarling.com/?coupon=SPRINGCLEANING
Advanced String Searching In SQL Server
Просмотров 1 тыс.День назад
Become a member! www.youtube.com/@ErikDarlingData/join Click here for 50% off a health check: training.erikdarling.com/darling-data-health-check?coupon=HEALTHCHECK If you like what you see here, you'll love my advanced performance tuning training: training.erikdarling.com/?coupon=SPRINGCLEANING
A Little About Paging Queries And Batch Mode In SQL Server
Просмотров 861День назад
Become a member! www.youtube.com/@ErikDarlingData/join Click here for 50% off a health check: training.erikdarling.com/darling-data-health-check?coupon=HEALTHCHECK If you like what you see here, you'll love my advanced performance tuning training: training.erikdarling.com/?coupon=SPRINGCLEANING Paul White articles: 1. qa.sqlservercentral.com/articles/optimising-server-side-paging-part-i 2. qa.s...
A Little About Working With Binary and Varbinary Data In SQL Server
Просмотров 427День назад
Become a member! www.youtube.com/@ErikDarlingData/join Click here for 50% off a health check: training.erikdarling.com/darling-data-health-check?coupon=HEALTHCHECK If you like what you see here, you'll love my advanced performance tuning training: training.erikdarling.com/?coupon=SPRINGCLEANING
A Little About Cardinality Estimation Feedback In SQL Server 2022
Просмотров 51914 дней назад
Become a member! www.youtube.com/@ErikDarlingData/join Click here for 50% off a health check: training.erikdarling.com/darling-data-health-check?coupon=HEALTHCHECK If you like what you see here, you'll love my advanced performance tuning training: training.erikdarling.com/?coupon=SPRINGCLEANING
A Little About Optimizer Timeouts In SQL Server
Просмотров 47214 дней назад
Become a member! www.youtube.com/@ErikDarlingData/join Click here for 50% off a health check: training.erikdarling.com/darling-data-health-check?coupon=HEALTHCHECK If you like what you see here, you'll love my advanced performance tuning training: training.erikdarling.com/?coupon=SPRINGCLEANING
Help! My Query Runs Too Long To Get An Actual Execution Plan!
Просмотров 50014 дней назад
Become a member! www.youtube.com/@ErikDarlingData/join Click here for 50% off a health check: training.erikdarling.com/darling-data-health-check?coupon=HEALTHCHECK If you like what you see here, you'll love my advanced performance tuning training: training.erikdarling.com/?coupon=SPRINGCLEANING
More Of What Missing Index Requests Miss In SQL Server
Просмотров 38114 дней назад
Become a member! www.youtube.com/@ErikDarlingData/join Click here for 50% off a health check: training.erikdarling.com/darling-data-health-check?coupon=HEALTHCHECK If you like what you see here, you'll love my advanced performance tuning training: training.erikdarling.com/?coupon=SPRINGCLEANING
What Missing Index Requests Miss In SQL Server
Просмотров 57514 дней назад
Become a member! www.youtube.com/@ErikDarlingData/join Click here for 50% off a health check: training.erikdarling.com/darling-data-health-check?coupon=HEALTHCHECK If you like what you see here, you'll love my advanced performance tuning training: training.erikdarling.com/?coupon=SPRINGCLEANING
New Query Transformation Rules in Azure SQLDB
Просмотров 38621 день назад
New Query Transformation Rules in Azure SQLDB
A Little About Parallel Insert Restrictions In SQL Server
Просмотров 41021 день назад
A Little About Parallel Insert Restrictions In SQL Server
Another Trick For Working Around Scalar UDF Inlining Restrictions In SQL Server
Просмотров 35021 день назад
Another Trick For Working Around Scalar UDF Inlining Restrictions In SQL Server
A Little About Function Rewrites In SQL Server
Просмотров 98421 день назад
A Little About Function Rewrites In SQL Server
Diagnosing and Fixing tempdb Contention from Spills in SQL Server
Просмотров 92421 день назад
Diagnosing and Fixing tempdb Contention from Spills in SQL Server
More Annoyances With Local Variables And Optimize For Unknown Hints In SQL Server
Просмотров 54728 дней назад
More Annoyances With Local Variables And Optimize For Unknown Hints In SQL Server
A Little About FORCESEEK Hints In SQL Server
Просмотров 615Месяц назад
A Little About FORCESEEK Hints In SQL Server
Performance Tuning Semi and Anti-Semi Joins In SQL Server
Просмотров 739Месяц назад
Performance Tuning Semi and Anti-Semi Joins In SQL Server
SQL Server Performance Problems When Joins Have No Equality Predicate
Просмотров 1 тыс.Месяц назад
SQL Server Performance Problems When Joins Have No Equality Predicate
A Little About DOP and Bitmaps In SQL Server
Просмотров 603Месяц назад
A Little About DOP and Bitmaps In SQL Server
Inconsistent Error Handling By SQL Server
Просмотров 542Месяц назад
Inconsistent Error Handling By SQL Server
A Little About Index Intersection Query Plans In SQL Server
Просмотров 561Месяц назад
A Little About Index Intersection Query Plans In SQL Server
A Little About Index Union Query Plans In SQL Server
Просмотров 562Месяц назад
A Little About Index Union Query Plans In SQL Server
A Little About Nested Loops Prefetching In SQL Server
Просмотров 624Месяц назад
A Little About Nested Loops Prefetching In SQL Server
How Many Threads Can One Query Use In SQL Server?
Просмотров 992Месяц назад
How Many Threads Can One Query Use In SQL Server?
Hi Erik , will that query work with SQL 2019?
Yes, it may work back to 2016 IIRC, but I can't really try it at the moment.
Cool way to get "under the hood" while the car is going down the highway 😎 Was there a resolution to the single-threaded Index (Eager Spool) operation that would have actually run in parallel like the other Clustered Index operation?
Eager index spools are always built single threaded, likewise the table that the index is built from is read from single threaded. There is no resolution aside from creating the index yourself, if you're on Enterprise Edition.
Should there be a significant execution time difference between the serial v Parallel version? the serial ran in 1m 23s and the parallel in 1m 18s
Yes, I talk about the main reason why in the video too 😘
1:11 No love for GetPlans = 2?
The best SQL Server training on internet (EDD) could use some links to these too many great videos as complementary material ;)
If you feel like doing those annotations, go for it. Otherwise, I'm planning on redoing and expanding the training content with the stuff that's here as well.
What's impressive is you not only have to put in all the effort and research to discuss a topic, you also have to intentionally craft queries that demonstrate the problems related to it.
Do what you love and you'll never take a day off!
Darling for President!
Vote early, vote often.
Is it a bug - or is it a feature??😂😂😂😂
I'm gonna go with bug on this one.
@@ErikDarlingData so would I - I just put my MS Head on for a minute- although I didn’t take the job with them!
I feel a powerful urge to do more Postgres. How strange.
I'm sure you'll find bugs there too.
*slaps the enterprise level Ferrari, You can fit SO much garbage code in this bad boy
If only there were Ozempic for bad code.
@@ErikDarlingData I like the idea of bad code bulimia.
Me: Where DocDate = '20241018' SQL server: English, other ducker Doo. you speak it? Me: Where DocDate >= '20241018' And DocDate < '20241019' Sql Server: See it wasn't that hard, was it?
Well, the time element does make approximations for equality predicates difficult.
At last, an antidote to Brent's arrogasms.
There are special mittens for those.
Lets us accept the fact that Erik is the Michael Jordan of performance tuning and Brent is, well I am open to ideas.
I think the only thing I have in common with Michael Jordan is shoe size.
providential video, I was just having a problem of "I, sql server command, I create unquestionable plans" when instead there are indexes that he does not want to use
Plans are all very questionable AFAIC.
Much better! Of course, with the real-sized Stack database, getting that query to finish 20 times would be quite an ordeal....
It would require significantly more patience, sure.
We need to find a way to get a third video on this... Maybe we need to get Erik to rant about features that aren't available on Standard Edition. I'm pretty sure this is one of them.
Who would listen?
The third video is about rewriting the automatic tuning query to run on lower compat levels...
With the focus on fairness, maybe it's time to update your slogan to "my rates are reasonably fair."
Then I'd have to change my trademark application.
Useful, many thanks. I wonder if there is any possibility for automation or code-smell-checking? Developer is a human beeing not fully concentrated for all of the details that should be met everytime.
I haven't seen any good ones publicly available, no.
Awesome Erik! Updated my tips repo 🤫
Anyone complaining about long videos has obviously never spent hours troubleshooting code, only to find that the code is fine but the datatypes act differently under different collations.
HAHAHA, you know, that's a really funny point.
Pay no attention to the name of the stored procedure. It is surely not making fun of anybody! Great video 😀
Ha ha, that's me being salty that I never got one.
Man I love you,I love Brent I love Kendra...you guys are my hero ! 9 years as a DBA now and since day 1 I'm with Brent and Kendra and I remember when you joined the team. thanks for everything !
Yes, it was quite an astounding thing to have worked with them for a time. I wouldn't be where I am today without that experience.
That's epic 😂
Well, I thought it was a bit odd that people kept bringing it up to me. There were a couple more examples that were buried in Twitter/LinkedIn feeds I couldn't find quickly.
*"Oh gosh, it sounds like real trouble, it sounds like a job....for Darling Data"* .... (I know, I know, it's in jest). Entertaining though. Hope he gets you back
Gee thanks.
Awww, man, c'mon, that's not fair - you used a different query, hahaha. The video was begging people to get automatic tuning to work for that particular query in the post.
I learned from SQL Server masters to never watch other people's videos 😘
@@ErikDarlingData HAHAHA, that's fair.
A more fair video is on the way tomorrow!
@@ErikDarlingData Whew! Thanks sir. I'm still sure you'll get it working, but at least I feel better that you had to deal with that particular query, heh.
I think you'll like it. There are threats of physical violence against Microsoft (in Minecraft).
Exec dbo.MicrosoftCertifiedMaster - you are a cruel person, Mr Darling 😂😂😂
I should have had one, but no one would give me 20k and a month off work 😭😭😭
@@ErikDarlingData the boss spent the training budget on himself then 😂
As i always suspected, you're way smarter than Brent
According to Beer Gut Magazine, I'm only younger and better looking.
from what I learned, the reason why it says 13.x seconds is because it is the sum of the number of seconds for each thread running in parallel. please correct me if im wrong
I think you're talking about for the Gather Streams thing? The problem is that the operator time there is inconsistent with the actual query execution time.
I want your datalength!
That could get expensive.
Long videos are like second breakfast-there's always more than you expect!
I hope this is a good thing. Second breakfast sounds like first nap.
I dont have an issue with your length. You are long enough lol seriously though who is actually complaining about 15 minute videos?
It's the internet people complain about everything
Is that “live Elvis entertainment “?
You'd have to ask our AI overlords.
Don't shorten your videos too much or I'll have to shorten my lunch break accordingly 😁 Erik, are you ever concerned the Unicode strings take twice as much storage as non-Unicode? If you will never (well, never say never, right??) have Unicode characters, is it worth the storage overhead?
No, I honestly don't care about that. It falls into the category of 32 bit problems, like index fragmentation, page splits, and other goofy memes from the bad old days.
When making a dynamic SQL string using multiple NVARCHAR(MAX) variables why does it sometimes not take more than 4K characters? Did any1 else face this issue here? On stack overflow I read it's due to 8K page size. But it happens only on some complex dynamic queries and I am not able to recreate it in simple scenarios.
Well, the SO explanation is wrong. Leave that out of your brain. I think you're confusing what can be put into a string vs what can be printed from a string. PRINT statements have an 8000 byte (not character) maximum, so printing out unicode (nvarchar) strings with standard ASCII characters can only display the first 4000 (each character being two bytes instead of one). If you use print and substring, you can get deeper into longer strings. You can run into situations where using + to concatenate strings that don't have an explicitly declared length can suffer from implicit conversions from max to shorter byte lengths. That's why to be safe I end up explicitly casting shorter strings that I'm concatenating in to nvarchar max.
@@ErikDarlingData Thanks for replying. The LEN itself is 4k charcters. Eg: I have two NVARCHAR (MAX) variables @Sql1 and @Sql2 each are individually built using multiple sting concatenations using '+'. The final SQL string to be executed is built as follows: Declare @FinalSql NVARCHAR(max) Set @FinalSql = @Sql1 + @Sql2 Now the LEN( @Sql1) is 4k. So the query has lost all the characters after 4k characters, thus giving me an apt syntax error. I use PRINT CAST (@FinalSql as NTEXT) to print everything and @Sql1 portion is indeed cut off at precisely 4k characters.
@@ErikDarlingData So I guess the culprit is concatenations using '+'. Currently I'm tricking by; Set @SQL1 = @Sql1 /*contains the string almost upto 4k characters*/ + -- rest of the concatenations. Now the @Sql1 is correctly formed.
@@jackiecooper9439 well, I'm not entirely sure based on your description and solution what the problem is, but like I said before, tacking on shorter strings can often result in strange truncation issues. An alternative way to make sure the contents are fully displayed would be something like: SELECT ( SELECT [processing-instruction(_)] = @sql1 FOR XML PATH(''), TYPE );
It’s about how rounded it is
heyyyy wait a minute
Hi, how long this 75% discount is available, I am planning to buy this in the 1st week of November, if it is still available at that time. thank you for a generous offer!
It’s always available.
@@ErikDarlingData thank you
:
You’re damn right brother.
Shorts from Erik. O tempora, o mores!
I never thought I’d see the day.
I like it!
And I like you!
Whats your go to metric when gauging query performance?
CPU/duration is my primary concern.
Why is there no sort operator in the Query Plan at 07:55? Of course it uses the Index on the descending reputation first, but it should still need to order by the ascending Id column - except reputation is unique (in the higher ranges), but even with statistics the SQL server can't know/guarantee this, so it would need to sort. A possible reason would, if the ID is the clustered Index and SQL server guarantees, that rows would always be implizit ordered by Reputation DESC + Id ASC, even when the Id is not specified in the CREATE INDEX (the columns of clustered Index will always be included, but I in my opinion unsorted.)
Because when there’s an equality predicate which guarantees sort ordering. I’m mobile at the moment but if you search my channel for something like index sort you should find videos about it.
So covert! Didn't think of you as that sneaky 🤣🤣
I like surprises.
i do like devious and mischievous things...
There are entire club basements dedicated to that.
Very interesting, what database are you using for your testing? Is it stack exchange?
Yes, StackOverflow2013.
My brain is mush now watching this
"Now"
We went the fancy route and wrote our own code scanner with ScriptDom that gets run as part of the build pipeline. If the developer used anything smelly, we block the PR. Lol
One of my greatest pains in life is the comment from the developer "No I am 100% certain that my code is not causing any blocking because I put NOLOCK hints on all my SELECTs. So it must be something else."
Explaining why that is wrong is always a pain. You have to get in to what locks NOLOCK takes and what it respects.
Very few people are interested in learning these mechanics, yet will argue with you armed with all of their misconceptions. It's a sad state of affairs.
I am going to add this to my toolkit. Thanks!
Your developers will love you for this 😃
Kronos Quartet Plays. Chanting circle of dudes "String to String!"
HAHAHA, oh no 😭
Hi Erik, I replayed the same queries on my box and I have a different result, the first query (with fetch) took 10 seconds on the first run (4.2M pages read from disk), 2 seconds the next run. The second query with the row_number function was not faster altough batch mode was used. I double checked the execution plans and they are exactly the same as yours. Am I missing something? PS I use PoorMansTSqlFormatter for my formatting 🙂, and thanks for all these unforgettable parties 🥳🥳🥳
I don't have a quick answer for you here. I'm sure it's possible, but I'm not sure where things differ.