Author |
Topic |
spirit1
Cybernetic Yak Master
11752 Posts |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-05-13 : 15:11:56
|
47 minutes? E 12°55'05.63"N 56°04'39.26" |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2009-05-13 : 15:18:16
|
yes. there are a lot of myths ___________________________________________________________________________Causing trouble since 1980Blog: http://weblogs.sqlteam.com/mladenpSpeed up SSMS development: www.ssmstoolspack.com <- version 1.5 out! |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2009-05-13 : 15:23:12
|
Bill's ClearTrace is mentioned as a great tool to analyze SQL Trace files.___________________________________________________________________________Causing trouble since 1980Blog: http://weblogs.sqlteam.com/mladenpSpeed up SSMS development: www.ssmstoolspack.com <- version 1.5 out! |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2009-05-13 : 15:34:08
|
Anyone have any favorite SQL Server myths?CODO ERGO SUM |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2009-05-13 : 15:53:48
|
my top 3:1. backups always restore with no problems.2. CI defines ordering.3. only sprocs save exec plans.___________________________________________________________________________Causing trouble since 1980Blog: http://weblogs.sqlteam.com/mladenpSpeed up SSMS development: www.ssmstoolspack.com <- version 1.5 out! |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2009-05-13 : 17:20:25
|
1) SQL uses 1 thread per data file to write data2) Order of conditions in where clause affects how the query is run3) Temp tables are written to disk and table variables are memory only--Gail ShawSQL Server MVP |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2009-05-13 : 17:28:19
|
quote: Originally posted by GilaMonster 1) SQL uses 1 thread per data file to write data2) Order of conditions in where clause affects how the query is run3) Temp tables are written to disk and table variables are memory only--Gail ShawSQL Server MVP
I see 2 and 3 a LOT .. Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2009-05-13 : 17:37:52
|
1. SQL Server can't lock rows, only pages (I've seen this published less than 3 years ago, something for Oracle)2. SQL Server stores locks on disk, causing deadlocks/timeouts/whatever (probably because Access does this)3. NEVER use temp tables, ALWAYS use table variables3a. Because table variables ALWAYS stay in RAM, and temp tables NEVER leave disk3b. Because table variables stay in RAM, it doesn't matter that you can't index them4. There's no good documentation for SQL ServerPartial |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2009-05-14 : 04:24:18
|
1) My code must be set based because I'm not using a CURSOR?Guess that's not really a database *engine* myth though.Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-05-14 : 04:37:10
|
quote: Originally posted by GilaMonster 2) Order of conditions in where clause affects how the query is run
This is actually true for SQL Server 2005 See http://weblogs.sqlteam.com/peterl/archive/2007/09/27/SQL-Server-2005-too-smart.aspxThis is also documented in Books Online herehttp://msdn.microsoft.com/en-us/library/ms143359(SQL.90).aspx(section Transact-SQL, Expressions in queries) E 12°55'05.63"N 56°04'39.26" |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2009-05-14 : 07:21:35
|
SQL Server is not for Enterprise applications. Everything should be done by .NET , not a DBA. You could use notepad to store the data.[Signature]For fast help, follow this link:http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxLearn SQL or How to sell Used CarsFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2009-05-14 : 09:46:42
|
quote: Originally posted by DonAtWork... You could use notepad to store the data...
We had a consultant a few years back who advocated getting rid of databases and storing everything in XML files.At least we didn't try to implement that idea. After he explained his grand vision to IT management, they got rid of him the next day.CODO ERGO SUM |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2009-05-14 : 12:56:10
|
That's too bad, you should have let him try it. Wait a minute...so you've actually met Whitefang? |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2009-05-14 : 16:52:42
|
quote: Originally posted by Peso
quote: Originally posted by GilaMonster 2) Order of conditions in where clause affects how the query is run
This is actually true for SQL Server 2005
Not quite what I meant. Was more talking about the myth that WHERE ColA = @Var1 AND ColB = @Var2WHERE ColB = @Var2 AND ColA = @Var1will perform differently.--Gail ShawSQL Server MVP |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-05-14 : 16:59:44
|
quote: Originally posted by GilaMonster
quote: Originally posted by Peso
quote: Originally posted by GilaMonster 2) Order of conditions in where clause affects how the query is run
This is actually true for SQL Server 2005
Not quite what I meant. Was more talking about the myth that WHERE ColA = @Var1 AND ColB = @Var2WHERE ColB = @Var2 AND ColA = @Var1will perform differently.--Gail ShawSQL Server MVP
A MS certified teacher told me that if an index is in order ColA ColB that should be considered in WHERE-Clause.If that is true, it makes sense to have a look at order of columns in WHERE-Clause. No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2009-05-14 : 17:44:22
|
quote: Originally posted by webfred
quote: Originally posted by GilaMonster
quote: Originally posted by Peso
quote: Originally posted by GilaMonster 2) Order of conditions in where clause affects how the query is run
This is actually true for SQL Server 2005
Not quite what I meant. Was more talking about the myth that WHERE ColA = @Var1 AND ColB = @Var2WHERE ColB = @Var2 AND ColA = @Var1will perform differently.--Gail ShawSQL Server MVP
A MS certified teacher told me that if an index is in order ColA ColB that should be considered in WHERE-Clause.If that is true, it makes sense to have a look at order of columns in WHERE-Clause. No, you're never too old to Yak'n'Roll if you're too young to die.
I think SQL Server is smart enough to figure out that both columns are in the index and use the index whatever order they occur in the WHERE clause.CODO ERGO SUM |
|
|
pootle_flump
1064 Posts |
Posted - 2009-05-15 : 05:35:16
|
quote: Originally posted by robvolk 4. There's no good documentation for SQL Server
I've never heard that. The docs are awesome. I thought everyone knew this. |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2009-05-15 : 06:50:25
|
Well, no one who posts here lately. I've had 5-6 replies in a row the past few weeks that were "check Books Online". Had more than one ask afterwards, "can you post an example or article?" They can't imagine that information could already be on their computer without needing the internet, but they also can't even Google it. |
|
|
pootle_flump
1064 Posts |
Posted - 2009-05-15 : 07:07:00
|
Ah - you mean people are too lazy to even consider looking stuff up? Oh yes - definitely. I thought you meant people were saying "I've checked out the SQL Server docs and they suck". |
|
|
Next Page
|