BorderLayoutBoxedLayoutOpenLayoutMaximum textMedium textSmall text


Register
Saturday, July 04, 2009
 
MyStreamMinimize
Print  

Moving

Posted by Jason Massie Click to IM Jason Massie on Wednesday, June 17, 2009 at 8:04 AM to Offtopic
157 Views | 2 Comments | Article Rating

I have ported my blog to wordpress. It is simply the best blogging platform there is. This site will stay up for historical purposed. but all new content can be found here starting today. http://blog.statsisticsio.com

If you are an RSS reader, no need to do anything.

email it! |   |   | 

Here on Gilligan's Isle!

Posted by Jason Massie Click to IM Jason Massie on Friday, June 05, 2009 at 8:25 AM to SQL Server 2008, Humor, The Cloud, syndicate
324 Views | 5 Comments | Article Rating

gilligan[1] Tim Ford(WWW, Twitter) tagged me. This meme is all about what you would do if you were trapped on a deserted island with nothing but a laptop and aircard. Here is an excerpt:

So You’re On A Deserted Island With WiFi and you’re still on the clock at work.  Okay, so not a very good situational exercise here, but let’s roll with it; we’ll call it a virtual deserted island.  Perhaps what I should simply ask is if you had a month without any walk-up work, no projects due, no performance issues that require you to devote time from anything other than a wishlist of items you’ve been wanting to get accomplished at work but keep getting pulled away from I ask this question: what would be the top items that would get your attention?

Well, first I would have to set camp, kill The Others, and salvage the wreckage of Oceanic Flight 815. But after I would ferment coconut juice so I could have drinks on the beach. Priorities, right?

So after a couple of months of drinking, surfing(waves and pr0n), fishing, and basically being an all around  beachbum I would do this:

Study up for the Oracle Certified Professional exams.

I should be doing this now but I have trouble finding time and motivation. I have the books, study material, and an Oracle lab environment in the cloud. I have been pondering why I find it easier to put my head down and learn the new versions of SQL Server but procrastinate on Oracle. I have come to the conclusion that it is the fact that I do not use books with SQL Server. I usually learn all of the new engine feature before any books are written. I guess I just need to get more hands on with Oracle.

Design a set of default policies for new SQL Server 2008 installations.

In SQL Server 2008, we have policy based management. I want a set of default policies that guide people into best practices. For example, preventing a new database from being created with 1MB autogrow. The policies should mostly cover server and database settings. Schema oriented policies could vary between dev teams and should be handled by them.

Powershell as my default administration method.

I got into a powershell kick for a while but I lost interest. I need to give up the whatever GUI and do all administration through powershell. That is how I learned TSQL. Today, I use the GUI when it is a couple of clicks versus lines of TSQL but I could do it if I needed to. If I give up all MMC snapins and other GUI’s, I might spend a little extra time with powershell at first but it should pay big dividends in the long run.

The Others:

Brent Ozar(Twitter)  

Grant Fritchey(Twitter)

Thomas LaRock(Twitter)

I am tagging the following:

SQLChicken

SQLFool

Jeremiah Peschka

email it! |   |   | 

June #SQLPASS DBA SIG Meeting

Posted by Jason Massie Click to IM Jason Massie on Tuesday, June 02, 2009 at 8:39 AM to SQL Server 2008, SQL Server 2005, syndicate
225 Views | 0 Comments | Article Rating

SQLSnakeEyes I am presenting that June DBA SIG. This will be the topic:

Highly Available SQL Server Upgrade Assault Tactics

In this debriefing, we will look at various methods to minimize downtime during major version upgrades. This will include upgrading from SQL Server 2000 to SQL Server 2005 and SQL 2008 as well as SQL Server 2005 to SQL Server 2008. We will cover key planning and testing skills that can cut substantial time off the upgrade and minimize problems after the upgrade. We will also cover the technologies that you can add to your arsenal when planning an HA upgrade assault. All hands on deck as we do battle against upgrade downtime.

The meeting will be June 24th at noon Eastern. More info can be found here soon. However, set an outlook reminder now. Is it set? No? Well, set it now!

email it! |   |   | 

Kicking AMD’s Dead Carcass

Posted by Jason Massie Click to IM Jason Massie on Friday, May 29, 2009 at 8:06 AM to hardware
248 Views | 3 Comments | Article Rating

I wrote about the Nehalems a while back. I was about to write about AMD’s come back but they are due in 2010 while Intel will one ups them again before the end of this year. This is after, it is rumored, that they are delaying the Nehalem-EX just because they can. How is that for innovation? However, what are you going to do? An eight core four socket box with DDR3, and 96MB of cache will smoke an eight socket AMD HP  dl785 box. Things will get fun in the database area.

The Nehalem-EX Advantage

email it! |   |   | 

SQL Server Gal is a Biker Chic

Posted by Jason Massie Click to IM Jason Massie on Tuesday, May 26, 2009 at 10:30 PM to SQL Server 2008, SQL Server 2005, Humor
358 Views | 1 Comments | Article Rating

SQLGal

 

I didn’t say it. :) However, I must say it is interesting prose. You can visit the site here and read up on her, Visual Studio Guy, Windows Master and the other members of “The Source Fource”. Might I add that Capt. Varchar made it to 2nd base but she won’t call him back.

Oh well, it is all her loss.

A keen motorbike enthusiast, SQL Server Gal spends her free time and energy looking after her beloved Harley Davidson, called Data Drive. She spends Sunday afternoons challenging the speed barrier and enjoying the natural beauty of the countryside. But with her feisty, alternative take on the world, SQL Server Gal is a biker chick with a difference. Her vast knowledge and language skills mean that she has an answer to every question. And despite her glitzy life as a member of the Source Fource, she still uses her extraordinary memory skills to help others realize their ambitions.

Read more.

email it! |   |   | 

Capt. Varchar(MAX) and thePageLatch Posse Vol. 25

Posted by Jason Massie Click to IM Jason Massie on Friday, May 22, 2009 at 2:26 PM to Humor, Captain Varchar(MAX), syndicate
348 Views | 0 Comments | Article Rating

Control Z

ControlZ

This post is inspired by the #famouslastwords thread on twitter today. If you are doing a major, minor or any change on a production system, have a rollback plan. This will probably go beyond restoring from backup especially if the data is large. From someone who has put in 24 hour+ shifts, plan and test as much as possible.

email it! |   |   | 

SQL Backup Cleanups(or Did your Moneybags Make it to Tape?)

Posted by Jason Massie Click to IM Jason Massie on Thursday, May 21, 2009 at 12:13 PM to SQL Server 2008, SQL Server 2005, editorial, syndicate
390 Views | 3 Comments | Article Rating

moneybags I have long hated maintenance plans. First was because of the cryptic error messages when they fail. However, DBAs before me clued me into the fact they clean up files whether or not they make it to tape. The cleanup process is oblivious to the tape backup. This is really important. It can be catastrophic for this to happen. How many days do you keep on disk? One, two, three, seven days? Do you manage the tape backup as well? What if you have to restore from tape longer than that but the windows\backup admin was out on vacation while the tape backup was failing? I submit to you that it is better to fill up the backup and log drives before you delete non-archived backups.

There are several ways you can guarantee backups make it to tape before you delete them. First, you could check the archive bit.

For example:

del /a-a *.trn *.bak *.dff

Of course, you may wish to do it from powershell, vbscript or xp_cmdshell so you can only delete files older than a certain date. You may want additional logic if you need to keep a weekly full, a nightly diff and 24 hours of tlogs ON DISK.

Most backup software also allows you to run a post job script where you could clean up backups. I can think of horrific scenarios where it would still delete the “money bags” so I would stick with the windows file system attribute. If there is a bug there, it will be SEV A and lot of people will run into it.

email it! |   |   | 

Call for Speakers and Abstract Tips

Posted by Jason Massie Click to IM Jason Massie on Tuesday, May 19, 2009 at 8:11 AM to Professional Development, PASS, editorial, syndicate
523 Views | 1 Comments | Article Rating

I have now been on both ends of the process. Submitting abstracts for conferences and selecting them in this year’s SQL PASS process.

First, I would like to applaud PASS for taking a huge step forward in two areas. First is marketing. They have grow the submissions,  sessions and attendees at an exponential pace. I guess they will beat TECHED this year. They also introduced a social element to the process. Once you submitted an abstract, it was open to others to view. This creates a crowdsourcing element. It makes the community to step it up a notch. The result is a better conference for the participants due to competition.

