T-SQL Challenge with SQL Server 2012’s Sequence ObjectCommented on: 4 years ago
(December 16, 2010)
Most efficient way I can think of is to have the sequence INCREMENT BY 2 each time, and insert (NEXT VALUE FOR dbo.Seq1) and (NEXT VALUE FOR dbo.Seq1 + 1) into key1 and key2 (respectively) in T1....
SQL Server 2012 T-SQL at a Glance – SequencesCommented on: 4 years ago
(November 23, 2010)
I believe I'm right in saying that other than column order, the order of items in the SELECT list doesn't mean anything - so it would be wrong for SQL Server to arbitrarily provide e.g. 1 as the...
Geekiest Sig ChallengeCommented on: 5 years ago
(February 2, 2010)
Now that's just geeky to the max! If you had written a .Net app to pull out the pixel positions I'm not sure whether it would've been more or less geeky, mind. :)
Solutions to Logic Puzzle - Crossing a DesertCommented on: 5 years ago
(December 9, 2009)
The only trouble is, Itzik, that when you return to the first spot where you deposited the food you find it has been eaten by camels! Thankfully, you capture one of them, ride it for three days...
Solutions to T-SQL Challenge - Efficient Partitioned TOPCommented on: 5 years ago
(October 31, 2009)
You can cheat by relying on the randomness of the data inserted into the table an put "WHERE col1 > 95" at the end of the inner query - limiting the size of the sort. Not recommended for production...
Virtual Auxiliary Table of NumbersCommented on: 5 years ago
(October 30, 2009)
I've tried the recursive approach you suggest, oddsock and as per article #94376, having the OPTION within the function doesn't work (syntax error) - it'd be a huge pain to have to remember to...
Optimizing a Suboptimal Query PlanCommented on: 6 years ago
(March 26, 2009)
Further to my earlier reply - here are some timings (T1 w/ 1,000,000 rows, col2 'pseudorandomizedish' - SQL Server w/ 768MB RAM, testdb and tempdb on separate disks).
Original query: 29s...
Digital Magazine Archives
Browse back issues of SQL Server Pro, from January 2007 through the last issue published in April 2014. Find the back issues here.
An option when creating new AlwaysOn Availability Groups is to specify Backup Preferences.
It’s also something you can easily configure once the Availability Group has been set up as well – by simply right-clicking on the Availability Group and selecting Properties – then navigating into the Backup Preferences tab. ...More
The quest for the Golden Record to achieve a single, accurate and complete version of a customer record is worth the pursuit to attain survivorship. Record matching and consolidation are only the beginning. Melissa Data takes a new approach. Learn how to apply intelligent rules based on reference data to make smarter and better decisions for data cleansing....More
On SQL Servers where Availability Groups (or Mirroring) isn’t in play, I typically recommend keeping a combination of on-box backups along with copying said backups off-box as well. Obviously, keeping databases AND backups on the SAME server is the metaphorical equivalent of putting all of your eggs in one basket – and therefore something you should avoid like the plague....More