November 8, 2011 at 6:48 am
GilaMonster (11/8/2011)
Clustered indexes enforce physical sort order of rowsNonclustered indexes can't be built on a heap
Nonclustered indexes on a heap can't be rebuilt
Hey Jason, did you get that? :w00t:
How about these?
Query results will be returned in index order.
Triggers fire for each row.
Triggers are not part of a transaction
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
November 8, 2011 at 6:48 am
L' Eomot Inversé (11/7/2011)
Gianluca Sartori (11/7/2011)
Totally different topic: this thread asks how to format datetime values in T-SQL.I think this is a very bad habit to kick and I put together an article (well, it was meant to be a post for my blog, but I'm sure it would have a larger audience here).
Is anyone interested in taking a look at the draft and give some feedback?
I think the "no presentation in sql" mantra is rolled out far too often without consideration for the real situation on the ground.
If you are lucky to be far enough up the tree that you have the power to enforce good modularity, good interface design, and have got involved early enough to be effective, you may be able to insist, for example, that the datetime format at the DB interface is ISO 8601 (or ODBC canonical if you prefer a space to a 'T') - or you may not; if your database is being used in conjunction for the website or a Mosque you may have to accept Hijiri format at the interface); you won't be able to insist on passing datetime2 because pretty well none of the application languages have such a type. Most of us of course are not that lucky - we arrive on the scene after wrong decisions have been taken and some of them have become irreversible (often that's why we arrive on the scene). or maybe we find that the interface definitions are being done by an incompetent who reached his/her current unassailably senior position through lateral sublimation after the Peter principle had taken her/him somewhere beyond his capabilities, and who believes that his nonsensical whims are the very gospel of interface design and modularity. Often that means we need to convert dates and times to strings in some defined format before passing them up to the application. Pretending that it doesn't happen, or that when it does happen the poor DBA should magically find a way of not doing the conversion in SQL, is just plain stupid.
Have to agree. Sometimes, you have very few options that aren't bad, and you have to pick the one that isn't singing that Michael Jackson song.
However, I still always suggest moving it to the presentation layer, just in case that can be done. No reason to assume it's been thought through and carefully decided that it needs to be in the database.
- 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
November 8, 2011 at 6:49 am
Roy Ernest (11/8/2011)
Hey everyone, I am hijacking the thread with an "Off Topic"I am planning on a presentation for my user group "DBA MythBusters" (Courtesy Paul Randal) His idea is brilliant. It is a fun filled session. I would like to do one like that for our user group. If anybody have suggestions on what Myth to bust please, please let me know. The audience is 100 to 200 level.
Just make sure to use the joke from The Muppet Movie, and you'll be just fine.
- 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
November 8, 2011 at 6:52 am
I am getting more and more ideas to make this as a series. 🙂 This is good. Thx everyone for giving me ideas. If you have more, please keep it coming.
-Roy
November 8, 2011 at 7:01 am
Roy Ernest (11/8/2011)
I am getting more and more ideas to make this as a series. 🙂 This is good. Thx everyone for giving me ideas. If you have more, please keep it coming.
I'm sure you've already got the usual rant about auto-shrinks?
-Ki
November 8, 2011 at 7:25 am
Roy Ernest (11/8/2011)
Hey everyone, I am hijacking the thread with an "Off Topic"I am planning on a presentation for my user group "DBA MythBusters" (Courtesy Paul Randal) His idea is brilliant. It is a fun filled session. I would like to do one like that for our user group. If anybody have suggestions on what Myth to bust please, please let me know. The audience is 100 to 200 level.
You might want to visit Gails blog on A Trio of Table Variables[/url] (you might remember these from my presentation to your group...)
And for good measure, modify the first one to do a single record insert into a #temp table, and show how that wasn't written to disk (the myth being that folks think that #temp tables are ALWAYS written to disk).
You should have the PP slide deck of my presentation to your group on table vars/temp tables... there is a slide in there from a MS KB that states that either can be entirely in memory.
This does sound like a fun topic, and indeed it is very fun participating at Paul's session. Will you let us Threadizens put this out to our local User Groups? Maybe a collaboration effort?
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 8, 2011 at 7:27 am
Jack Corbett (11/8/2011)
GilaMonster (11/8/2011)
Clustered indexes enforce physical sort order of rowsNonclustered indexes can't be built on a heap
Nonclustered indexes on a heap can't be rebuilt
Hey Jason, did you get that? :w00t:
How about these?
Query results will be returned in index order.
Triggers fire for each row.
Triggers are not part of a transaction
And a tangent to your first... query results will be returned in CLUSTERED index order
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 8, 2011 at 7:31 am
GilaMonster (11/8/2011)
Clustered indexes enforce physical sort order of rowsNonclustered indexes can't be built on a heap
Nonclustered indexes on a heap can't be rebuilt
I've never heard that third one.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 8, 2011 at 7:32 am
GSquared (11/8/2011)
Roy Ernest (11/8/2011)
Hey everyone, I am hijacking the thread with an "Off Topic"I am planning on a presentation for my user group "DBA MythBusters" (Courtesy Paul Randal) His idea is brilliant. It is a fun filled session. I would like to do one like that for our user group. If anybody have suggestions on what Myth to bust please, please let me know. The audience is 100 to 200 level.
Just make sure to use the joke from The Muppet Movie, and you'll be just fine.
For the uninitiated (yeah, that would be me), what's the joke from the Muppet Movie?
November 8, 2011 at 7:39 am
WayneS (11/8/2011)
GilaMonster (11/8/2011)
Clustered indexes enforce physical sort order of rowsNonclustered indexes can't be built on a heap
Nonclustered indexes on a heap can't be rebuilt
I've never heard that third one.
It was a question yesterday. Not sure it's a huge myth tho...
November 8, 2011 at 7:40 am
Roy Ernest (11/8/2011)
Hey everyone, I am hijacking the thread with an "Off Topic"I am planning on a presentation for my user group "DBA MythBusters" (Courtesy Paul Randal) His idea is brilliant. It is a fun filled session. I would like to do one like that for our user group. If anybody have suggestions on what Myth to bust please, please let me know. The audience is 100 to 200 level.
This would get beyond your 100-200 level, but how about a clustered index enforces that the data in the table is physically stored on disk (in the pages) in order of the CI key? (would take you into page internals, slot array, page splits)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 8, 2011 at 8:47 am
FYI
Here's an article on Denali prices and licensing info:
November 8, 2011 at 8:53 am
Jan Van der Eecken (11/8/2011)
GSquared (11/8/2011)
Roy Ernest (11/8/2011)
Hey everyone, I am hijacking the thread with an "Off Topic"I am planning on a presentation for my user group "DBA MythBusters" (Courtesy Paul Randal) His idea is brilliant. It is a fun filled session. I would like to do one like that for our user group. If anybody have suggestions on what Myth to bust please, please let me know. The audience is 100 to 200 level.
Just make sure to use the joke from The Muppet Movie, and you'll be just fine.
For the uninitiated (yeah, that would be me), what's the joke from the Muppet Movie?
There's a repeating joke in The Muppet Movie where someone will say, "Myth! Myth!", and an actress with a lisp will respond "Yeth?" I think the first use of it is Kermit telling someone that getting warts from a frog, "That's a myth! Myth!" and (Carol Kane?) pops up, "Yeth?" It's in the scene where he meets Fozzie.
(I saw the movie when it first came out. How bad is it that I remember that joke?)
- 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
November 8, 2011 at 8:56 am
Jack Corbett (11/8/2011)
GilaMonster (11/8/2011)
Clustered indexes enforce physical sort order of rowsNonclustered indexes can't be built on a heap
Nonclustered indexes on a heap can't be rebuilt
Hey Jason, did you get that? :w00t:
Better repeat it a few more times:-D
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 8, 2011 at 8:58 am
Ninja's_RGR'us (11/8/2011)
WayneS (11/8/2011)
GilaMonster (11/8/2011)
Clustered indexes enforce physical sort order of rowsNonclustered indexes can't be built on a heap
Nonclustered indexes on a heap can't be rebuilt
I've never heard that third one.
It was a question yesterday. Not sure it's a huge myth tho...
Yeah - not really a myth - yet.
Just a fluke I had run into.;-)
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
Viewing 15 posts - 31,486 through 31,500 (of 66,749 total)
You must be logged in to reply to this topic. Login to reply