Here are a few tips from my experience on both sides of the isle.

  • Get a proof reader. Word can spell check but it does not pick up on everything especially punctuation and grammar errors. I suck at this too. If you read a blog post from me with no grammar errors, it probably means the wife proofed it. I saw this a lot with foreign submissions. Some of these sessions, I am sure the speaker would do a good job but I have to take points because of this.
  • Use vivid action verbs. Do not use have, be , was, were etc. However, go beyond action verbs like “learn” and tell us what attendees will “consume”, "be inundated with”, “be bombarded  with” etc.
  • Use as many characters as possible. There were a few short abstracts that I found short but good. However, at first glance, I was hesitant until I realized the abstract was very, very concise. In general, it is better to use more words than necessary than too few. If you have the gift of conciseness, good for you. Otherwise, use words!
  • Submit as many abstracts as possible. This should be a “duh” bullet but I see MVP’s and authors submitting a single abstract on topics with lots of competitions like virtualization, SAN, and performance. Max out your submissions. Some conferences will not select you unless you are selected for at least 3 sessions.
  • Start out and end with a BANG! This includes the session title, the first sentence and the last sentence. If your abstract is two sentences, keep working.
  • Especially if you are new, look for topics that are not covered every conference several times like performance, consolidation, SANs etc. However…
  • Do not submit niche topics. A heath care or financial industry related topic might be compelling but spin it as a compliance topic that could be applied to a lot of industries.

Anyway, I would be happy to review your abstract in the future and provide constructive criticism. Feel free to drop me a note.

email it! |   |   | 

Capt. Varchar(MAX) and the Pagelatch Posse Vol. 24

Posted by Jason Massie Click to IM Jason Massie on Friday, May 15, 2009 at 2:05 PM to Humor, Captain Varchar(MAX), syndicate
306 Views | 0 Comments | Article Rating

I am not NULL!

IamnotNULL

Adapted from OfficeOFFline.

email it! |   |   | 

Yup, I suck.

Posted by Jason Massie Click to IM Jason Massie on Wednesday, May 13, 2009 at 9:59 PM to Offtopic
398 Views | 1 Comments | Article Rating

DavidHasselhoffsaysyousuck[1]

I have been pinned down with employee reviews and SQL PASS abstracts. On top of that, I have been learning Linux and Oracle instead of working with SQL. It is fun. I am learning 30 things a day but it is either level 100 or 500 for this crowd. I will put out a Oracle cheat sheet for SQL DBA’s soon though.

You can peep my life stream if you want to keep up.

Until then I will keep failing…

email it! |   |   | 

No News is Bad News

Posted by Jason Massie Click to IM Jason Massie on Tuesday, April 21, 2009 at 7:57 PM to Boohoo, editorial
509 Views | 0 Comments | Article Rating

It means I have been getting my a$$ handed to me at work. It is a good thing. I like action but I like blogging too. Anyway I have a few topics queued up but until then I will post a few links.

The company I work for was awarded by VMWare as Service Provider of the Year.

SQLChicken(WWW, RSS, Twitter) posted on ESX 4.0 aka vSphere from a DBA’s perspective.

The MySQL founder talks about the Oracle\SUN acquisition.

Tony Bain’s Twitter feed has some interesting links\commentary regarding Oracle and MySQL.

There is also an article on the Oracle\SUN deal means to MSFT. I don’t agree 100% though.

email it! |   |   | 

RE: Dear #SQLPASS, Don’t BI us to Death

Posted by Jason Massie Click to IM Jason Massie on Thursday, April 16, 2009 at 4:49 PM to PASS, editorial, syndicate
463 Views | 0 Comments | Article Rating

Last week, I wrote an editorial that I tried to keep fact based and my opinion out of. Wait, is that still an editorial? Anyway, I was happy to see this post by Bill Graziano(RSS, Twitter) today. BTW, have you subscribed to the SQLPASS blog?

I was concerned that the BI track would be taking away from the other tracks even though it didn’t look to be justified based on the survey. My concerns have been alleviated.

Here are a few quotes:

  • We also increased the total number of sessions at the conference to 168.
  • First, we're going to have more OLTP sessions than we've ever had before.
  • Second, the combination of the Application Development track and DBA track is now larger than the entire conference was in 2006.
  • We think our overall mix of roughly two-thirds OLTP and one-third BI will meet the needs of our conference attendees.

Again the full post can be found here.

email it! |   |   | 

Connecting to SQL Server in Single User Mode

Posted by Jason Massie Click to IM Jason Massie on Monday, April 13, 2009 at 5:27 PM to SQL Server 2008, SQL Server 2005, syndicate
812 Views | 2 Comments | Article Rating

Have you had to connect to SQL Server in single user mode but the application always beats you to it. No matter how fast you try! I have actually had to unplug nics and have smart hands do it. Well, there is a soon to be documented extension of –m.

Basically, you can specify an application like -m"sqlcmd". This means only a single instance of the SQLCMD application can connect. Just start SQL with -m"sqlcmd", unbreak what you just broke and the restart SQL normally. :) Nice, huh?

Keep in mind that there are ways around this so don’t use it for security.

email it! |   |   | 

Why People Come Here

Posted by Jason Massie Click to IM Jason Massie on Sunday, April 12, 2009 at 10:39 PM to
364 Views | 0 Comments | Article Rating

Here is the top 10 via Google searches in the last month:

 

1

cxpacket

94

1.070:00:3985.11%94.68%
2

70-432

35

1.230:00:5288.57%82.86%
3

"sql server 2005" + fix + "indexed view"

27

2.150:01:140.00%0.00%
4

sql quiz

26

1.120:00:3796.15%92.31%
5

"sql server 2005" cpu wmi

22

1.090:00:060.00%90.91%
6

statisticsio

18

1.940:02:470.00%55.56%
7

jason massie

14

2.860:02:4550.00%42.86%
8

cool people on twitter

13

10:00:00100.00%100.00%
9

cxpacket sql server 2005

13

1.690:01:2084.62%69.23%
10

exam 70-432

12

1.50:00:18100.00%83.33%

 

Here are some more interest hits:

coolest people to follow on twitter

bacon bitsandbytes

"linked server" & "tsql" & "1000 rows"

how much does twitter spend on server

godaddy sql will not work

sql funny statement

jason massie know now

wtf is sql server

email it! |   |   | 

Greater Fort Worth SQL Server Users Group

Posted by Jason Massie Click to IM Jason Massie on Saturday, April 11, 2009 at 2:07 PM to SQL Server 2008, SQL performance tuning, Indexes, PASS, DMVs
503 Views | 0 Comments | Article Rating

I will be speaking at the Greater Fort Worth SQL Server Users group this Wednesday. The talk will be on Troubleshooting with the DMV’s. If you are a DFW SQL’er come on out. Directions and more info can be found here.

If you don’t come, I am sending my boy after you with blow torch and a pair of pliers.

email it! |   |   | 

Physical Database Layout

Posted by Jason Massie Click to IM Jason Massie on Friday, April 10, 2009 at 11:10 PM to SQL Server 2008, SQL Server 2005, syndicate
514 Views | 0 Comments | Article Rating

Paul Randal has a survey on his blog that I would be interested in seeing as largest as sample as possible. I think this is important so I am going to post a link to you. Your vote counts. Yes, we can!

http://www.sqlskills.com/BLOGS/PAUL/post/Weekly-survey-does-size-really-matter-or-is-it-what-you-do-with-it.aspx

I come from the school of thought that unless you have an enterprise SAN that exceeds your IO requirements or you are intimately familiar with the IO patterns of your app, that you should use one disk group for burstable performance and possibly a second disk group for backups.

email it! |   |   | 

Capt. Varchar(MAX) and the Pagelatch Posse Vol. 23

Posted by Jason Massie Click to IM Jason Massie on Friday, April 10, 2009 at 5:56 PM to Humor, Captain Varchar(MAX), syndicate
365 Views | 0 Comments | Article Rating

You might be a geek if…

alarmclock

The stole this from the #youmightbeageek conversation going around twitter yesterday. Funny stuff. The original post is here.

email it! |   |   | 

Dear PASS, Don’t BI us to Death

Posted by Jason Massie Click to IM Jason Massie on Friday, April 10, 2009 at 5:38 PM to PASS, editorial, syndicate
441 Views | 4 Comments | Article Rating

I hope I do not offend my BI brethren. I am just stating the facts from the survey and the fact that that the abstract submission deadline has been extended due to fact that the BI conference has been canceled.

My request is that the number of sessions per track reflect the survey results. I hope that the BI track is not inflated to the point that it cuts out sessions from other tracks.

