Search Results for: anything but query tuning

Database Lifecycle Management

There are lots of people who talk about Application Lifecycle Management. But, the database is a major part of every application and if you do a similar search, there aren't very many people talking about Database Lifecycle Management at all. Why not? I'm positive you're deploying a database with your applications. I'm also positive, because of the unique problems that databases present, primarily around data persistence, that you need to think about how to get your database(s) deployed. Unfortunately, even for strong, capable data professionals, deployment is something thought about later. Or, you're still doing the old school method of waiting until there's a deployment script that you're going to review, line-by-line, before you run it against production. There's a better way. What you need to do is start thinking…
Read More

Natively Compiled Procedures and Bad Execution Plans

I've been exploring how natively compiled procedures are portrayed within execution plans. There have been two previous posts on the topic, the first discussing the differences in the first operator, the second discussing the differences everywhere else. Now, I'm really interested in generating bad execution plans. But, the interesting thing, I wasn't able to, or, rather, I couldn't see evidence of plans changing based on silly things I did to my queries and data. To start with, here's a query: CREATE PROC [dbo].[AddressDetails] @City NVARCHAR(30) WITH NATIVE_COMPILATION, SCHEMABINDING, EXECUTE AS OWNER AS BEGIN ATOMIC WITH (TRANSACTION ISOLATION LEVEL = SNAPSHOT, LANGUAGE = N'us_english') SELECT a.AddressLine1, a.City, a.PostalCode, sp.Name AS StateProvinceName, cr.Name AS CountryName FROM dbo.Address AS a JOIN dbo.StateProvince AS sp ON sp.StateProvinceID = a.StateProvinceID JOIN dbo.CountryRegion AS cr ON…
Read More

SQL Server First Aid

If you take basic first aid, say a CPR course, you'll learn a handy mnemonic for the primary assessment you have to make, A-B-C. That breaks down as Airway, Breathing, Circulation. Is there an open airway so they can breathe? Are they breathing? Do they have circulation, a pulse, are they alive in short. I recently took a two day course on wilderness first aid (on top of CPR training and first responder training and basic and advanced first aid training and Scout training and Scout first-aid training and I'm sure I'm forgetting some) that added to that, D-E. We now have Disability and Environment. In short, just how responsive is the person or do they have the possibility of spinal issues? What's the environmental situation, lieing on cold ground,…
Read More

SQL Server vs. Oracle

Just so we're clear, I use SQL Server. I like SQL Server. But, this doesn't mean I have anything against Oracle. It's fine. It's good. But, I know very little about it. However, throughout my career I've found myself needing to understand it better. Either because I'm trying to train Oracle people to better use SQL Server and I need to be able to speak a little of their language to facilitate translation. Or, because I'm defending SQL Server on some technical point that the Oracle people don't completely understand. Or, because I've said something stupid about Oracle in my ignorance. Now, you know how busy you are, and I know how busy I am, so I doubt either of us has the time we really need to learn Oracle…
Read More

PASS Summit 2012 Evaluation Results

I say it all the time because it’s worth repeating, feedback is a gift. Good, bad or indifferent (well, not indifferent), feedback is a wonderful gift. Any time you appreciate a speaker, give them feedback. Any time you think a speaker could improve, give them feedback. Any time you hate a speaker, give them feedback. It’s really the best thing you can do. With that in mind, I have a huge stack of gifts in front of me here, the evaluations from the PASS Summit.Thank you very much to each and every one of the 160 different evaluations I received. I presented three times at the summit, once on a pre-con with Gail Shaw called “All About Execution Plans,” one time in a spotlight session called “DMOs as a Shortcut…
Read More

PASS Keynote Day #3: Dr. Dewitt

And we’re off. We opened with a video of people saying “Connect, Share, Learn” and “This, is Community” Rob Farley & Buck Woody came out with a song about long running queries. [8:20]Wayne Snyder has been working with the PASS organization since 1999. He spoke at the first PASS Summit and he’s been on the board forever. He has finally hit the point as immediate-past president where he has to leave the board. We’ve got a great little thank you for him from all sorts of people. Wayne is a magnificent guy, seriously. If you see him, thank him for his service. [8:28]We have a new executive committee, Bill Graziano as President, WHOOP, Douglas McDowell is Executive Vice-President and Thomas LaRock is VP of Marketing and finally, Rushabh Mehta is…
Read More

Do Foreign Key Constraints Help Performance?

Most people are very aware of the fact that having a foreign key constraint in place on your tables adds overhead to inserts and deletes. And many people believe that there is no benefit to foreign keys beyond referential integrity (which, the application can handle perfectly well, right?). But is that an accurate statement? Here's the basis for our investigation, a query in AdventureWorks2008R2: SELECT p.LastName + ', ' + p.FirstName AS 'PersonName' FROM Person.Address AS a JOIN Person.BusinessEntityAddress AS bea ON a.AddressID = bea.AddressID JOIN Person.BusinessEntity AS be ON bea.BusinessEntityID = be.BusinessEntityID JOIN Person.Person AS p ON be.BusinessEntityID = p.BusinessEntityID; This query results in the following execution plan: I know that is an ugly query and an ugly query plan, but bear with me for a moment. Do you…
Read More