November 10, 2011 at 7:04 am
Kiara (11/10/2011)
Ninja's_RGR'us (11/10/2011)
SQL Kiwi (11/10/2011)
Ninja's_RGR'us (11/10/2011)
Actually I caught the very moment it happened!You need a hobby.
Right back at ya :hehe:.
Father in hospital, house flooded. Need some R&R atm.
Sorry to hear this - hope things get better soon.
We're waiting on an OR & date. He's on top of the list. He needs an open heart surgury to fix 5 different problems. That's 10 hours on the table with the heart stopped when everything goes according to plan.
Let's just say nobody's thrilled about that at the moment.
November 10, 2011 at 7:07 am
Kiara (11/10/2011)
In case y'all haven't seen this.. http://thedailywtf.com/Articles/The-Query-of-Despair.aspx...I'm sure we've all had days like that...
I inherited a query like that back in 99. It was a 500 line query with lots of unions. I got it down to a 50 line query with no unions. It ran better too. ๐
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
Itโs unpleasantly like being drunk.
Whatโs so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
November 10, 2011 at 7:08 am
Kiara (11/10/2011)
In case y'all haven't seen this.. http://thedailywtf.com/Articles/The-Query-of-Despair.aspx...I'm sure we've all had days like that...
Yup noone WANTS to help... if they could.
Reminds me of the first billing system I wrote. The mean select was only 4-5 rows of code but that all went into functions from then on out.
Granted it was formatted code, but it still spawned 26 word pages!
Ironically enough it ran 100 times faster than the old code :hehe:.
November 10, 2011 at 7:13 am
Stefan Krzywicki (11/10/2011)
Kiara (11/10/2011)
In case y'all haven't seen this.. http://thedailywtf.com/Articles/The-Query-of-Despair.aspx...I'm sure we've all had days like that...
I inherited a query like that back in 99. It was a 500 line query with lots of unions. I got it down to a 50 line query with no unions. It ran better too. ๐
I think this is my worst one here atm.
39 pages in word, 6688 words!
This is for a SINGLE report for a SINGLE user! ๐
Oh and there's 2 version of the proc :blink:.
November 10, 2011 at 7:14 am
Stefan Krzywicki (11/10/2011)
Kiara (11/10/2011)
In case y'all haven't seen this.. http://thedailywtf.com/Articles/The-Query-of-Despair.aspx...I'm sure we've all had days like that...
I inherited a query like that back in 99. It was a 500 line query with lots of unions. I got it down to a 50 line query with no unions. It ran better too. ๐
I'm trying to make some time to go after a rather nasty trigger we've got here with a recursive CTE in the middle of it. Ugly, ugly, ugly. I'm still reverse-engineering the business logic, though - I'm not going to touch it until I actually understand what it's trying to accomplish. But it sits out there, taunting me, and keeps making it closer and closer to the top of the "must tackle now" list...
-Ki
November 10, 2011 at 7:16 am
Ninja's_RGR'us (11/10/2011)
Stefan Krzywicki (11/10/2011)
Kiara (11/10/2011)
In case y'all haven't seen this.. http://thedailywtf.com/Articles/The-Query-of-Despair.aspx...I'm sure we've all had days like that...
I inherited a query like that back in 99. It was a 500 line query with lots of unions. I got it down to a 50 line query with no unions. It ran better too. ๐
I think this is my worst one here atm.
This is for a SINGLE report for a SINGLE user! ๐
Oh and there's 2 version of the proc :blink:.
At least it is formatted : -)
And of course there's 2 versions, you wouldn't want to miss the chance to call the wrong one!
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
Itโs unpleasantly like being drunk.
Whatโs so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
November 10, 2011 at 7:18 am
Kiara (11/10/2011)
Stefan Krzywicki (11/10/2011)
Kiara (11/10/2011)
In case y'all haven't seen this.. http://thedailywtf.com/Articles/The-Query-of-Despair.aspx...I'm sure we've all had days like that...
I inherited a query like that back in 99. It was a 500 line query with lots of unions. I got it down to a 50 line query with no unions. It ran better too. ๐
I'm trying to make some time to go after a rather nasty trigger we've got here with a recursive CTE in the middle of it. Ugly, ugly, ugly. I'm still reverse-engineering the business logic, though - I'm not going to touch it until I actually understand what it's trying to accomplish. But it sits out there, taunting me, and keeps making it closer and closer to the top of the "must tackle now" list...
The only ones I hate more than the kind where no-one seems to know what it does, why it does it or exactly how are the ones that turn out to do nothing useful or nothing at all once you've figured out what it does.
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
Itโs unpleasantly like being drunk.
Whatโs so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
November 10, 2011 at 7:21 am
At least it is formatted : -)
And of course there's 2 versions, you wouldn't want to miss the chance to call the wrong one!
Wouldn't be the worst thing. It's obvious you got the wrong subset of data and ironically enough it runs in only 2 - 20 seconds depending on what you need ;-).
I think just the compile time must be around 1 sec! ๐
November 10, 2011 at 7:38 am
Got another puzzle for you guys and possibly another bug (row_number, partition by & cte).
http://www.sqlservercentral.com/Forums/Topic1203532-266-1.aspx
November 10, 2011 at 8:07 am
Kiara (11/10/2011)
Stefan Krzywicki (11/10/2011)
Kiara (11/10/2011)
In case y'all haven't seen this.. http://thedailywtf.com/Articles/The-Query-of-Despair.aspx...I'm sure we've all had days like that...
I inherited a query like that back in 99. It was a 500 line query with lots of unions. I got it down to a 50 line query with no unions. It ran better too. ๐
I'm trying to make some time to go after a rather nasty trigger we've got here with a recursive CTE in the middle of it. Ugly, ugly, ugly. I'm still reverse-engineering the business logic, though - I'm not going to touch it until I actually understand what it's trying to accomplish. But it sits out there, taunting me, and keeps making it closer and closer to the top of the "must tackle now" list...
Hi Ki
How about posting up the rCTE bit?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 10, 2011 at 8:09 am
SQL Kiwi (11/10/2011)
Ninja's_RGR'us (11/10/2011)
Actually I caught the very moment it happened!You need a hobby.
I think he has a hobby. He needs a new hobby.;-)
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
November 10, 2011 at 8:11 am
Ninja's_RGR'us (11/10/2011)
Got another puzzle for you guys and possibly another bug (row_number, partition by & cte).http://www.sqlservercentral.com/Forums/Topic1203532-266-1.aspx
Gave it an initial shot. Want to see what your answer is before I delve further into it.
November 10, 2011 at 8:12 am
Ninja's_RGR'us (11/10/2011)
SQL Kiwi (11/10/2011)
Ninja's_RGR'us (11/10/2011)
Actually I caught the very moment it happened!You need a hobby.
Right back at ya :hehe:.
Father in hospital, house flooded. Need some R&R atm.
Not good - hope things get better quickly.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
November 10, 2011 at 8:14 am
Ninja's_RGR'us (11/10/2011)
Kiara (11/10/2011)
Ninja's_RGR'us (11/10/2011)
SQL Kiwi (11/10/2011)
Ninja's_RGR'us (11/10/2011)
Actually I caught the very moment it happened!You need a hobby.
Right back at ya :hehe:.
Father in hospital, house flooded. Need some R&R atm.
Sorry to hear this - hope things get better soon.
We're waiting on an OR & date. He's on top of the list. He needs an open heart surgury to fix 5 different problems. That's 10 hours on the table with the heart stopped when everything goes according to plan.
Let's just say nobody's thrilled about that at the moment.
Man, that's awful Remi.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 10, 2011 at 8:17 am
SQLRNNR (11/10/2011)
SQL Kiwi (11/10/2011)
Ninja's_RGR'us (11/10/2011)
Actually I caught the very moment it happened!You need a hobby.
I think he has a hobby. He needs a new hobby.;-)
I have one, but summer's over :-D.
Viewing 15 posts - 31,591 through 31,605 (of 66,749 total)
You must be logged in to reply to this topic. Login to reply