Here are some fact from the survey which can be found here.

  • 89% of the people surveyed are DBA’s or DBD’s
  • 27% of the people surveyed are BI professionals.
  • 69% of the people surveyed answered the questions on the DBA track. 58% want advanced topics.
  • 68% of the people surveyed answered the questions on the database dev track. 59% want advanced topics.
  • 54% of the people surveyed answered the questions on the BI track. 56% of those want intermediate sessions.
  • 60% of the people surveyed answered the questions on the Professional Development track.

Based on the survey DBA and Database Dev tracks should have the most sessions. The Professional Development and BI tracks should have close to an equal number. In the past, it seems like the BI sessions doubled or tripled the Professional Development session.

I am trying to keep opinion out of this post so I leave it an this. Am I misinterpreting the numbers? What are your thoughts?

Disclosure: I am team lead on the DBA abstract selection team and I have submitting a single ProDev abstract.

email it! |   |   | 

Mixed Workloads Part 3

Posted by Jason Massie Click to IM Jason Massie on Tuesday, March 31, 2009 at 8:17 AM to SQL Server 2008, SQL Server 2005, SQL performance tuning, tsql, Indexes, consolidation, editorial, syndicate
543 Views | 0 Comments | Article Rating

In part 1, I talk about what I consider feeble attempts at implementing a reporting server through log shipping, mirroring\snapshots and, to a lesser extent, replication. Unless you invest in a real ETL solution, I argued that it is better to run a mixed workload. I talked about the architectural advantages of running mixed workloads in part 2. In a nutshell, doubling the hardware and cutting the data in half.

In this final post, we will talk about new features in SQL Server 2008 and some features that have been around a while that can help with mixed workloads.There are also some bad practices that could be the right answer that we won’t  talk about but let us mention triggers, table valued functions, 20 table outer joins, some correlated subqueries and table variables. These are options but usually not good ones. In the right circumstances, they could be right like an end of year report.

Here are the main tools in your arsenal:

  • Resource governor
  • Covering filtered Indexes
  • Indexed views
  • Partitioning + data compression
  • Persisted computed columns
  • Archiving on the same server
  • After hours denormalization(indexes views with deferred updates)

Resource Governor

Chances are you do not want to limit throughput of your OLTP queries. The resource governor does not do a good job with these queries anyway because their duration is usually so short. However, let’s say you have reports that run by executives. You can put them in a workload group that gives them as much resources as possible without affecting OLTP traffic. You may also have a less important group of reports from the marketing or sales teams that you can limit further. One caveat to the resource governor is it cannot limit, disk IO so if that is your bottleneck, this will not help much.

Covering Filtered indexes

Filtered indexes are a great new feature in SQL Server 2008. When optimizing for reporting queries on your OLTP system, you are probably going to be touching a lot of rows so covering the query is important. For example, the order fulfillment team works off a report of unfulfilled orders that pulls in order data, customer data, shipping data etc. In this case, you would add covering filtering indexes on each of those tables. The filtered indexes reduce write overhead on your OLTP writes and reduces read overhead of your reporting.

Indexed Views

Indexed views take filtered indexed view a step further. You can create indexes on multiple tables. Think of it as denormalization alongside your OLTP optimized schema. In the previous order fulfillment example, we can basically persist that report and have it updated in real time. There is more overhead to your OLTP transactions so weigh the pro’s and con’s. Test if possible.Unfortunately, you cannot defer changes to your indexed views but I believe there is a feature request for this on Connect and I will tell you about a workaround shortly.

Partitioning and Compression

This is the dynamic duo when mixing workloads. Unfortunately, the nitty gritty details would require their own post. For example, one mixed workload may benefit from compression on the hottest partition while the older data should be uncompressed. However, another workload may benefit from the opposite. The key here is really understanding your workload, data and hardware limitations. Most importantly, plan then TEST, TEST, TEST! Once you partition, you loose online operations so if you do it wrong, you are stuck.

 Persisted Computed Columns

This is an easy one. It is a simple trade off. Writes take a little more CPU and space in exchange for reduced CPU time when you report. Take your orders table, for example. You could calculate and save shipping costs when you insert the rows. If it adds a few milliseconds to the insert but shaves seconds off the hourly open orders report that the execs are looking at, it may be an easy decision.

Archival

This might not always be possible depending on your data. It may not be necessary if you have finely tuned indexes. However, it could make a night and day difference. If you need the data, UNION ALL’ing the production table with the archive table has little overhead. I do suggest you keep the archive database on the same server unless it will rarely be accessed. Trying to do this with linked servers is bad.

After hours denormalization

This is basically precreating reports during off hours. Think of it as indexed view with deferred updates. You can UNION with the OLTP tables if you need realtime data in your report. In an ideal world, touching less rows in the OLTP table and then UNIONing with the denormalized data will result in the best of both worlds if you need real time data.

The final word

As the concurrency and size of data scales, both a pseudo reporting database and a mixed work load scenario will not meet business requirements. A business requirement of real time data may dictate a mixed workload. There may be plenty of workloads where scaling out and scaling up both meet performance demands. I just wanted to play devil’s advocate and  let you know there is another option when planning reporting.

email it! |   |   | 

Nail in the Coffin for AMD?

Posted by Jason Massie Click to IM Jason Massie on Monday, March 30, 2009 at 9:54 PM to Virtualization, hardware, editorial, syndicate
665 Views | 2 Comments | Article Rating

Intel released the Nehalem processor family. The Intel® Xeon® Processor 5500 series family. This could be the nail in the coffin for AMD. I hope not. Without competition, Intel can rest on its laurels.

Lets look at the goodies. On Glenn Berry’s blog, he points out the SQL specific benchmarks. This comes from the Anandtech benchmarks. This is what caught my eye from that review.

The memory controller has up to three channels. A dual CPU configuration has access to 35GB/s of memory bandwidth (measured with stream) if you use DDR3-1333. The latest dual Opteron achieves 19.4GB/s with DDR2-800

Think about it. If you have a SQL box with 32GB of RAM and a VLDB, you could theoretically churn the buffer pool once every second. Of course, you will probably hit a disk bottleneck first. In addition the the proc specific improvements, DDR3 with NUMA support in a server is a huge leap.

Today, HP also introduced the DL3X0 G6. Here is a link to the the DL 360 G6 specs. I am speculating but I bet  it would beat a dual socket 6 core DL 580 G5. Most definitely on IO bound workloads like a database server. Hopefully, the DL580 G6’s are coming soon. Maybe an 8 socket DL 780 G6. :)

Mix that with VMWare ESX 4.0 that is in RC and virtualization of the database server may have come of age.

The Opteron 1up’ed Intel in 2004. Now the ball is back in AMD’s court. I am rooting for you!

email it! |   |   | 

Capt. Varchar(MAX) and the Pagelatch Posse Vol. 22

Posted by Jason Massie Click to IM Jason Massie on Friday, March 27, 2009 at 3:33 PM to Humor, Captain Varchar(MAX)
456 Views | 3 Comments | Article Rating

The T’aint

TAINT

If you don’t get it, bless your heart. If you do, don’t cry foul because you do not learn this phrase in Sunday School. Besides, it is ALWAYS the network!

email it! |   |   | 

Mixed Workloads Part 2

Posted by Jason Massie Click to IM Jason Massie on Tuesday, March 24, 2009 at 7:56 PM to SQL Server 2008, SQL performance tuning, hardware, editorial
460 Views | 2 Comments | Article Rating

I am presenting at the Ft. Worth SQL Server Users Group in April. Details forthcoming but it is basically going to be on running mixed workloads(OLTP and DSS) on the same server. This is part two of what I will be pulling into the presentation. Click here for part one.

In this part we will look at the typical hardware configurations used in part one(logshipping, mirroring, replication etc.). and what a better configuration would be especially if you leverage some new features in SQL Server 2008 to run mixed workloads.

Unless you invest the time to create a real reporting solution with an ETL, you end up with the following solutions based off of the methods described in part one.I see it all the time. On top of that, I see reporting queries still running on the production server because there is a need for real time data.

TypicalReporting

So what do we get with this solution? Most reporting queries are offloaded from production. However, there are a lot of con’s. The schema usually is not optimized for reporting. There is overhead in getting the data to the reporting server. The data is stored twice on disk and more importantly, memory. Finally, resource utilization is usually lopsided. For example, first thing in the morning the reporting server may be hammered while production traffic is just ramping up. During peak production traffic, the reporting server can be underutilized.

mixed

I submit to you that combing reporting and production is a better configuration if you do not invest in an ETL solution that creates a real reporting database. In the next post, we will talk about features to optimize this configuration but lets talk about what we gain just by using this architecture.

  • The hardware is doubled and the amount of data is cut in half.
  • In the configurations that this would replace, the memory gain is huge. Unless the reporting database is optimized for reporting, the data pages in memory are going to be the same. This allows the same page in memory to satisfy both OLTP and reporting traffic.
  • This configuration gives more cores for parallel plans that are common in reporting.
  • Most of all, it make available hardware that could otherwise be idle.

 

