THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Browse by Tags

All Tags » T-SQL   (RSS)
Showing page 1 of 23 (227 total posts)
  • How TOP wrecks performance (part 2)

    In my previous post, I showed how the vanilla version of TOP can really help performance by nudging the optimizer into picking an execution plan that is optimized for returning just a few rows instead of the entire result set. But I also showed that adding WITH TIES causes a cardinality misestimate, which may lead to suboptimal or downright ...
  • Row Level Security-Part 3-A few more advanced scenarios

    In this final entry (for now!) in my series on Row Level Security (Part 1, Part 2) I am going to show a couple of slightly more complex scenarios. I will only scratch the surface of what you could do, but keep in mind that performance is really important to how you make use of Row Level Security. In a future blog, I will build a couple of ...
    Posted to Louis Davidson (Weblog) by drsql on April 6, 2016
  • Presenting on Concurrency Three Times This Month…Though Not Concurrently

    Tomorrow night, March 15, I will be at the Hampton Roads SQL Server User Group’s March meeting, then at SQL Saturday Richmond on Saturday the 19th, then finally back at home on the 25th for my home user group in Nashville (which I haven’t seen much of this year) to present a presentation that I am pretty fond of after having done it once before in ...
    Posted to Louis Davidson (Weblog) by drsql on March 15, 2016
  • Row Level Security – Part 1–Simple Read operations

    This is part 1 of my Row Level Security blogs for my upcoming book project. Row Level Security is a very interesting feature. Unlike Dynamic Data Masking (link), which looks interesting on it's face, once you dig in the utilization of the feature looks to be limited by how granular you can make the security work. Row Level Security on the other ...
    Posted to Louis Davidson (Weblog) by drsql on February 15, 2016
  • The biggest table in your database

    You may need to know which is the biggest table (in terms of disk space usage) in the database that you are currently connected. Sometimes, this information is very useful to check the indexing strategy of these tables. There are several methods to know which is the biggest table of a database, one of these methods is to use the standard ...
    Posted to Sergio Govoni (Weblog) by Sergio Govoni on February 11, 2016
  • Is It Ever Better to Not Name Constraints?

    This is part 1 of my Tips and Tricks blogs for my upcoming book project. For all of my professional writing career, I have been forced to be on the top of my formatting game when writing code. Uppercasing this, spacing this, aligning that, formatting code just right. In my personal life, I also try to format my code in a readable manner, though ...
    Posted to Louis Davidson (Weblog) by drsql on January 19, 2016
  • Snapshot Isolation Level and Concurrent Modification Collisions - On Disk and In Memory OLTP

    This is part 1 of my In Memory OLTP blogs for my upcoming book project. In this blog I want to take a (reasonably) quick look at how concurrent modifications are handled using SNAPSHOT isolation level. There are two different flavors of SNAPSHOT Isolation level you can deal with, and while they are similar, there are some very big differences ...
    Posted to Louis Davidson (Weblog) by drsql on August 13, 2015
  • Utility to reset a sequence next value based on a table/sequence relationship

    So I was building a database the other day, and I used sequence objects for all of the defaults because it was FAR easier to load data into the table not needing to set identity_insert on and off over and over and over. Worked great. Went through all of my tests, everything was great. Got out Redgate Data Generator to load up a few hundred ...
    Posted to Louis Davidson (Weblog) by drsql on July 22, 2015
  • SQL Formatting Matters…

    … to some folks more than others. We likely all have stories about working with folks who care a lot about the format of their SQL statements. I’ve worked with a lot of database developers and analysts. I cannot say SQL formatting distinguishes the good from the bad (or ugly), but I have noticed the sharpest developers have a preferred SQL ...
    Posted to Andy Leonard (Weblog) by andyleonard on July 20, 2015
  • Temporal Tables – Part 2 – Changing history

    After my post yesterday, I had planned to take a break for Independence Day holiday, but a commenter asked a question that piqued my interest. How might you edit history? Well, the answer is simple, but the process isn’t exactly simple. Basically, you have to turn off system versioning, update history, and reapply system versioning. Not difficult, ...
    Posted to Louis Davidson (Weblog) by drsql on June 30, 2015
1 2 3 4 5 Next > ... Last »
  Privacy Statement