Author: way0utwest

  • Be Wary

    We make mistakes when we publish things. It happens, and I am as guilty as some people of mistakenly putting something down on paper that isn’t correct.

    Or worse in SQL Server, put something down that applies to one version, and it gets superseded. I don’t usually go back and rewrite things later. I don’t realize I’ve left something out there, or that I’ve forgotten the version. When someone reads it, they might assume it’s correct with my name on it.

    However I would like to think that while we have lots of controversial things published, we don’t often put something out there that’s flatly incorrect. I saw this blog post on performance optimization recently and I’ve grabbed a couple images in case it disappears.

    badblog_1

    badblog_2

    The advice given here, while sometimes correct, isn’t necessarily what I’d actually give to developers, or what I think others would give to developers. Some of it appears to be more relevant to SQL 7/2000 and not necessarily something I’d apply to current versions.

    Some things are wrong, like “However, if you create a table variable, it only resides in the memory”. This is a common misconception that quite a few people have about SQL Server table variables.

    There’s also the “Each time you get a row from the cursor it requires in a network roundtrip, where the normal query makes only one roundtrip. “ That’s not necessarily true. It depends on how you have coded around the cursor. My guess is that this person is either using ODBC cursors, or has seen developers SELECT data from each loop through the cursor. However it seems to display a mis-understanding of how a cursor works.

    I point out a couple of items since I think there is some bad advice here, and some very vague advice, that SQL Server people might not want to follow.

    To me this is actually good and bad. Perhaps someone out there looking to hire SQL Programmers of Chicago will find my, and other, commentary on this post and decide not to hire them. Or perhaps SQL Programmers will read the interesting Twitter thread on their post (from 3/17/10, about 3:00MST) and decide they should beef up their skills.

    Be wary of advice you find on the Internet, whether mine or others. Double check, and above all, test, test, test.

  • This is Dumb – eBooks

    Amazon v Apple, both pressuring publishers on ebook concessions. It’s big business, and it could easily be good or bad for consumers.

    Should we have some regulation here? Is the public better served in any way if books are limited to some retailers and not others? Deals have been cut like this for all time, and these “exclusives” sometimes result in better deals for consumers and sometimes not.

    Personally I hate to get government involved, but I almost feel like this is a place where business does not serve the world. Making a deal with another business that cuts out other businesses feels like monopoly. And setting pricing limits, like no one can sell lower, almost starts to feel like collusion in pricing.

    Amazon has moved e-reading forward. And I think without some serious pressure, book publishers would be like music publishers, they’d resist putting out digital products and try to retain tremendous control.

    Both sides need to give. Amazon needs to recognize that not only are they not the only retailer, but that forcing suppliers or customers to them for certain products doesn’t breed customer loyalty. It breeds resentment.

    Publishers need to realize that not every customer is a pirate and that ebooks truly do cost less. They cost less in inventory, less in risk ( no investment in books), and less to a distributor. They ought to cost less, and less than just the difference of the paper.

    It’s annoying to me and I think that ultimately here this is delaying to progress of e-books, and potentially hurting the reading industry. You’re not just fighting other books, publishers, you’re fighting other entertainment as well. Raising prices on books can easily move the casual reader to get more movies or TV shows instead of books.

  • Changing Storage for your SQL Server

    A friend pinged me the other day with a question on SQL Server storage. He works as a Windows consultant, a fairly high end Windows/Hyper-V/Exchange guy, and knows a lot. However he likes to double check his plan with an area expert, which in this case was me. It’s a good plan, and it’s one that I use as well. If I need to make Windows changes, or network changes, I’ll call a friend that is an expert in that area.

    Anyway.

    In this case, he was replacing the storage for a SQL Server. The instance was on a Windows Host and a new set of LUNs from a new SAN were being presented to the server. This was a SAN replacement, and the equivalent of adding new drives to your machine, and yanking the old ones.

    Fortunately this wasn’t a simultaneous replacement (add/remove in one step). He plan was:

    • backup all user databases
    • shut down SQL Server.
    • add new LUNs, map to new drives in windows
    • copy SQL Server mdf/ldf files over
    • remove old LUNs
    • map new LUNs to the same drive letters as the old ones
    • start SQL Server.

    In this case the system dbs and SQL Server itself were installed on local drives, so they were unaffected. He wanted to make a minimum of effort and changes to the system.

    I replied this was a good plan. SQL Server depends no Windows to present storage to it, using simple drive letters or mount points. If you change the underlying storage, but keep the drive letters or mount points the same and SQL Server will just pick up where it left off. As long as the path is there, SQL Server will be fine.

    I still would recommend that you detach the databases first and then attach them after. Changes like this shouldn’t matter, but just in case, I like to make sure I can recover to the new storage easily.

  • SQL Saturday – A Few Lessons for Future Events

    I’ve been to a few SQL Saturdays, and while most have run smoothly, I have a few comments on a couple issues I’ve seen multiple times that might help others.

    Signage

    In every event that I’ve attended, SQL Saturday or Tech Ed, the majority of people don’t really know the venue. They don’t know where things are, and they struggle to find them. Even maps in a booklet can be hard to comprehend when your frame of reference isn’t set.

    Don’t spend a lot here, but print out a schedule for each room and post it by the door. Print out basic room names and arrows on regular printer paper and post them at every intersection. They’ll help a lot. If you change buildings, put a list on each door of what rooms are inside the building (and what tracks).

    Space

    Get more rooms if you can. Not larger rooms, but more of them. It’s hard to figure out what to offer, and invariably some speakers will cancel. What I’d recommend is that you duplicate some of your sessions that you think are popular, on the schedule. Give people a couple chances to see something interesting.

    Spare Presentations

    Make sure that you have a few spare presentations. You can ask speakers if they can bring an extra, just in case, and I’d recommend the organizer not get on the schedule. Have something ready that you can jump in with, but you’ll be busy. Don’t schedule a presentation if you don’t need to.

    Raffle / Prizes

    Usually there’s a bunch of swag to give away at the end of the day. This has been handled in a few ways, but my suggestion is keep it simple. Just pull names or raffle tickets out of a box. I’ve seen various fancy attempts to automate this or make it fun, the reality is that the quicker you can give out 30 prizes, the better. It’s been a long day, let people get out of there.

    I’d make sure you have 3 volunteers here. One calling numbers, one handing out prizes, and one pulling up new prizes to keep things flowing.

    After Party

    As much as I think that having an informal, social get together after the event is great, it’s not a party. It’s not an excuse to get drunk, it’s not a cut loose after the week event, even though it is on a Saturday.

    It’s a networking event.

    So schedule is somewhere that you can get some decent space, and where it’s not loud. It doesn’t have to be private, IMHO, but it shouldn’t have a band or loud music. Let it be a place where people can sit down in chat, in small or large groups.

    Heck, a set of picnic tables in a park would be great if you can find a waiter to bring drinks by 🙂