October 20, 2010 at 2:49 pm
LutzM (10/20/2010)
Is it just because I'm in a bad mood today or why do I have the feeling that todays questions are more demanding with even less effort than on other days? Are we approaching any finals, so students are getting nervous?http://www.sqlservercentral.com/Forums/FindPost1007977.aspx
http://www.sqlservercentral.com/Forums/FindPost1007434.aspx
Side note: did you find my reply on the first one being too harsh?
Harsh... no... funny... yes... ๐
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
October 20, 2010 at 2:50 pm
GilaMonster (10/20/2010)
For the second one, check out the thread over at SQLTeam with the same question.
I followed the link you posted and it seems like the OP is not erally willing to try at all. OP's last post so far over there:
Please any 1 paste a code for me, Thanks.
I probably should stop even reading such threads today... Makes me feel even worse...
October 20, 2010 at 3:16 pm
Paul White NZ (10/20/2010)
GSquared (10/20/2010)
I definitely don't. Has all the disadvantages of nested sets and the disadvantages of adjacency, without the advantages of either. It's a "worst of both worlds" scenario.HierarchyID certainly doesn't solve all problems, but it's hardly the 'worst of both worlds'. For graph problems that benefit from a materialized path representation, hierarchyid provides a robust and extremely compact implementation that reduces the need for custom coding. There is also a decent level of support within the query optimizer for it, which can produce exceptionally efficient plans for problems it is well-suited to. Itzik Ben-Gan covers it quite well in his 2008 T-SQL Querying book (pages 706 - 730). He covers Nested Sets in some detail straight afterward.
edit: The other nice thing about hierarchyid is that it is a CLR type - so .NET code can use it directly, either inside SQL Server or outside. Also, there are likely to be some important improvements to hierarchyid in Denali.
Have you implemented it in anything you've done?
--Jeff Moden
Change is inevitable... Change for the better is not.
October 20, 2010 at 3:17 pm
Stefan Krzywicki (10/20/2010)
ALZDBA (10/20/2010)
GSquared (10/20/2010)
Jeff Moden (10/19/2010)
Steve Jones - SSC Editor (9/21/2010)
Paul White NZ (9/21/2010)
...The current SQL development model is to address a small number of main product features in each new major release. The downside to that is that the shiny new features introduced last time are unlikely to get much love in the following release (bug fixes and small impact enhancements only).
I'd agree. The improvements to features are slow to come. The engine stability, and speed seems to improve, but other features barely move at times. It took a number of evolutions for log shipping to improve, maintenance plans have hardly moved and still have bugs. MS doesn't seem to want to look back. I still see SSRS issues that have been around, even though the product gets lots more shiny new controls all the time.
I'd rather see improvements to Pivot and Unpivot. MS Access version of Pivot is the bee's-knees compared to SQL Server's Pivot.
That notwithstanding, how many of you use the "wonderful" new HierarchyID datatype?
I definitely don't. Has all the disadvantages of nested sets and the disadvantages of adjacency, without the advantages of either. It's a "worst of both worlds" scenario.
Dito.
And it only serves a single purpose. i.e. strict hierarchy.
Ever tried building a family tree ?
Actually, with a little fiddling, you should be able to do multiple roots and many to many parents, but it isn't easy and I haven't tested it yet as I don't see any benefits over the old way.
How about you? Have you actually used it?
--Jeff Moden
Change is inevitable... Change for the better is not.
October 20, 2010 at 3:20 pm
Jeff Moden (10/20/2010)
Paul White NZ (10/20/2010)
GSquared (10/20/2010)
I definitely don't. Has all the disadvantages of nested sets and the disadvantages of adjacency, without the advantages of either. It's a "worst of both worlds" scenario.HierarchyID certainly doesn't solve all problems, but it's hardly the 'worst of both worlds'. For graph problems that benefit from a materialized path representation, hierarchyid provides a robust and extremely compact implementation that reduces the need for custom coding. There is also a decent level of support within the query optimizer for it, which can produce exceptionally efficient plans for problems it is well-suited to. Itzik Ben-Gan covers it quite well in his 2008 T-SQL Querying book (pages 706 - 730). He covers Nested Sets in some detail straight afterward.
edit: The other nice thing about hierarchyid is that it is a CLR type - so .NET code can use it directly, either inside SQL Server or outside. Also, there are likely to be some important improvements to hierarchyid in Denali.
Have you implemented it in anything you've done?
I have a guy in my shop that's put it to work. No negative, or positive, reports so far.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
October 20, 2010 at 3:20 pm
GSquared (10/20/2010)
it's been worse than every other standard hierarchy implementation that I know of
What do you mean, Gus? How has it been worse? Implementation, performance, easy of maintenance, useage, or ????
--Jeff Moden
Change is inevitable... Change for the better is not.
October 20, 2010 at 4:05 pm
I know that some of these people are annoying, but let's try not to pile on too much. Just post that you expect them to do some work, or something similar that's professional and let them respond. Seems like we're getting a few too many people overwhelming the OP and I think some of them are getting scared of responding when there are 4 or 5 replies that are in essence, beating them up a bit.
October 20, 2010 at 6:27 pm
Alvin Ramard (10/19/2010)
Tom.Thomson (10/19/2010)
I found this response http://www.sqlservercentral.com/Forums/FindPost1007296.aspx to a typical Celko post quite amusing.Your link doesn't work. There's a single quote at the end of the url. I removed it from the quote above.
Your post and my edit fixing the problem appear to have crossed somehwre in the intertubes.
Tom
October 20, 2010 at 6:30 pm
CirquedeSQLeil (10/19/2010)
I just had my rear windshield shot out as I was pulling into my driveway. Called the police to report it. They won't come out and investigate unless i have the casings. They want me to file the report online. How absolutely moronic is that?
Sounds as if your local force is a bit like a typical Brit one.
Tom
October 20, 2010 at 7:18 pm
jcrawf02 (10/20/2010)
jcrawf02 (10/19/2010)
...and, because I'm a complete and utter dork, it's almost 5, and I think it's funny, I'll repeat a poll I did at work today, assuming you guys will get it much faster.If I said something was "For the greater good", would you get the literary reference, and what do you think it was from?
[/quote-0]Harry Potter, actually, which is why it was so damn funny, people guessing real literature like Animal Farm. Surprised that I'm the biggest dork in the group.... :hehe:
Oh dear. The HP book in which it turned up dates from 2007, doesn't it?
So if that's the first use in literature, how did all the use of the phrase in things like the Northwest Association for Biomedical Research's curriculum guide in 2004 come about? (NWBR even used this famous quotation as the title of their curriculum guide, as well as splattering it about throughout the document and naming a whole programme by it). The phrase was also the title of an article by Professor Sir Bob Hepple several years before it occurred in HP. And before that "Grass Fed for the Greater Good" was an article in the debate about mad cow disease in the USA. There's Bonnie Koenig's book "Going Global for the Greater Good" too. Anyway, I suspect that the source of most of these uses of the phrase was Alexis de Tocqueville, who died in 1859, which is quite a long time before any Harry Potter books or films appeared on the scene.
Tom
October 20, 2010 at 7:32 pm
Tom.Thomson (10/20/2010)
jcrawf02 (10/20/2010)
jcrawf02 (10/19/2010)
...and, because I'm a complete and utter dork, it's almost 5, and I think it's funny, I'll repeat a poll I did at work today, assuming you guys will get it much faster.If I said something was "For the greater good", would you get the literary reference, and what do you think it was from?
[/quote-0]Harry Potter, actually, which is why it was so damn funny, people guessing real literature like Animal Farm. Surprised that I'm the biggest dork in the group.... :hehe:
Oh dear. The HP book in which it turned up dates from 2007, doesn't it?
So if that's the first use in literature, how did all the use of the phrase in things like the Northwest Association for Biomedical Research's curriculum guide in 2004 come about? (NWBR even used this famous quotation as the title of their curriculum guide, as well as splattering it about throughout the document and naming a whole programme by it). The phrase was also the title of an article by Professor Sir Bob Hepple several years before it occurred in HP. And before that "Grass Fed for the Greater Good" was an article in the debate about mad cow disease in the USA. There's Bonnie Koenig's book "Going Global for the Greater Good" too. Anyway, I suspect that the source of most of these uses of the phrase was Alexis de Tocqueville, who died in 1859, which is quite a long time before any Harry Potter books or films appeared on the scene.
ha! yes, but it's all so very funny because I was just being stupid, and people assumed that it actually meant something. Probably funnier to me...:hehe:
---------------------------------------------------------
How best to post your question[/url]
How to post performance problems[/url]
Tally Table:What it is and how it replaces a loop[/url]
"stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."
October 20, 2010 at 7:36 pm
Stefan Krzywicki (10/20/2010)
Ugh, I'm always telling people the importance of documentation and I've just been bitten by it myself! I'd put together a fairly complex query to remove duplicates from a large table and today I needed to go back and check to work on finding an anomalie in the data and I didn't document the stored procedure! I have to go through the whole thing and figure out what it is doing at each step.Fortunately, since I wrote it and it is well written ๐ I just have to read it and I remember what I was doing. It isn't taking too long, but what a good reminder that I should practice what I preach.
I'm taking this opportunity to document it!
What makes you think documentation would have helped? I can provide some anecdotal evidence that documentation tells you nothing.
I remember (with embarrassment) some code I wrote in the 70s. Quite a small chunk of code. Since it was a critical chunk, it was documented - and the document was longer than the code, as you would expect.
It went through unit test, peer review, system test, and final validation, and was released. It was installed on many customer machines, and was called on every one of them many times per minute (there was a timer that kicked it off regularly). It appeared to work - for 18 months, there was no problem. After 18 months, a problem cropped up: it appeared to be in this code, so I ended up looking at it; I got my number two to look at it, because I didn't understand. He didn't understand either. Neither of us could see what the documentation was getting at (although one of us had written it and the other had reviewed and cleared it). Despite the rotten thing having worked for many customers on many machines for 18 months (having been invoked at least two hundred million times without any problem - this had been a release that had our worst critics switching to paeans of praise for our software) and despite there being documentation, neither of us could understand how it had ever worked even once.
Despite this, I still think documentation is a good idea - there is always some chance that it will help, even if there are no guarantees.
Tom
October 20, 2010 at 7:48 pm
Jeff Moden (10/20/2010)
Stefan Krzywicki (10/20/2010)
ALZDBA (10/20/2010)
GSquared (10/20/2010)
Jeff Moden (10/19/2010)
Steve Jones - SSC Editor (9/21/2010)
Paul White NZ (9/21/2010)
...The current SQL development model is to address a small number of main product features in each new major release. The downside to that is that the shiny new features introduced last time are unlikely to get much love in the following release (bug fixes and small impact enhancements only).
I'd agree. The improvements to features are slow to come. The engine stability, and speed seems to improve, but other features barely move at times. It took a number of evolutions for log shipping to improve, maintenance plans have hardly moved and still have bugs. MS doesn't seem to want to look back. I still see SSRS issues that have been around, even though the product gets lots more shiny new controls all the time.
I'd rather see improvements to Pivot and Unpivot. MS Access version of Pivot is the bee's-knees compared to SQL Server's Pivot.
That notwithstanding, how many of you use the "wonderful" new HierarchyID datatype?
I definitely don't. Has all the disadvantages of nested sets and the disadvantages of adjacency, without the advantages of either. It's a "worst of both worlds" scenario.
Dito.
And it only serves a single purpose. i.e. strict hierarchy.
Ever tried building a family tree ?
Actually, with a little fiddling, you should be able to do multiple roots and many to many parents, but it isn't easy and I haven't tested it yet as I don't see any benefits over the old way.
How about you? Have you actually used it?
Nope, all I've done with it so far is research it, work out if it could be more flexible than it seems (I think it can) and teach the .Net programmer about it so he could use it. I don't know if he has or not.
--------------------------------------
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
October 20, 2010 at 7:52 pm
Tom.Thomson (10/20/2010)
Stefan Krzywicki (10/20/2010)
Ugh, I'm always telling people the importance of documentation and I've just been bitten by it myself! I'd put together a fairly complex query to remove duplicates from a large table and today I needed to go back and check to work on finding an anomalie in the data and I didn't document the stored procedure! I have to go through the whole thing and figure out what it is doing at each step.Fortunately, since I wrote it and it is well written ๐ I just have to read it and I remember what I was doing. It isn't taking too long, but what a good reminder that I should practice what I preach.
I'm taking this opportunity to document it!
What makes you think documentation would have helped? I can provide some anecdotal evidence that documentation tells you nothing.
I remember (with embarrassment) some code I wrote in the 70s. Quite a small chunk of code. Since it was a critical chunk, it was documented - and the document was longer than the code, as you would expect.
It went through unit test, peer review, system test, and final validation, and was released. It was installed on many customer machines, and was called on every one of them many times per minute (there was a timer that kicked it off regularly). It appeared to work - for 18 months, there was no problem. After 18 months, a problem cropped up: it appeared to be in this code, so I ended up looking at it; I got my number two to look at it, because I didn't understand. He didn't understand either. Neither of us could see what the documentation was getting at (although one of us had written it and the other had reviewed and cleared it). Despite the rotten thing having worked for many customers on many machines for 18 months (having been invoked at least two hundred million times without any problem - this had been a release that had our worst critics switching to paeans of praise for our software) and despite there being documentation, neither of us could understand how it had ever worked even once.
Despite this, I still think documentation is a good idea - there is always some chance that it will help, even if there are no guarantees.
Because I would have written the documentation, because history has shown that my documentation helps me remember what I was doing and because I wrote this only a month or two ago. ๐
While there's always the chance documentation made sense while you were writing it and now doesn't, just like the code, it certainly has a better chance of helping than not having it at all. I think it is generally worth the time and effort, though obviously there are times it might as well not be there.
--------------------------------------
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
October 20, 2010 at 9:35 pm
Stefan Krzywicki (10/20/2010)
While there's always the chance documentation made sense while you were writing it and now doesn't, just like the code, it certainly has a better chance of helping than not having it at all. I think it is generally worth the time and effort, though obviously there are times it might as well not be there.
That, and formatted code that is actually easy to read. I've seen several different styles here, and you'll have seen mine. But those that have every new line starting in the 1 character of the line are impossible... (I only work on those if the problem interests me, or if I think I can learn something by doing it - but I'm veering off on a tangent now...)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
Viewing 15 posts - 20,686 through 20,700 (of 66,815 total)
You must be logged in to reply to this topic. Login to reply