Reputation
219
Top tag
Next privilege 250 Rep.
View close votes
Badges
2 8
Newest
 Scholar
Impact
~20k people reached

  • 0 posts edited
  • 0 helpful flags
  • 2 votes cast
Apr
25
awarded  Scholar
Apr
25
accepted Identical tables, identical query, completely different execution times
Apr
20
comment Identical tables, identical query, completely different execution times
@PaulWhite - I am trying to train people to avoid using complex functions etc in JOINS and WHERE clauses for similar reasons :) Do so once, store that value in a variable, and save a ton of redundant calculations.
Apr
20
comment Identical tables, identical query, completely different execution times
The option of creating temporary tables did cross my mind as well, for the sake of indexing and keeping the query engine from having to take guessses of what to expect. Good to see that while the difference in execution time still puzzles me I am not completely as dumb as I feared for a moment :D
Apr
20
comment Identical tables, identical query, completely different execution times
Thanks for your detailed answer, Paul. Your explanation makes sense. I guess I am mostly stumped by the drastic difference in performance. 5 seconds versus 30+ minutes (I haven't heard back if the query actually finishes). Additionally, the recordset is not that big that I would expect the query to run for that long.
Apr
20
revised Identical tables, identical query, completely different execution times
added 70 characters in body
Apr
19
awarded  Student
Apr
19
awarded  Yearling
Apr
19
revised Identical tables, identical query, completely different execution times
added 524 characters in body
Apr
19
revised Identical tables, identical query, completely different execution times
added 2058 characters in body
Apr
18
asked Identical tables, identical query, completely different execution times
Dec
12
awarded  Commentator
Dec
12
comment Sometimes SQL Server Agent Service is automatically disabled
Can you show us event logs from when this happens? You'll need to give us more info than this to work with.
Aug
5
awarded  Caucus
Aug
5
awarded  Constituent
Dec
11
comment SQL Server 2014 upgrade
When you take a backup of your existing database and restore it on SQL Server 2014, it'll automatically upgrade the database for you. However, you might need to verify that your code isn't using any deprecated functionality, functions, keywords or options.
Feb
14
awarded  Supporter
Feb
13
comment Why does query error with empty result set in SQL Server 2012?
@GordonLinoff Paul Randal just confirmed via Twitter that your reply was bang on.
Feb
13
comment Why does query error with empty result set in SQL Server 2012?
Great question :)
Feb
13
comment Why does query error with empty result set in SQL Server 2012?
The one guy who would know for sure (or if he doesn't, he'd be able to find out) would be @PaulRandal. Will try and get his attention to this Question.