Note: I use direct attached storage(DAS) in these examples because that is where the biggest gains are to be had. However, the same benefits apply if you are on an enterprise level SAN with some caveats.

Note 2: This series is generalized and your mileage may vary based on your particular environment, business requirements and workload.

In part three, we will talk about features that will help optimize a mixed workload on a single instance with feature in SQL Server 2008.

email it! |   |   | 

Mixed Workloads Part 1

Posted by Jason Massie Click to IM Jason Massie on Saturday, March 21, 2009 at 11:54 AM to SQL Server 2008, SQL Server 2005, editorial, syndicate
495 Views | 0 Comments | Article Rating

I am presenting at the Ft. Worth SQL Server Users Group in April. Details forthcoming but it is basically going to be on running mixed workloads(OLTP and DSS) on the same server. This is part one of what I will be pulling into the presentation.

What is NOT a Reporting Server

Log Shipping

A log shipped copy is not a reporting database. It is the same database that should be optimized for OLTP. You have no control to add supporting indexes. No denormalization. No persisted computed columns. No indexed views. Disconnects can happen midquery. More hardware. However, this is often the easiest solution,

Database Mirroring with Snapshots

This configuration suffers all the limitations of logshipping. However, you must run Enterprise Edition. You can get around the disconnects with creative coding.

Nightly Backups\Restore

Just like log shipping but the data is behind which may be ok based on business requirements. You can get around the limitations of logshiping like indexing etc. However, not practical for VLDB.

Snapshot Replication

This is ok for smaller databases plus you can filter tables and columns if they are not needed. You can get around some of the limitations of log shipping and mirroring but data is stale.

Others

Offline the database, robocopy, attach. DTS\SSIS the whole db. SAN Replication. Transactions replication with no reporting modifications.

The problem

You double your hardware and storage with no real reporting gains in most scenarios. This might be acceptable if the reporting environment duals as DR. However, there are better solutions.

What is next?

Moving forward, we will talk about doubling the hardware on OTLP and using SQL 2008 feature to run reporting and OLTP on the same server.

email it! |   |   | 

Another Overlooked Windows Setting for the DBA

Posted by Jason Massie Click to IM Jason Massie on Friday, March 20, 2009 at 5:33 PM to SQL Server 2008, SQL Server 2005, SQL performance tuning, hardware, syndicate
572 Views | 1 Comments | Article Rating

*Warning* Only use if your array controller has a battery backed cache. *Warning*

The settings are “Enable write caching on the disk” and “Enable advanced performance”. You can access these through device manager on the properties of the disk. These settings mostly apply to direct attached storage and are unavailable for most enterprise SAN lun’s that I have seen.

While we are at it, if your RAID controller cache has a read\write ratio, it is a good idea to set it to 0% read\100% write as long as you do not have a memory bottleneck. SQL uses RAM as its read buffer.

So is this a silver bullet for performance? Definitely not especially if you are not hitting a disk write bottleneck. However, every little bit helps and if it knocks 5-10% off of your 3 hour long full backup to disk, that is a win!

Happy Friday!

email it! |   |   | 

An Often Overlooked Windows Setting for the DBA

Posted by Jason Massie Click to IM Jason Massie on Thursday, March 19, 2009 at 9:07 AM to SQL Server 2008, SQL Server 2005, Windows Server 2008, SQL performance tuning, memory bottleneck, syndicate
2881 Views | 8 Comments | Article Rating

The default setting is the wrong setting for SQL Server. However, unless this has caused you a problem or you are thorough to point of OCD, this may not be set on your server.

Unless you are fighting a memory bottleneck, it probably won’t affect you too much but it is hard to give SQL too much memory.

The setting is “Maximize Data Throughput for Network Applications” and on by default. It sounds like a good thing. To the contrary, here is documentation from MSDN.

http://msdn.microsoft.com/en-us/library/ms178067.aspx

Maximize Data Throughput for Network Applications

To optimize system memory use for SQL Server, you should limit the amount of memory that is used by the system for file caching. To limit the file system cache, make sure that Maximize data throughput for file sharing is not selected. You can specify the smallest file system cache by selecting Minimize memory used or Balance.

To check the current setting on your operating system

1. Click Start, then click Control Panel, double-click Network Connections, and then double-click Local Area Connection.

2. On the General tab, click Properties, select File and Printer Sharing Microsoft Networks, and then click Properties.

3. If Maximize data throughput for network applications is selected, choose any other option, click OK, and then close the rest of the dialog boxes.

Happy Tweaking.

email it! |   |   | 

Linked Server Provider Options

Posted by Jason Massie Click to IM Jason Massie on Tuesday, March 17, 2009 at 1:40 PM to SQL Server 2008, SQL Server 2005, syndicate
657 Views | 1 Comments | Article Rating

Some of these are confusing so I thought I would write a blog on it. The post only refers to the SQLOLEDB and SQLNCLI providers.

Here are your options:

image

So In layman’s, let’s talk about each:

Dynamic Parameters: If you have a lot of adhoc queries against linked servers this may be a good option to turn on along with forced parameterization. Search your proc cache for queries containing the linked server name with single use counts.

Nested Queries: I would say that is depended on the business requirements.

Level Zero Only: Leave default for SQL Server

Allow InProcess: This is on by default with the native client provider but off by default with the SQLOLEDB provider. I might try changing to in process with OLEDB especially if context switches were high and % kernel time was high.

Non Transacted Updates: I would really use caution with this. It is like a NOLOCK hint. It may be ok for the app but unintended consequences could happen. Besides, maintaining the transaction is probably a small part of the duration when you are hitting the network.

IndexAsAccessPath: I make the mistake of turning this on once. It sounds like a good thing. To quote MSDN, “If True, the OLE DB provider indexes are used to fetch data. If False (default), the SQL Server indexes are used to fetch data.” Leave it false!

Disable Adhoc Access: This depends. I would normal setup a linked server for administrative tasks and a lot of work would be adhoc but the linked server would be locked down.

Supports “Like” operator: This also depends on business requirements but you are probably going to get crappy performance.'

Hold up cowboy

I would not run out and start changing stuff. Number one, avoid distributed queries in OLTP apps to begin with. Number Two, make one change at a time. Number three, if you change something and performance degrades you will probably see remote scan vs. remote queries in query plans.

email it! |   |   | 

The SAN, as we know it, will soon be Obsolete

Posted by Jason Massie Click to IM Jason Massie on Monday, March 16, 2009 at 7:17 AM to SSD, hardware, syndicate
1087 Views | 7 Comments | Article Rating

san

The high end applications for mission critical business are mostly powered by EMC. Other companies like 3PAR, NetApp and HP are biting into their market dominance. However, EMC has a bigger problem looming.

I have written about Solid State Drives(SSD) before but the Intel business class drives are the only ones that come close to being production ready due to random write speed. The other problems of price and capacity keep them out of reach for most companies. On the consumer side, the high end Seagate conventional drives beat most of the SSD drives on write performance.

The stepping stone

Tiered storage will probably be how SSD make their first appearance in production apps. Maybe SATA shelves for backups, SCSI or fiber channel drives for 80-90% of the data and SSD for the really hot data.

 

The game changer

FusionIO’s latest press release changed all of that. Imagine putting the capacity and performance of those 5 cabinets shown above in a shelf with 1% of the power requirements. Note: The TB+ capacity cards are coming Q2 2009. They currently support up 640GB. Here are some numbers on a 4 card setup:

Performance for multiple ioDrive Duos scales linearly, allowing any enterprise to scale performance to six gigabytes per-second (Gbytes/sec) of read bandwidth and over 500,000 read IOPS by using just four ioDrive Duos.

Here are single card numbers:

• Sustained read bandwidth: 1500 MB/sec (32k packet size)
• Sustained write bandwidth: 1400 MB/sec (32k packet size)
• Read IOPS: 186,000 (4k packet size)
• Write IOPS: 167,000 (4k packet size)
• Latency < 50 µsec

What is missing?

A chassis. Sure, you could put 4 or 6 of these in a server depending on how many slots you have but you are going to saturate the PCI bus before they are fully utilized. Before that happens, you will probably hit a CPU or memory bottleneck. The next logical step is a shelf that could handle 14-20 of these cards with plenty of fiber channel ports to hook up at least several servers. Will an 8GB fabric be fast enough? Until something like this happens, tiered storage is probably the way to go. I am sure they know this and are working on it. After all, The Woz joined the company.

