March 28, 2011 at 7:35 am
Jeff Moden (3/28/2011)
Gianluca Sartori (3/28/2011)
GilaMonster (3/28/2011)
Not trying to start any bashing or pile-ons, but this has to rate high on the list of most useless replies: http://www.sqlservercentral.com/Forums/FindPost1084783.aspxSounds like "OK, just do it".
Totally useless. I wonder what's the sense of such a reply. I wouldn't even waste the time to type it if I had nothing to say.
Considering the number of methods to pull off sequencing, the OP didn't give much information. Of course, that's because the OP is a newbie.
As alluded to in my post there, whoever gave such an assignment to a complete newbie without the assistance of a mentor is a complete moreoff. Even some folks well versed in SQL Server have difficulty in creating and maintaining sequences without them becoming an incredible source of deadlocks and RBAR on steroids. They deserve some very high velocity pork. π
Paul posted a very neat solution some months ago:
http://sqlblog.com/blogs/paul_white/archive/2010/10/18/sequence-tables.aspx
I would wait for more info before suggesting this, though.
-- Gianluca Sartori
March 28, 2011 at 7:38 am
Jeff Moden (3/28/2011)
Gianluca Sartori (3/28/2011)
GilaMonster (3/28/2011)
Not trying to start any bashing or pile-ons, but this has to rate high on the list of most useless replies: http://www.sqlservercentral.com/Forums/FindPost1084783.aspxSounds like "OK, just do it".
Totally useless. I wonder what's the sense of such a reply. I wouldn't even waste the time to type it if I had nothing to say.
Considering the number of methods to pull off sequencing, the OP didn't give much information. Of course, that's because the OP is a newbie.
As alluded to in my post there, whoever gave such an assignment to a complete newbie without the assistance of a mentor is a complete moreoff. Even some folks well versed in SQL Server have difficulty in creating and maintaining sequences without them becoming an incredible source of deadlocks and RBAR on steroids. They deserve some very high velocity pork. π
I think a lot of times they don't realize what they're asking, and the person getting the job doesn't realize what they're getting into. I know I've learned some hard lessons when I didn't really understand the nuts and bolts behind a particular process.
-Ki
March 28, 2011 at 7:42 am
GilaMonster (3/27/2011)
Jeff Moden (3/27/2011)
GilaMonster (3/27/2011)
Jeff Moden (3/27/2011)
Oh yes... I know it's partially correct. I just couldn't understand why anyone who knows of SQL would bring it up even as partial justification for not performing index maintenance.Agreed. It's applicable in such a narrow set of circumstances.
I had someone at a usergroup meeting a couple years back argue for auto_create and auto_update stats off and a job to delete any stats created on the grounds that they're a waste if you're only ever doing single row selects and updates. It's true, but so, so, so few systems are going to be that way that it's dangerous advice because most people aren't going to understand the conditions.
Yowch. Did you ask them if they actually implemented such a thing?
He had. He was stating that it was a good idea and worked well. I could not convince him otherwise (I was giving my 'Lies, damned lies and Statistics presentation) and I wasn't about to get into an argument in the middle of the presentation.
Agreed. The presentation and comfort of the audience comes first. Hopefully the audience walked away never giving his suggestion a second thought other than it may be a really bad idea.
I'm always interested in how folks with more speaking experience than I handle such things. What did you say to him that allowed you to "move on" in the presentation without inciting additional interuption by the lad?
--Jeff Moden
Change is inevitable... Change for the better is not.
March 28, 2011 at 7:45 am
GSquared
β¦Had a copy of Paranoia, but couldn't convince anyone to let me either play or DM, probably out of some desperate need to retain a vestige of sanity on their part. π
Having been the vict⦠I mean player in your universes⦠there is ABSOLUTELY NO WAY I would subject my few remaining brain cells to a world of Paranoia with you at the helm. On the other hand, as a hilarious way to commit suicide (i.e., laughing to death), it just might be amusing enough to try.
-- Kit
March 28, 2011 at 7:53 am
Jeff Moden (3/28/2011)
I'm always interested in how folks with more speaking experience than I handle such things. What did you say to him that allowed you to "move on" in the presentation without inciting additional interuption by the lad?
If I recall (it was over a year ago), it was something along the lines of "We'll have to agree to disagree on that. I need to move on." <change slide, continue on with presentation>
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
March 28, 2011 at 8:01 am
Gianluca Sartori (3/28/2011)
Jeff Moden (3/28/2011)
Gianluca Sartori (3/28/2011)
GilaMonster (3/28/2011)
Not trying to start any bashing or pile-ons, but this has to rate high on the list of most useless replies: http://www.sqlservercentral.com/Forums/FindPost1084783.aspxSounds like "OK, just do it".
Totally useless. I wonder what's the sense of such a reply. I wouldn't even waste the time to type it if I had nothing to say.
Considering the number of methods to pull off sequencing, the OP didn't give much information. Of course, that's because the OP is a newbie.
As alluded to in my post there, whoever gave such an assignment to a complete newbie without the assistance of a mentor is a complete moreoff. Even some folks well versed in SQL Server have difficulty in creating and maintaining sequences without them becoming an incredible source of deadlocks and RBAR on steroids. They deserve some very high velocity pork. π
Paul posted a very neat solution some months ago:
http://sqlblog.com/blogs/paul_white/archive/2010/10/18/sequence-tables.aspx
I would wait for more info before suggesting this, though.
Paul did an excellent job. He kept it from becoming a source of deadlocks by using the special nature of SQL Server's UPDATE so that no explicit transaction over a SELECT/UPDATE pair is needed. Unlike so many other articles on Sequence Numbers, he also allowed for reserving a "range" or "increment" of Sequence Numbers.
I was going to post what I did several years back to solve the same problem (we had an average of 640 deadlocks per day thanks to 3rd party code). But, it looks like the OP came back with what he's doing and Gail sussed the answer.
As a side bar, I have to remember to write an "SQL Spackle" article on how to use the "range" if SQLCLR isn't an option. Until it comes out in Denali, Sequences are a PITA.
--Jeff Moden
Change is inevitable... Change for the better is not.
March 28, 2011 at 9:28 am
GilaMonster (3/28/2011)
Not trying to start any bashing or pile-ons, but this has to rate high on the list of most useless replies: http://www.sqlservercentral.com/Forums/FindPost1084783.aspx
This is a nice example of a case where reading the thread through to the end before posting was prudent. Reading along I was ready to post multiple times but held off until reading the thread. Looks like it is all taken care of - except maybe actually defining a PK (and not just naming the column PK), but you guys told him to redesign anyway.
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
March 28, 2011 at 9:34 am
CirquedeSQLeil (3/28/2011)
GilaMonster (3/28/2011)
Not trying to start any bashing or pile-ons, but this has to rate high on the list of most useless replies: http://www.sqlservercentral.com/Forums/FindPost1084783.aspxThis is a nice example of a case where reading the thread through to the end before posting was prudent. Reading along I was ready to post multiple times but held off until reading the thread. Looks like it is all taken care of - except maybe actually defining a PK (and not just naming the column PK), but you guys told him to redesign anyway.
Tell me about it. I felt foolish for advising him to drop the persisted and do the calc in the INSERT until Gail posted later about redesigning the entire table. Then I felt like I finally might finally be learning this SQL Server stuff after all. @=)
March 28, 2011 at 2:20 pm
Either way, I still think it's a really bad idea to have such sequences write directly into the table.
--Jeff Moden
Change is inevitable... Change for the better is not.
March 28, 2011 at 2:35 pm
Jeff Moden (3/28/2011)
Either way, I still think it's a really bad idea to have such sequences write directly into the table.
Yep. Calculate at runtime, unless it's actually necessary for some later data process.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 28, 2011 at 2:39 pm
For something like this, I would say in most cases to calculate at runtime. However, by the name of the column being used and until that particular OP changes the table design, I think the date+seq would be better suited stored in the table. Calculate the sequence at run-time and then go ahead and store it.
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
March 28, 2011 at 8:59 pm
Would some one here help this OP (and when following the link also note Jeff Moden's request for some one to help the OP)
http://www.sqlservercentral.com/Forums/Topic1085256-9-1.aspx#bm1085260
March 29, 2011 at 1:33 am
bitbucket-25253 (3/28/2011)
Would some one here help this OP (and when following the link also note Jeff Moden's request for some one to help the OP)http://www.sqlservercentral.com/Forums/Topic1085256-9-1.aspx#bm1085260
Took a shot. π
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution π
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
March 29, 2011 at 5:44 am
ALZDBA (3/29/2011)
bitbucket-25253 (3/28/2011)
Would some one here help this OP (and when following the link also note Jeff Moden's request for some one to help the OP)http://www.sqlservercentral.com/Forums/Topic1085256-9-1.aspx#bm1085260
Took a shot. π
Is it sad that when I saw Jeff's comment about the OP in that link being a Pack Leader, my first thought was a puzzled "werewolves???" until I scrolled back?
-Ki
March 29, 2011 at 6:05 am
Kiara (3/29/2011)
ALZDBA (3/29/2011)
bitbucket-25253 (3/28/2011)
Would some one here help this OP (and when following the link also note Jeff Moden's request for some one to help the OP)http://www.sqlservercentral.com/Forums/Topic1085256-9-1.aspx#bm1085260
Took a shot. π
Is it sad that when I saw Jeff's comment about the OP in that link being a Pack Leader, my first thought was a puzzled "werewolves???" until I scrolled back?
Heh... yeah... Werewolves. That explains my affinity towards high velocity pork chops. π
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 15 posts - 25,111 through 25,125 (of 66,738 total)
You must be logged in to reply to this topic. Login to reply