Category: SQL Server 2017

[Video] What Percent Complete Is That Index Build?

SQL Server 2017 & newer have a new DMV, sys.index_resumable_operations, that show you the percent_completion for index creations and rebuilds. It works, but...only if the data isn't changing. But of course your data is changing - that's the whole point of doing these operations as resumable. If they weren't changing, we could just let the operations finish.

Read more about [Video] What Percent Complete Is That Index Build? 6 comments — Join the discussion
News & Opinion

New SQL Server Management Studio 17.5: It’s Classified

SQL Server Management Studio 17.5 is out, and new in this release is a SQL Data Discovery & Classification feature. The idea is that it'll scan your database, identify columns containing potentially sensitive data, and help you become compliant with regulations like PCI, HIPAA, and GDPR.

Let's see how it works on the Stack Overflow public data dump.

Read more about New SQL Server Management Studio 17.5: It’s Classified 14 comments — Join the discussion
Performance Tuning

SQL Server 2017 CU3 adds tempdb spill diagnostics in DMVs and Extended Events

Where have you been all my life?
Whenever I'm teaching people about query tuning, two things come up almost without fail: parameter sniffing and tempdb spills.

They're not mutually exclusive -- some queries will seemingly always spill to tempdb, whether parameter sniffing is present of not, and some queries experiencing issues with parameter sniffing will never spill to tempdb.

Read more about SQL Server 2017 CU3 adds tempdb spill diagnostics in DMVs and Extended Events 4 comments — Join the discussion
Performance Tuning

SQL Server 2017 CU3 add a new CXCONSUMER wait type

SQL Server 2017's new CXCONSUMER wait type was originally announced by Microsoft's Pedro Lopes, and now it's out. Here's what it means for performance tuners. According to Pedro, this wait is the "safe" type of parallelism wait, as opposed to the CXPACKET wait type, which means work isn't evenly balanced across all of our cores. Pedro blogged…

Read more about SQL Server 2017 CU3 add a new CXCONSUMER wait type 13 comments — Join the discussion
Performance Tuning

SQL Server 2017 CU3 adds execution statistics for scalar-valued, user-defined functions

Update
This seems to finally be fixed as of CU12 for SQL Server 2017. If you're not already patched up, head over to the link to get there.
Estimated Plans Need Not Apply
This is, of course, only available in actual plans.

All together now:

Read more about SQL Server 2017 CU3 adds execution statistics for scalar-valued, user-defined functions 4 comments — Join the discussion

New sys.messages Entries in SQL Server 2017

I'm only showing the English (1033) ones here, message ID and then text. Some of the new messages are very Azure-specific, and while I love to think that we'd get some of these features in the boxed product, I think Microsoft is just getting down to a standard shared list of message IDs.

However, some of them are rather...well, I'll just bold the ones that made me raise an eyebrow:

Read more about New sys.messages Entries in SQL Server 2017 6 comments — Join the discussion
Performance Tuning

New Wait Stats and DMV Columns in SQL Server 2017

SQL Server 2017 is officially out, and here's what I've found so far. New Wait Stats in 2017 BACKUP_INMEM_DIFFLIST_READ_ACCESS BACKUP_INMEM_DIFFLIST_WRITE_ACCESS BLOB_CONTAINER_TABLE COLUMNSTORE_MIGRATION_BACKGROUND_TASK EXTERNAL_SCRIPT_NETWORK_IO FOREIGN_REDO GHOSTCLEANUP_UPDATE_STATS GLOBAL_QUERY_CANCEL GLOBAL_QUERY_CONSUMER GLOBAL_QUERY_PRODUCER HADR_THROTTLE_LOG_RATE_LOG_SIZE HADR_THROTTLE_LOG_RATE_SEEDING HADR_THROTTLE_LOG_RATE_SEND_RECV_QUEUE_SIZE MEMORY_GRANT_UPDATE MIGRATIONBUFFER PREEMPTIVE_OS_BCRYPTIMPORTKEY PREEMPTIVE_OS_NCRYPTIMPORTKEY PREEMPTIVE_XE_PROXY_ADDSESSION PREEMPTIVE_XE_PROXY_PROCESSBUFFER PREEMPTIVE_XE_PROXY_REMOVESESSION PREEMPTIVE_XE_PROXY_SESSIONCOMMIT PWAIT_AUDIT_CLOSE_EXPIRED_LOGS_MGR_RWLOCK PWAIT_AUDIT_SESSIONS_LOCK PWAIT_EXTERNAL_SCRIPT_LIBMGMT_DIR_PERMS PWAIT_PREEMPTIVE_APP_USAGE_TIMER PWAIT_PREEMPTIVE_XE_STUB_LISTENER PWAIT_SBS_FILE_OPERATION QDS_HOST_INIT RBIO_WAIT_VLF REMOTE_BLOCK_IO RESTORE_MSDA_THREAD_BARRIER SBS_DISPATCH SBS_RECEIVE_TRANSPORT SBS_TRANSPORT SECURITY_CNG_PROVIDER_MUTEX SLEEP_SETUP SNI_WRITE_ASYNC…

Read more about New Wait Stats and DMV Columns in SQL Server 2017 3 comments — Join the discussion
Performance Tuning

SQL Server 2017 Showplan Schema Is Available

File this under...
Things probably only I care about. But the Showplan Schema for SQL Server 2017 popped up... well, I caught it last night. I probably could have written this sooner, huh?

So what's new? Well, if I compare the 2016 SP1 schema using KDiff, a few things stand out. Some I've blogged about, and some... I have no idea what they are.

Read more about SQL Server 2017 Showplan Schema Is Available 2 comments — Join the discussion

SQL Server on Linux is the New SQL Server on Windows Core

When Windows Server 2012 came out with Core, I heard some rather suspicious things at conferences like:

"I'll be able to take way less patching outages!"
"It'll be so much faster because it has less overhead!"
"Everyone will learn automation and be more powerful!"
"It's the way of the future! Learn it or your career is doomed!"

Read more about SQL Server on Linux is the New SQL Server on Windows Core 31 comments — Join the discussion
Performance Tuning

ColumnStore Indexes: Rowgroup Elimination and Parameter Sniffing In Stored Procedures

Yazoo
Over on his blog, fellow Query Plan aficionado Joe Obbish has a Great Post, Brent® about query patterns that qualify for Rowgroup Elimination. This is really important to performance! It allows scans to skip over stuff it doesn't need, like skipping over the dialog in, uh... movies with really good fight scenes.

Car chases?

Read more about ColumnStore Indexes: Rowgroup Elimination and Parameter Sniffing In Stored Procedures 5 comments — Join the discussion

SQL Server 2017: Potentially Interesting New Extended Events

You still won't use them
And I predict that Extended Events will remain as niche-only use for specific troubleshooting scenarios. Very few monitoring tools use them, and the ones that do still rely on traces and DMV queries for the bulk of their collection.  That's not a good sign, in 2017, considering how long Extended Events have been around.

Read more about SQL Server 2017: Potentially Interesting New Extended Events 4 comments — Join the discussion