December 21, 2017 at 12:55 pm
drew.allen - Thursday, December 21, 2017 12:53 PMHow much query tuning can you really expect from a simple select statement that only returns seven rows with no joins, a single SARGable where condition, and a sort?Drew
Apparently when called by 60 concurrent sessions it violates their response time SLA when the sort is in place.
December 21, 2017 at 1:08 pm
Lynn Pettis - Thursday, December 21, 2017 12:55 PMdrew.allen - Thursday, December 21, 2017 12:53 PMHow much query tuning can you really expect from a simple select statement that only returns seven rows with no joins, a single SARGable where condition, and a sort?Drew
Apparently when called by 60 concurrent sessions it violates their response time SLA when the sort is in place.
Yes, I saw that, but the issue really was whether to sort in the database layer or the client layer.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
December 21, 2017 at 1:08 pm
Lynn Pettis - Thursday, December 21, 2017 12:55 PMdrew.allen - Thursday, December 21, 2017 12:53 PMHow much query tuning can you really expect from a simple select statement that only returns seven rows with no joins, a single SARGable where condition, and a sort?Drew
Apparently when called by 60 concurrent sessions it violates their response time SLA when the sort is in place.
It depends. It could be significant if the rows are 4200 bytes wide and the only thing you need to do is a range scan on a datetime column. When doing a scan on the clustered index, it would read significantly more pages than necessary. I hope it's not as simple as that.
December 21, 2017 at 1:12 pm
Ed Wagner - Thursday, December 21, 2017 1:08 PMLynn Pettis - Thursday, December 21, 2017 12:55 PMdrew.allen - Thursday, December 21, 2017 12:53 PMHow much query tuning can you really expect from a simple select statement that only returns seven rows with no joins, a single SARGable where condition, and a sort?Drew
Apparently when called by 60 concurrent sessions it violates their response time SLA when the sort is in place.
It depends. It could be significant if the rows are 4200 bytes wide and the only thing you need to do is a range scan on a datetime column. When doing a scan on the clustered index, it would read significantly more pages than necessary. I hope it's not as simple as that.
Nevermind. I was hoping it was hypothetical, but I just saw the thread.
December 21, 2017 at 1:26 pm
Ed Wagner - Thursday, December 21, 2017 1:12 PMEd Wagner - Thursday, December 21, 2017 1:08 PMLynn Pettis - Thursday, December 21, 2017 12:55 PMdrew.allen - Thursday, December 21, 2017 12:53 PMHow much query tuning can you really expect from a simple select statement that only returns seven rows with no joins, a single SARGable where condition, and a sort?Drew
Apparently when called by 60 concurrent sessions it violates their response time SLA when the sort is in place.
It depends. It could be significant if the rows are 4200 bytes wide and the only thing you need to do is a range scan on a datetime column. When doing a scan on the clustered index, it would read significantly more pages than necessary. I hope it's not as simple as that.
Nevermind. I was hoping it was hypothetical, but I just saw the thread.
I am wondering if blocking was involved with multiple connections since it was doing a key/lookup to get the data. With only seven rows of data sorting in the app should be fast.
December 21, 2017 at 1:38 pm
drew.allen - Thursday, December 21, 2017 12:53 PMHow much query tuning can you really expect from a simple select statement that only returns seven rows with no joins, a single SARGable where condition, and a sort?Drew
I saw that question at answers.sqlperformance.com. Did they post here too? Can you post a link?
December 21, 2017 at 1:43 pm
Lynn Pettis - Thursday, December 21, 2017 1:26 PMEd Wagner - Thursday, December 21, 2017 1:12 PMEd Wagner - Thursday, December 21, 2017 1:08 PMLynn Pettis - Thursday, December 21, 2017 12:55 PMdrew.allen - Thursday, December 21, 2017 12:53 PMHow much query tuning can you really expect from a simple select statement that only returns seven rows with no joins, a single SARGable where condition, and a sort?Drew
Apparently when called by 60 concurrent sessions it violates their response time SLA when the sort is in place.
It depends. It could be significant if the rows are 4200 bytes wide and the only thing you need to do is a range scan on a datetime column. When doing a scan on the clustered index, it would read significantly more pages than necessary. I hope it's not as simple as that.
Nevermind. I was hoping it was hypothetical, but I just saw the thread.
I am wondering if blocking was involved with multiple connections since it was doing a key/lookup to get the data. With only seven rows of data sorting in the app should be fast.
I'm more curious how this query is getting called 60 times so fast that is causing any kind of an issue, do they have 60 people with watches synchronized perfectly who all click query at the same time?
December 21, 2017 at 1:44 pm
Hugo Kornelis - Thursday, December 21, 2017 1:38 PMdrew.allen - Thursday, December 21, 2017 12:53 PMHow much query tuning can you really expect from a simple select statement that only returns seven rows with no joins, a single SARGable where condition, and a sort?Drew
I saw that question at answers.sqlperformance.com. Did they post here too? Can you post a link?
https://www.sqlservercentral.com/Forums/1913956/Suggestions-on-a-query-plan
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
December 21, 2017 at 2:13 pm
Have you seen his next question?
https://www.sqlservercentral.com/Forums/Topic1913979.aspx
December 21, 2017 at 2:22 pm
December 21, 2017 at 2:35 pm
Lynn Pettis - Thursday, December 21, 2017 2:22 PM
Bet coffee that he's looking at the wrong server or wrong DB?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 21, 2017 at 2:39 pm
GilaMonster - Thursday, December 21, 2017 2:35 PMLynn Pettis - Thursday, December 21, 2017 2:22 PMBet coffee that he's looking at the wrong server or wrong DB?
Not a coffee drinker, but I do plan on drinking some Crown Royal this weekend, maybe finish off the Fireball Whiskey.
December 21, 2017 at 3:15 pm
Lynn Pettis - Thursday, December 21, 2017 2:39 PMGilaMonster - Thursday, December 21, 2017 2:35 PMLynn Pettis - Thursday, December 21, 2017 2:22 PMBet coffee that he's looking at the wrong server or wrong DB?
Not a coffee drinker, but I do plan on drinking some Crown Royal this weekend, maybe finish off the Fireball Whiskey.
I had a great flight of Crown last week at a place in Epoct. Had Crown, Maple Crown and Crown XO. Hadn't ever had the Maple before, was quite yummy!!! And fireball is my guilty pleasure. I try not to purchase a bottle because I tend to just finish it off as quickly as possible.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
December 21, 2017 at 3:38 pm
Sean Lange - Thursday, December 21, 2017 3:15 PMLynn Pettis - Thursday, December 21, 2017 2:39 PMGilaMonster - Thursday, December 21, 2017 2:35 PMLynn Pettis - Thursday, December 21, 2017 2:22 PMBet coffee that he's looking at the wrong server or wrong DB?
Not a coffee drinker, but I do plan on drinking some Crown Royal this weekend, maybe finish off the Fireball Whiskey.
I had a great flight of Crown last week at a place in Epoct. Had Crown, Maple Crown and Crown XO. Hadn't ever had the Maple before, was quite yummy!!! And fireball is my guilty pleasure. I try not to purchase a bottle because I tend to just finish it off as quickly as possible.
Haven't tried the Maple Crown (which I hear tastes like maple syrup) or Crown XO. I have Crown Royal Black, Vanilla, Apple, and Honey at home.
December 21, 2017 at 3:44 pm
I'm sorry, no I'm not sorry. Amazing what can be learned when others start reply to different threads.
Viewing 15 posts - 60,766 through 60,780 (of 66,712 total)
You must be logged in to reply to this topic. Login to reply