507 reputation
315
bio website jadito.us
location Chicago, IL
age 26
visits member for 1 year, 8 months
seen Apr 11 at 19:31

Currently I am a Jr. Database Administrator and formerly a SQL Server Database Programmer. My graduate research and studies are primarily involved with database models and optimization. I like to write on my blog about technical problems which I've encountered. Feedback is always welcome and appreciated.

I'm a Pastafarian and part of the Church of the Flying Spaghetti Monster.

Writing a question? Follow Jon Skeet's guide on how to write a good question.

Answering a question? Follow Jon Skeet's guide on how to write a good answer.


Aug
27
suggested suggested edit on Dynamic file name for file import
Aug
27
asked Dynamic file name for file import
Aug
22
comment How to make SSMS upper case keywords
@DavidFolksman Have you tried using GROUP BY with a SELECT *?
Aug
10
awarded  Yearling
Jul
19
comment Speeding up a NOT IN subquery
Please post the EXPLAIN
Jul
18
comment function hangs with null case operation
I'm on 2008R2; when I get to Choose Schemas, dbo is not listed. Just other schemas that I don't use.
Jul
18
accepted function hangs with null case operation
Jul
17
comment function hangs with null case operation
"do you have a very high proportion of NULL values in the Date column in that table?" I don't have NULL values for dates in any of those tables.
Jul
17
comment function hangs with null case operation
@MartinSmith Thanks for taking the time to examine them. Very insightful.
Jul
17
awarded  Self-Learner
Jul
17
comment function hangs with null case operation
@MartinSmith Updated with XML plans.
Jul
17
revised function hangs with null case operation
added 4004 characters in body
Jul
17
revised function hangs with null case operation
added 220 characters in body
Jul
17
comment function hangs with null case operation
Estimated plan (when using CASE). I cancelled the query after 2 hours (result typically returns in < 2 seconds).
Jul
17
comment function hangs with null case operation
Casting the expressions inside the CASE also had no effect, query still hangs.
Jul
17
comment function hangs with null case operation
@MartinSmith Here's the plan for the query that returns a result. I don't have a plan when the second expression is NULL.
Jul
17
answered function hangs with null case operation
Jul
17
comment function hangs with null case operation
@ypercube No improvement with COALESCE. ISNULL fixed it.
Jul
17
comment function hangs with null case operation
@MartinSmith I don't have permission to check task_state.
Jul
17
comment function hangs with null case operation
The entire function is included in the fiddle.