Conclusion

I wish I could buy stock in this company.

email it! |   |   | 

SQL Data Services Roundup

Posted by Jason Massie Click to IM Jason Massie on Thursday, March 12, 2009 at 10:07 PM to azure, The Cloud, SQL Data Services, syndicate
588 Views | 0 Comments | Article Rating

SDS news has been flying all around the intertubes. I am going to try to summarize the links in this post. There is official “[This document supports a preliminary release of a software product that may be changed substantially prior to final commercial release. This document is provided for informational purposes only.]” on MSDN here.





Simon Sabin talks about it here.



The SDS team posts Q and A.



Oh nevermind, just go here. Mike Amundsen has links to everything SDS in his feed.

email it! |   |   | 

Bacon Bits and Bytes

Posted by Jason Massie Click to IM Jason Massie on Thursday, March 12, 2009 at 9:50 PM to Offtopic, Humor
454 Views | 0 Comments | Article Rating

Quick and to the point. This is a satirical and risqué blog on technology\gadget\microsoft\RDMS. Heck, anything is fair game. Some have already been offended but the great thing about the internet is you can click “back” and never return. To quote Brent, “Some people like Bill Cosby, some prefer Eddie Murphy, and a few like both.” You like it or don’t, we are just going to do our own thing.



Remember everything we post is NSFW in some corporate environment but a lot of it will fly in laid back shops. All posts are meant to be humorous though they may be crude or juvenile. Some funnies just out right fail.



The chefs include:



Mystery man extraordinaire: Wilbur Applewood, aka BaconBitsNBytes on Twitter



Brent Ozar, aka BrentO on Twitter



Jason Massie, aka StatisticsIO on Twitter



Tim Ford, aka SQLAgentMan on Twitter



Tom LaRock, aka SQLBatman on Twitter



Brent and SQLBatman both have posted better run downs.



So if you are feeling adventurous, check it out(Post RSS, Comment RSS, Subscribe by email, Twitter).



Technical post on SQL Server and related topics will resume here.

email it! |   |   | 

The Bomb has been Dropped

Posted by Jason Massie Click to IM Jason Massie on Tuesday, March 10, 2009 at 3:40 PM to azure, The Cloud, SQL Data Services, syndicate
655 Views | 3 Comments | Article Rating

SQL Data Services will be a relational database that has most of the features of SQL Server.

To quote David Campbell:

Tables?...Check

Stored Procedures?...Check

Triggers?...Check

Views?...Check

Indexes?...Check

Visual Studio Compatibility?...Check

ADO.Net Compatibility?...Check

ODBC Compatibility?...Check

Read about it here.

email it! |   |   | 

The New Version of SQL Data Services

Posted by Jason Massie Click to IM Jason Massie on Sunday, March 08, 2009 at 12:06 AM to Rumor mill, azure, The Cloud, SQL Data Services, syndicate
514 Views | 0 Comments | Article Rating

Up late making some changes on a large SQL 2000 publication and hoping like hell that I do not have to push the full snapshot.

Anyway, just a link post but Dave Robinson dropped a real teaser on the forthcoming “rewrite” of SDS here. As always, Mary Jo Foley has the rumors. Pay attention to Mix which is #mix09 on twitter.

email it! |   |   | 

MVP Summit 2009 After Hours Part 1

Posted by Jason Massie Click to IM Jason Massie on Friday, March 06, 2009 at 10:43 PM to Professional Development, social networking, Humor, syndicate
480 Views | 0 Comments | Article Rating

What happens in Seattle doesn’t stay in Seattle. I could not take pictures during the day because <nda> and <nda> cannot be announced yet. However, database diapers is fair game.

Anyway, here is part 1. Video next.

 

Click.

Here is the link the the original post if it doesn’t syndicate right.

email it! |   |   | 

Offtopic: Gamer Tag

Posted by Jason Massie Click to IM Jason Massie on Saturday, February 28, 2009 at 8:10 PM to Offtopic
306 Views | 0 Comments | Article Rating

I finally signed up for xbox live. My gamer tag is Captain Varchar. Right now, I am just playing Left 4 Dead. However, it is hard as hell but let's kills some zombies! Next week, it is will be Halo Wars after I get back from the MVP Summit.

 

email it! |   |   | 

Off Topic: Boogers

Posted by Jason Massie Click to IM Jason Massie on Friday, February 27, 2009 at 7:49 PM to Offtopic, music
535 Views | 1 Comments | Article Rating

 Here is a way off topic post. The music in this mix of house and techno is definately an aquired taste. 


So if you have a favorite radio station, have even heard of the doobie brothers, or thought Cyndi Lauper was cool, move along now. My next mix will an 80's mix. 

This is weird and obsure stuff from the left side of the brain out of Germany, London, Chicago, Detroit and Dallas among others. Seriously, baby kittens die every time this played. 


