MSSQL Book (13)

1 Name: #!/usr/bin/anonymous : 2008-03-18 15:34 ID:f/e4l9gj

Can anyone recommend me a good book about Microsoft SQL Server? I'm interested in advanced topics about performance tuning, design and optimization.

2 Name: #!/usr/bin/anonymous : 2008-03-23 12:20 ID:fUxRJ4rR

why microsoft's sql specifically?? mysql is soo much better. i highly recommend mysql.

3 Name: #!/usr/bin/anonymous : 2008-03-23 14:00 ID:Heaven

>>2

mysql is garbage.

at one point it was faster than other "sql servers" because it did a lot of things wrong and didn't support a lot of useful features.

now it supports many of those features and is now a lot slower than other "sql servers".

heck, mysql is slower and buggier than sqlite.

>>1

mssql like most other sql servers will see the most performance boosts from better queries. the query analyzer can really help nail that down. if you're trying to tune for some vendor's application (where you don't control the queries) you should really ask the vendor what they recommend. "tuning" sql server in these situations is a good way to make sure you won't get support for their application in the future.

such is the high price of proprietary software...

4 Name: #!/usr/bin/anonymous : 2008-03-23 20:25 ID:Heaven

I recommend postgres, and suspect >>2 has little real-world experience.

5 Name: #!/usr/bin/anonymous : 2008-03-23 23:41 ID:Heaven

>>3

To be fair, SQLite is pretty quick sometimes.

Maybe what you really should say is this: Most people who only use MySQL because it's all they know would probably be better off with SQLite.

6 Name: #!/usr/bin/anonymous : 2008-03-24 11:48 ID:/KbZbVhZ

I recommend learning at least 3 database systems so that you get a sense for which features are more applicable to all systems, vs. which features only work on a couple. This way you can write more portable applications.

7 Name: #!/usr/bin/anonymous : 2008-03-25 08:31 ID:Heaven

Shut up, everyone! No one asked or cares about your RDBMS preferences. Not every fucking thread has to be turned in your religion wars.

8 Name: #!/usr/bin/anonymous : 2008-03-25 09:41 ID:f/e4l9gj

>>3

> mssql like most other sql servers will see the most performance boosts from better queries

That's a part of what I'm looking for - a decent book that explains how to write better queries. Query Analyzer, while nice, gets you only so far. OK, so a "Clustered Index Scan" takes 83% of execution time, so what? Can I improve that? Rewriting query, creating different indexes, rearranging tables, what, how?

Also, I don't think your statement stands true, for the most time. Only if queries are written by someone really inexperienced. It's the proper indexes, that give the biggest performance boost.

And there's a lot more than just better queries and good indexes. I want to know more about benchmarking and profiling, I need to normalize data, tighten schema, I need to know where to partition tables (vertical, horizontal), I need to know more about indexes, statistics, hints, of course, built-in functions and features and who knows what more..

For example, do yo know about the so called "parameter sniffing" in MSSQL? I wrote a query, it's all nice - executes in a few sec, then I drop, exactly the same code, in a stored procedure - now it takes more than a min. Guess where's the problem? I don't want shit like this happening!

9 Name: #!/usr/bin/anonymous : 2008-03-26 00:34 ID:Heaven

>>7
You should give Buddhism a try, it'll make you more zen-like, and you'll be less worried about internet trolls.

10 Name: #!/usr/bin/anonymous : 2008-03-26 18:28 ID:Heaven

>>7
You should give /prog/ a try, it'll make you more zen-like, and you'll be less worried about internet trolls.

11 Name: #!/usr/bin/anonymous : 2008-03-28 12:33 ID:Heaven

>>7
>>6 was not a preference, it was advice for how not to write shitty code.

12 Name: #!/usr/bin/anonymous : 2008-03-28 18:28 ID:Heaven

This is actually a quite good article about improving the performance of MSSQL. A good start.

http://msdn2.microsoft.com/en-us/library/aa964133(printer).aspx

13 Name: #!/usr/bin/anonymous : 2008-03-28 22:32 ID:Heaven

This thread has been closed. You cannot post in this thread any longer.