A Little About Paging Queries And Batch Mode In SQL Server

  Рет қаралды 406

Erik Darling (Erik Darling Data)

Erik Darling (Erik Darling Data)

Күн бұрын

Become a member! / @erikdarlingdata
Click here for 50% off a health check: training.erikd...
If you like what you see here, you'll love my advanced performance tuning training:
training.erikd...
Paul White articles:
1. qa.sqlserverce...
2. qa.sqlserverce...

Пікірлер: 20
@andreysamykin1143
@andreysamykin1143 Күн бұрын
Interesting! Thanks a lot!
@ErikDarlingData
@ErikDarlingData Күн бұрын
Glad you liked it! 🥸
@ahmadjuran5988
@ahmadjuran5988 Күн бұрын
Thanks Erik 😀
@ErikDarlingData
@ErikDarlingData Күн бұрын
🫡
@douglascoats7081
@douglascoats7081 Күн бұрын
Erik "Sweet Meteor of Death" Darling
@ErikDarlingData
@ErikDarlingData Күн бұрын
Someday, someday.
@gotqn2103
@gotqn2103 Күн бұрын
Thanks 👍
@ErikDarlingData
@ErikDarlingData Күн бұрын
For you? Anything.
@clerincg
@clerincg Күн бұрын
It's unfortunate that a method that was documented 15 years ago is still a preferred method when I think that using the OFFSET ... FETCH structure is more readable/understandable (but doesn't use BATCH mode). I'll look forward to a future video from Erik Darling that demonstrates that it works now 😁
@ErikDarlingData
@ErikDarlingData Күн бұрын
You may be waiting an uncomfortable amount of time for that follow up.
@FlaggedStar
@FlaggedStar Күн бұрын
02:10 Honestly, I quite liked that opening. It's rare to see a coverage of when to make a columnstore index that is neither ridiculously basic nor extremely advanced. I liked having two minutes spent on how people use columnstore.
@ErikDarlingData
@ErikDarlingData Күн бұрын
Well thanks, yeah, it's difficult to tell someone fully when to use or not use one from afar, but I think a lot of people got scared about it because they didn't get a high column score.
@philippecloquet812
@philippecloquet812 14 сағат бұрын
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 🥳🥳🥳
@ErikDarlingData
@ErikDarlingData 13 сағат бұрын
I don't have a quick answer for you here. I'm sure it's possible, but I'm not sure where things differ.
@douglascoats7081
@douglascoats7081 Күн бұрын
fyi you forgot to include the Paul White links in the description
@ErikDarlingData
@ErikDarlingData Күн бұрын
Fixed!
@oblako77
@oblako77 Күн бұрын
It is just a simple case of querying 1 table, so join is trivial. Not much use when you have a complex query with many rows to return so it needs to be paged 😢
@ErikDarlingData
@ErikDarlingData Күн бұрын
I totally disagree. Most people have over complicated the situation in various ways and don’t really understand which table drives the pagination. Even if there’s a core set of joins that does it, you can apply the idea here to those. It’s a problem I’ve solved for many people who made similar crying emojis.
@oblako77
@oblako77 Күн бұрын
That is probably right for a specific query, but in my case, our code had to add paging logic to an arbitrary query created by the user. So customer concatenated tables whatever they wanted, and then the result must be returned in pages.
@ErikDarlingData
@ErikDarlingData Күн бұрын
@@oblako77 yep, it’s still a very solvable problem. You’re not special 😃
Advanced String Searching In SQL Server
14:31
Erik Darling (Erik Darling Data)
Рет қаралды 280
Synyptas 4 | Жігіттер сынып қалды| 3 Bolim
19:27
Life hack 😂 Watermelon magic box! #shorts by Leisi Crazy
00:17
Leisi Crazy
Рет қаралды 77 МЛН
A Little About Working With Binary and Varbinary Data In SQL Server
14:16
Erik Darling (Erik Darling Data)
Рет қаралды 316
Postgres just got even faster
26:42
Hussein Nasser
Рет қаралды 34 М.
Uber SQL Interview Question ( Medium Level) | Fix the Issue 💡
9:14
A Little About DOP and Bitmaps In SQL Server
17:06
Erik Darling (Erik Darling Data)
Рет қаралды 529
A Little About Cardinality Estimation Feedback In SQL Server 2022
13:19
Erik Darling (Erik Darling Data)
Рет қаралды 382
Your website does not need JavaScript - Amy Kapernick - NDC Oslo 2024
43:37
What Missing Index Requests Miss In SQL Server
19:05
Erik Darling (Erik Darling Data)
Рет қаралды 505
SQL Server Performance Problems When Joins Have No Equality Predicate
18:16
Erik Darling (Erik Darling Data)
Рет қаралды 843
Synyptas 4 | Жігіттер сынып қалды| 3 Bolim
19:27