Tracklisting:
Glenn Underground - Mental Fusion (This Is A Tribute To Azmuth) - Difficult Soul
[a]pendics.shuffle - on yo back - Friends of Tomorrow
BEYER, Steven - Stupid Thing - Lørdag
Heartthrob - Grounded - M_nus
D5 - RUN - Delsin
DJ TV meets TORT - A Good Foundation & Other Tales (original mix) - The Mansion Spain
FRITOS - Bajando Al Sotano (Martin Gioia version) - Up And At 'Em
Levon Vincent - Love Technique (Original Mix) - Ovum Recordings
DBX - Baby Judy - Accelerate
Convextion - Desolate Hub - Downlow Music
Maetrik- Tool Two - Treibstoff
Redshape - Steam - Delsin
Shed - Handle With Care II - Original Mix - Delsin
Redshape - Plonk (Original) - Present
Claude VonStroke - Who's Afraid Of Detroit? (Audion Remix) - Dirtybird
shed - guile - Delsin
John Tejada & Arian Leviste - Intuition - Playhouse
fabrice lig - the riff pourpre - Versatile
JOHNSON, Brett - Twiddle Sticks - Frankie
SOZONOV- Thoughts Aloud (original mix) - Artefekz Muzik
Andy Stott - Talk Touch - Modern Love
Jeff Samuel - Heb.Gbz - Spectral Sound
Dan Curtin - Space Politics - Autoreply
TAPIA, Ramon - UFO - Great Stuff
Marc Houle - bay of figs - M_nus
Magda - Sadm (Mark Henning reflected loop) - Promo
LSIBOA & PTRUCCI - Micro Drama (original mix) - Attary
Heartthrob - Out of Here (Original Mix) - M_nus
Swayzak - Blufarm - Pagan
troy pierce-25 Bitches (Matt John's 25 Pitches Remix) - M_nus
Audion - your place or mine - Spectral Sound
Maetrik - Cologne and back - Treibstoff
Claro Intelecto - Thieves - Modern Love
SHAHROKH SOUND OF K - Love Happens (feat Toyin Taylor - Roberto Rodriguez remix - long version) - Compost
BRAUN, James - The Shakers - Tartelet
KRUSE/NUERNBERG - An Why E - Save Room Recordings
DUNDOV, Petar - Oasis (Substance & Vainqueur remix) - Music Man
 

email it! |   |   | 

Capt. Varchar(MAX) and the Pagelatch Posse Vol. 21

Posted by Jason Massie Click to IM Jason Massie on Friday, February 27, 2009 at 12:20 PM to Humor, Captain Varchar(MAX), syndicate
432 Views | 0 Comments | Article Rating

Ninja Fog

NinjaFog

The cloud has been all the buzz this week. Paul makes a prediction, Denis talks about the challenges, Steve chimes in and the register reports that Microsoft plans to release a full featured SQL Server to cloud. I have talked about this before but I got nothing but ninja fog today.

 

This comic was adapted from OfficeOFFline.

email it! |   |   | 

SQL Blog Readership Numbers

Posted by Jason Massie Click to IM Jason Massie on Tuesday, February 24, 2009 at 11:02 PM to
487 Views | 7 Comments | Article Rating

I have been mining publicly available numbers out of Google reader for the last couple weeks for frequent published sql blogs. I am going to present the numbers but let me make some points.

  • The fanboy Microsoft DBA is probably using Outlook 2007 as their RSS reader. I made the exchange server cry when I tried this. These numbers are only google reader stats.
  • My number is about 50% of what feedburner says for my site. However, take that with a grain of salt.
  • There are some travesties. However, I am posting data not opinions. I will leave the opinions up to you.
  • 100-200 level blogs seem popular.

 

SubscriberCount RSS Feed
1,460 http://blog.sqlauthority.com/feed/
1,407 http://sqlblog.com/blogs/MainFeed.aspx
725 http://blogs.msdn.com/psssql/rss.xml
521 http://blogs.msdn.com/gertd/rss.xml
360 http://blogs.msdn.com/buckwoody/rss.xml
317 http://blogs.technet.com/dataplatforminsider/rss.xml
284 http://feeds.feedburner.com/SqlteamcomWeblogs
273 http://blogs.technet.com/andrew/rss.xml
221  http://www.microsoft.com/feeds/msdn/en-us/sql/sqldev_en_us.xml
207 http://feeds.feedburner.com/statisticsio
175 http://blogs.msdn.com/sqlsecurity/rss.xml
144 http://itknowledgeexchange.techtarget.com/sql-server/feed/
141 http://glennberrysqlperformance.spaces.live.com/feed.rss
126 http://blogs.msdn.com/sqlserverue/rss.xml
123 http://www.brentozar.com/feed/
88 http://feeds.feedburner.com/SqlInTheWild
61 http://blogs.lessthandot.com/index.php/All/?tempskin=_rss2
47 http://chrisshaw.wordpress.com/feed/
33 http://sqlbatman.com/feed/
29 http://sqlserverpedia.com/blog/?feed=rss2
13 http://www.sqlpass.org/DesktopModules/DnnForge%20-%20NewsArticles/Rss.aspx?TabID=75&ModuleID=494
5 http://blogs.msdn.com/search/Searchrss.aspx?q=sql&o=DateDescending

email it! |   |   | 

Firefighting with Wait Stats

Posted by Jason Massie Click to IM Jason Massie on Tuesday, February 24, 2009 at 7:28 AM to DMVs
1076 Views | 7 Comments | Article Rating

Wait stats analysis is a great skill to have in your arsenal. There are lots of tools out there already. I also suggest you read Tom Davidson's whitepaper on it if you need background on this topic. There was a niche missing in my toolbox. You see, these stats are cumulative since the instance has started or you clear with DBCC SQLPERF(WAITSTATS, CLEAR).

Whatever sys.dm_os_wait_stats reports as the highest waiter may have happened last week. If you want to know what is hammering the server now, you can look at several different DMV's like sys.dm_exec_requests but that data is transient. My rough code (all my code is rough) below will tell you what the server has been waiting for in the last second of time. It is definitely a firefighting "WTF is going on right now" query. It would also complement this query when fighting fires.

Read the whitepaper for a better explanation but, basically, there are two buckets of waits. Signal waits which are actual waits on CPU execution time. The others are resource waits which means SQL is waiting on other stuff like a locks, latches, log writes, memory etc. Again the whitepaper does a great job correlating these sometimes cryptic names with resources.

Lastly, analyzing wait types goes hand and hand with perfmon. For example, you have both high CPU and high IO in perfmon. This script can help you see what SQL is actually waiting on the most so you can tackle that problem first.

SELECT wait_type
,signal_wait_time_ms AS 'CPU'
,wait_time_ms - signal_wait_time_ms AS 'Resource'
INTO #temp
FROM sys.dm_os_wait_stats
WHERE wait_time_ms <> 0

WAITFOR DELAY '00:00:01'

SELECT a.wait_type
, signal_wait_time_ms-cpu AS CPUDiff
, (wait_time_ms - signal_wait_time_ms)-[resource] AS ResourceDiff
FROM sys.dm_os_wait_stats a JOIN #TEMP b ON a.wait_type=b.wait_type
ORDER BY 2 DESC

DROP TABLE
#temp

email it! |   |   | 

Calling out Adam Machanic

Posted by Jason Massie Click to IM Jason Massie on Sunday, February 22, 2009 at 2:14 AM to social networking
537 Views | 10 Comments | Article Rating

I am just saying... I read the comments and I thought I should post. If he followed everyone on this list and this list with a real client he would see the value. NNTP = Dead except for those who do not understand search engine syntax. Blogs are not status updates any more.

So I challenge Adam and you if you are not on twitter to follow these people for a month with a real client and post your status.

Make sure you get me @statisticsio.

email it! |   |   | 

Capt Varchar(MAX) and the Pagelatch Posse Vol. 20

Posted by Jason Massie Click to IM Jason Massie on Friday, February 20, 2009 at 3:17 PM to Captain Varchar(MAX)
398 Views | 0 Comments | Article Rating

6 degrees of Virtualization

TooMuchVirtualization

You might think this is funny(or not) but this will be happening sooner or later.

email it! |   |   | 

Lessons Learned with SQL Server on VMWare

Posted by Jason Massie Click to IM Jason Massie on Thursday, February 19, 2009 at 8:11 AM to SQL Server 2008, SQL Server 2005
1152 Views | 3 Comments | Article Rating

This past weekend I asked the community(or at least my twitter feed) what they thought about virtualized database servers. Lots of people use it in Dev\Test\QA. Some in prod. Some thought it was pointless. Before I go over my lessons learned, let me address the “pointless” point.

It could be argued that it adds another unneeded level since you could do this with instances. For that matter, you can use one instance and permissions. This is true. If you are consolidating just a few instances, the cost and overhead probably doesn’t justify virtualization. However, there are other benefits like VMotion or adding capacity horizontally. You can’t easily move two instances off an over utilized box. With ESX, you can do this online while transactions are in flight. Added redundancy is also a benefit.

So here are my lessons learned:

Beware of CPU bound workloads

Most database workloads are IO bound even if it is logical IO’s. However, if your database is really small but you do lot of complex calculations, lots of business logic or string manipulations etc, your performance may suffer more than you would expect.

Use x64

This is just a vendor recommendation that suggests a 10% gain.

Don’t trust the CPU counters

Another thing I learned from the whitepaper. The CPU ready counter in Virtual Center is very useful.

Set a memory reservation

I would at least reserve half of the memory given to the guest especially if the host is busy. ESX has a balloon driver that will take memory from guests if it needs it and it thinks the guest is idle. This usually is not good for database servers.

The Microsoft Windows Server 2003 Scalable Networking Pack is evil

This is enabled by default with Windows Server 2003 sp2 and it doesn’t play well with SQL Server, VM’s and especially SQL Server on VM’s. See this post.

You have to sector align TWICE

First you have to sector align the vmfs and then at the OS level. Here is VMWare recommendations. I agree with Kendal’s recent finding of 128k offsets and 64k NT allocation unit based on my own testing.

If you have a lot of SQL VM’s on a host, see if EE makes sense

With Enterprise Edition, you only have to license the host. If you use standard edition, you must license each guest. If no EE features are needed, “lock pages in memory” alone, may be enough. In addition to other problems it solves, you can enable large page support.

Bad code usually runs worse on a VM

Man, the weather has been nice. How about them cowboys!

 

Anyway, do you have any lessons learned running SQL on VMWare..

email it! |   |   | 

Why People are still on SQL Server 2000

Posted by Jason Massie Click to IM Jason Massie on Tuesday, February 17, 2009 at 12:44 PM to SQL Server 2008
474 Views | 7 Comments | Article Rating

I asked 1200 tweeple if and why they are still running SQL Server 2000. The results are interesting. It appear vendors *are* evil.


statisticsio: How many people are still running SQL2000? Why? When are you going to SQL2008? If not, why? No comments from the Oracle\MySQL pnut gallery.


jasoncrider: we are still mostly 2000. Biggest reason is training and money. We wouldn't be moving towards 2005 if I didn't push.
about 14 minutes ago
bofe: We're still running SQL2000 because a vendor's product won't work with 2005/2008.
about 14 minutes ago
Tim_Mitchell: Some apps still on SQL2K due to $%*! vendor requirements. Those that we fully control will be on SQL08 this yr or early next
about 24 minutes ago
nathanblevins: Not to mention that upgrading is a 'dark and scary place' for many folk who have not been keeping up w/ the Jones'
about 27 minutes ago
nathanblevins: My client still runs 2k on quite a few of their projects. Much like @wbm 's clients, they have no real need to change.
about 28 minutes ago
The_BORG: Legacy software still in use (at work). Lame. Yes I know.
about 32 minutes ago
SDyckes: still running production apps on 2000. Just like @tjaybelt, Devs have not made the step. Running reports on 2005 perfom incres
about 34 minutes ago
peschkaj: Only 2005 over here, moving to 2008 in a few months.
about 44 minutes ago
nelsonmichael: still on SQL 2000, waiting for IT to learn SQL 2005, little hope of SQL 2008 anytime soon
about 45 minutes ago
crisatunity: *throws peanut*
about 49 minutes ago
jmkehayias: only 2000 instances left here are because the apps won't support upgrade to 2005/2008.
about 50 minutes ago
wbm: i've got two customers still running sql2k. both have no pressing need to upgrade.
about 53 minutes ago
babylon78: Still running my SIS on 2000..mostly due to not having gotten around to upgrading yet. Smaller SQL Srv. are on 2005. no 2008
about 53 minutes ago
BrentO: we were at Southern because we had a slew of apps that we hadn't put on support, and our versions were only 2000-compatible.
about 53 minutes ago
tjaybelt: its been talked about, just never seriously put on table. now, entire system going Oracle soon. so no upgrade planned
about 53 minutes ago
tjaybelt: we have prod on 2000 still. 2005 dbs are in compatibility mode 80. dev has not proved move to 2005 or 2008 feasible yet.
about 54 minutes ago
CooperHawkes: Completely on SQL 2005, right now no plans to go to 2008 until the merger situation here is completed..
about 54 minutes ago
RalphMRivera: I'd be curious to see your results.
about 54 minutes ago
crypticscholar: I know one on 2K right now that is (hopefully) going to 2K8 next week.
about 55 minutes ago
statisticsio: How many people are still running SQL2000? Why? When are you going to SQL2008? If not, why? No comments from the Oracle\MySQL pnut gallery.
about 56 minutes ago

email it! |   |   | 

Community Thoughts on Database Server Virtualization

Posted by Jason Massie Click to IM Jason Massie on Saturday, February 14, 2009 at 7:19 PM to Virtualization
585 Views | 7 Comments | Article Rating

Trying out a new tool from Chris Pirillo called Twickie. It basically lets you blog one of your tweets and all of the replies. It missed about half of the replies but it is a nice idea and hopefully it gets better.

I posed this question to my Twitter followers on a late Saturday afternoon. I was happy with the results. Keep in mind that most of my followers are Microsoft centric DBAs, developers, admins and general geeks. I will try this again with a different question Monday when my tweeps are paying more attention. Only the geekiest of geeks are perusing Twitter(or blogging) on Valentines' Day. See below ;)

Credit to Scoble for the idea.

I will post tips and tricks I have have learned running SQL Server on ESX tomorrow.

 


 statisticsio: Hey you. Yes, you. Are you virtualizing your db server? In prod? How big is it? Pitfalls? Winfalls? ROI? Performance? Pro's\Con's?

rehor: We virtualized our development SQL Servers last year. It works out OK, but it's rather slow. I wouldn't do it in prod.
about an hour ago

edq

edq @statisticsio we have several prod vms all have few simultaneous users LT 40ish so far so good mirroring on two vms difrnt farms works good2
Sat, Feb 14 17:40:00 from TwitterBerry

UndertheFold

UndertheFold @statisticsio just inherited 72 servers almost all VM on ESX clusters including DW and some VLBs, seems to be working ok a lot are sql 2000
Sat, Feb 14 17:15:22 from TwitterBerry

nitroryder: let's just say the CPU performance is not optimal. Not convinced yet that ESX and SQL are a good match for this reason.
about 2 hours ago
nitroryder: hosting 3 prod MS SQL db svrs in VMware ESX 3.5, 1 is 10gb 1 is 30gb 1 is 2gb, 2 are 2000, 1 is 2005, assigned 2cpu's each
about 2 hours ago

mike_walsh

mike_walsh @statisticsio biggest db is smaller, 75gb. Have worked with 150gb on windows virtual server (not hyper v) i/o reaked. Frustrations.
Sat, Feb 14 16:29:28 from TwitterBerry

 

mike_walsh

mike_walsh @statisticsio roi-rackspace/power/happier server team.. Perf-has been alright for med and dev/qa workloads. Nothing huge on vm yet.
Sat, Feb 14 16:27:49 from TwitterBerry

ciphero: NO, not the DB. It's clustered/failovered. webservers and pure services boxes are virtualized.
about 2 hours ago
AlanBarber: Planing to move dev and testing/qa to virtual in next 6-9 mo.
about 2 hours ago

Jorriss

Jorriss @statisticsio Virtual in Dev, Test, and Stage. Prod? No way. Never, never, never.
Sat, Feb 14 16:28:27 from twhirl

 

mrdenny

mrdenny @statisticsio planning to VM smaller prod database. All dev and qa are vm. No issues yet.
Sat, Feb 14 16:17:05 from TinyTwitter

jlshultz

jlshultz @statisticsio yes we r. Not big # users, but Oracle DB & Oracle Apps. Been vm ~3yrs, its been great. Time sync been only issue.
Sat, Feb 14 16:16:01 from TwitterBerry

update:

  1. Michael O'Neillcrisatunity @statisticsio the problem I see with db on vm is that all of the db products are geared in very specific architecture not to be on vm.
     
  2. jmkehayiasjmkehayias @statisticsio almost all of our production servers are VM based for DR scenarios. I have physical servers for dev. How backwards is that
     
  3. Jeff BanschbachEfelito @statisticsio and as @mrdenny said, all dev, qa, and uat are very happy in VMs.
     
  4. Jeff BanschbachEfelito @statisticsio works well for us on instances with low memory requirements SCOM, VCenter, SharePoint, and SSRS Have more detail if you want
     
  5. Kendal Van DykeSQLDBA @statisticsio virtualizing, yes...but not in prod, only in dev & stage. Very easy to spin up new servers for developers.
     
  6. Richard Dolanidolan @statisticsio Ours has been virtual about 10 mos. Suspicious there may be a performance hit but maintenance advantages are a big win.

email it! |   |   | 

The Doomed DBA(or The Sky is Falling)

Posted by Jason Massie Click to IM Jason Massie on Thursday, February 12, 2009 at 8:48 PM to Boohoo, The Cloud
547 Views | 0 Comments | Article Rating

Tony Bain(RSS, Twitter) has written a very nice article comparing relational databases to “cloud” databases. Not only is it well written, it has a HUGE audience at ReadWriteWeb. Props Tony. Suggested reading for Database Professionals.

The full article can be found here. Here is one thing you should see this even if you do not follow the link.

relational_database_feb09c[1]

email it! |   |   | 

Things you Know Now…

Posted by Jason Massie Click to IM Jason Massie on Tuesday, February 10, 2009 at 8:45 AM to SQL Server 2008, SQL Server 2005, Professional Development
758 Views | 5 Comments | Article Rating

There is a new meme started by Mike Walsh (Twitter, blog). He tagged Brent Ozar(RSS, Twitter) who tagged me amongst other.

Here is the the basis of the meme to quote Mike.

When I wrote about empirical evidence and learning through trying (instead of asking only), I got thinking about things I wish I knew when I was a Junior DBA that I know now.

So here is what I know now that I wish I knew then(and usually learned the hard way).

Microsoft Project is your friend.

I have written about this before but it is worth it to revisit. I started out making big production changes to mission critical systems with nothing but a task list in my head. I evolved to notepad and then excel. My success % improved with each jump. Now, I can floor my boss and customers with downtime estimates accurate the minute. On top of that, I can establish doable timelines and get more resources if my time line does meet expectations.

You can be your worst enemy.

Ego can make a brilliant employee a liability. It manifests is several ways( at least for me).

  • Jump on the new groups sporting all your brand new certs in your sig trying to “help”. However based on attitude, it is clear you are there for the wrong reasons usually attention.
  • Bogarting knowledge. So you know something someone else does not, teach them instead of holding it over them. Help out he jr guy. He may be your boss someday.
  • Ego can keep you from asking for help when you are clearly in over your head. I still struggle with this one.

Life is so much better when you are modest rather than smug.

If the hole is round, a square peg may not be the best fit.

I have officially become platform agnostic. SQL Server will always be my first love and what I am best at but there are other products out there. Not that I know everything there is about SQL but I don’t learn 10 new things about it everyday like I used to. As a n00b, I learn 30 new things a day about MySQL\Oracle. There are valid reasons to go MySQL or Oracle over SQL Server. That is just the way it is. Imagine rewriting the DAL layer for Wiki or Wordpress just because you had to run it on SQL Server. If you drink that much koolaid, more power to you. I think knowing the features and limitations of other platforms helps me as a SQL Server DBA as well.

The GUI is not your friend.

I used to be an enterprise manager DBA. When I learned how to admin from TSQL, that is were the Senior DBA level skills came in. I still use the GUI if it a click or two vs. several lines of code but I know how to write it and, if need be, automate it. If you can’t, learn.

Know X as good or better than the subject matter experts

Where X is technology that interacts with the database: The OS, hardware, SAN, network, and application code. Of course, this is not always feasible. I have never jumped on a switch to prove it is not a SQL Server problem but I have gotten pretty close. Once when all fingers pointed at SQL Server, I had them check the switch for errors and sure enough the firewall was set 100/half duplex. If nothing else, learn the hardware and OS inside and out.

Next Victims

Jonathan Kehayias(RSS, Twitter)

Jason Strate(RSS, Twitter)

Rob Boek(RSS, Twitter)

email it! |   |   | 

Key Lookup Threshold Part 2

Posted by Jason Massie Click to IM Jason Massie on Monday, February 09, 2009 at 7:57 AM to query optimizer, SQL performance tuning
497 Views | 1 Comments | Article Rating

Grant Fritchey(@gfritchey) posed this question to me on twitter after my posted on the key lookup threshold post.

@statisticsio Interesting post. Do you think that threshold is dependent on the data involved? Or maybe on the size of the key?8:28 AM Feb 5th from TwitterGadget in reply to statisticsio

I kind of assumed so which is why I did char(1000). However, I have just tested with char(1). The numbers are interesting. Please refer to the original post for repro code.

 

 IOIO
RowsCHAR(1000)CHAR(1)
Scan4229
1 row44
5 rows1212
10 rows2222
25 rows5252
50 rows114102
100 rows217202
250 Rows526502
500 Rows10431003
1000 Rows41414007

 

The threshold is crossed much earlier because the scan is smaller. This is a small table especially with CHAR(1) so take this test with a grain of salt. Run your own tests when you are working with large production data.

I would also venture to guess that as the complexity of the query increases the threshold gets lower especially on more complex queries like when grouping especially when grouping and outer joining.

A covering index is probably the best solution in most cases unless you need to touch all rows even then, it might be better,.

email it! |   |   | 

Key Lookup Threshold

Posted by Jason Massie Click to IM Jason Massie on Thursday, February 05, 2009 at 8:05 AM to SQL Server 2008, SQL Server 2005, query optimizer, SQL performance tuning, Indexes
902 Views | 1 Comments | Article Rating

Gail talks about bookmark lookups…. err.. key lookups in this post. So are they good or bad? Well, like many things in SQL, it depends. The main factor is the number of rows returned. A few rows are fine but the cost rises sharply with larger result sets. There comes a point where the threshold is crossed and a scan is more efficient. This is because a scan leverages sequential IO while a lookup does random IO.

Here are the results of the code at the end of the post.

RowsIO 
Scan422 
1 row4 
5 rows12 
10 rows22 
25 rows52 
50 rows114 
100 rows217 
250 Rows526<--Threshold
500 Rows1043 
1000 Rows4141 

 

As you can see, at 250 rows, we have crossed the threshold and it is cheaper do a scan. If you are passing in a literal, the optimizer can detect this and switch to a scan. If it is a stored proc or parameterized SQL, a plan is cached the first time it is run. Problems happen when the result size greatly varies depending on the parameter. There are ways around this all with their pro’s and con’s. Here are some:

  • A covering index.
  • A statement level recompile hint
  • Plan guides and hints

Here is the sample code that can repro these numbers on SQL Server 2008.

CREATE TABLE #temp
(
id INT IDENTITY(1,1) PRIMARY KEY CLUSTERED,
c1 CHAR(1000) DEFAULT( 'blah'),
c2 INT
)
INSERT INTO #temp(c2)
VALUES
(1)
GO 
INSERT INTO #temp(c2)
VALUES
(5)
GO 5
INSERT INTO #temp(c2)
VALUES
(10)
GO 10
INSERT INTO #temp(c2)
VALUES
(25)
GO 25
INSERT INTO #temp(c2)
VALUES
(50)
GO 50
INSERT INTO #temp(c2)
VALUES
(100)
GO 100
INSERT INTO #temp(c2)
VALUES
(250)
GO 250
INSERT INTO #temp(c2)
VALUES
(500)
GO 500
INSERT INTO #temp(c2)
VALUES
(1000)
GO 1000
INSERT INTO #temp(c2)
VALUES
(1000)
GO 1000

CREATE INDEX ix ON #temp(c2)

--The baseline
SET STATISTICS io ON
SELECT
*
FROM #temp WITH (INDEX=1)
WHERE c2 = 1

--1 row returned
SELECT *
FROM #temp
WHERE c2 = 1

--5 rows returned
SELECT *
FROM #temp
WHERE c2 = 5

--10 rows returned
SELECT *
FROM #temp
WHERE c2 = 10

--25 rows returned
SELECT *
FROM #temp
WHERE c2 = 25

--50 rows returned
SELECT *
FROM #temp
WHERE c2 = 50

--100 rows returned
SELECT *
FROM #temp
WHERE c2 = 100

--250 rows returned
--Must begin using hints because the optimizer can tell that a scan is better
SELECT *
FROM #temp WITH (INDEX=ix, forceseek)
WHERE c2 = 250

--1000 rows returned
--Must begin using hints because the optimizer can tell that a scan is better
SELECT *
FROM #temp WITH (INDEX=ix, forceseek)
WHERE c2 = 1000

email it! |   |   | 

MySQL Cheatsheet for SQL DBAs

Posted by Jason Massie Click to IM Jason Massie on Monday, February 02, 2009 at 9:09 AM to SQL Server 2008, SQL Server 2005, tsql
979 Views | 2 Comments | Article Rating

SHOW VARIABLES – This is like sp_configure or sys.configurations

SHOW STATUS – This like sys.dm_os_%. Basically, all runtime counters for the database engine components.

SHOW PROCESSLIST – This is like sp_who2

SHOW TABLE STATUS – This is like sp_help

These can be filtered like this: SHOW VARIABLES LIKE ‘%innodb%’

Those are the big ones. The full list can be found here.

email it! |   |   | 

The Death of JOIN

Posted by Jason Massie Click to IM Jason Massie on Saturday, January 31, 2009 at 11:49 PM to SQL Server 2008, SQL Shorts, SQL Server 2005, azure, The Cloud, SQL Data Services, editorial
890 Views | 4 Comments | Article Rating

The core of a relational database is normalization. The reduction of data duplication is what it is all about. Less data means less IO. SDS removes database design from the equation. This is why sparse columns and filtered indexes where implemented in SQL Server 2008. Here are a few posts on how this is handled in SDS.

The End of of JOINs?

The End of JOINs Part 2?

Yah yah, it doesn’t apply to your job, business, sector. Adam may call me out on FUD again. I hope it is true since this is hopeware so far.

However, I want to point out one company who have found a cloud non-relational database to meet their business requirements. They state their limitations and it makes sense as to why they took this route. If you are not up to speed, Simpledb is Amazon’s cloud db. Big table is Google’s cloud db. You are here because you already know about MSFT.

Glue chooses  SimpleDB.

This is what we need to keep an eye on.

email it! |   |   | 

Capt. Varchar(MAX) and the Pagelatch Posse Vol. 18

Posted by Jason Massie Click to IM Jason Massie on Friday, January 30, 2009 at 11:44 AM to SQL Server 2008, SQL Server 2005, Humor, Captain Varchar(MAX)
599 Views | 4 Comments | Article Rating

The Senior DBA

TheSRDBA

I am astounded by how often I see a problem that I know nothing about but fix it after finding the answer in a search. I get more high fives for being a good search engine user than a good DBA. On the flipside, I learned this by asking dumb questions and getting sent back a google search link.

The comic was adapted from OfficeOffline.

email it! |   |   | 

Need Some More Sample Databases?

Posted by Jason Massie Click to IM Jason Massie on Sunday, January 25, 2009 at 11:22 AM to SQL Server 2008, SQL Server 2005, tsql
840 Views | 2 Comments | Article Rating

Microsoft has 10 “Express Database Schemas” that I ran across and I thought I would pass along. I am always on the look out for sample databases. Northwind will always have a special place in my heart like the girlfriend that cheated on me with my best friend. AdventureWorks is cool but the fact that every single feature in SQL Server 2008 is crammed into it makes it klunky.  Since these are designed for different types of applications, it might be a good idea to drop these in your toolbox.

These are on the SQL Server Express page. Of course, there is no reason that these cannot be run on the full version of SQL.

Click here for any or all of them:

It appears they were designed by Barry Williams so credit is due where it is deserved.

About the Author

Barry Williams, founder and Principal Consultant with www.DatabaseAnswers.org, has been working with SQL Server since the mid-90's. Barry works as an independent consultant, trainer and writer and is a popular speaker on Enterprise Data Management at major Conferences. He can be reached at info@barryw.org.

email it! |   |   | 

Page 1 of 7First   Previous   [1]  2  3  4  5  6  7  Next   Last   


Copyright 2006 by Statistics IO, My SQL Server Blog