都内で働くSEの技術的なひとりごと / Technical soliloquy of System Engineer working in Tokyo

都内でサラリーマンやってます。SQL Server を中心としたマイクロソフト系(たまに、OSS系などマイクロソフト以外の技術も...)の技術的なことについて書いています。日々の仕事の中で、気になったことを技術要素関係なく気まぐれに選んでいるので記事内容は開発言語、インフラ等ばらばらです。なお、当ブログで発信、発言は私個人のものであり、所属する組織、企業、団体等とは何のかかわりもございません。ブログの内容もきちんと検証して使用してください。英語の勉強のため、英語の記事も投稿するようにしています。

The features you should know about SQL Server Management Studio - Part 14 - (New Features in SSMS 18)

Golden Week of 10 consecutive holidays has started. It's a historical Golden Week that changes from HEISEI( 平成 ) to REIWA( 令和 ) during consecutive holidays. Recently, I thought that SQL Server CTP update was quick. SSMS 18 has become generally available. Whenever a new version comes out related to SQL Server, I tend to look around dmv, execution plans. Since there were changes in the SSMS graphical execution plan, I tried it.

  • AdventureWorks2017, SalesOrderHeader is used.
  • A NonClustered index of OrderDate is created.

Let's execute the following query in SQL Server Management Studio!

SELECT
    SalesOrderID,
    RevisionNumber,
    OrderDate,
    DueDate,
    ShipDate,
    Status,
    OnlineOrderFlag,
    SalesOrderNumber,
    PurchaseOrderNumber,
    AccountNumber,
    CustomerID,
    SalesPersonID,
    TerritoryID,
    BillToAddressID,
    ShipToAddressID,
    ShipMethodID,
    CreditCardID,
    CreditCardApprovalCode,
    CurrencyRateID,
    SubTotal,
    TaxAmt,
    Freight,
    TotalDue,
    Comment,
    rowguid,
    ModifiedDate
FROM
    AdventureWorks2017.Sales.SalesOrderHeader WITH(INDEX(NonClusteredIndex))
WHERE
    OrderDate BETWEEN '2011-05-30 00:00:00.000' AND '2012-05-31 00:00:00.000'

f:id:koogucc11:20190427181744p:plain
Execution Result

The operator sees something that is unfamiliar when you look closely.

f:id:koogucc11:20190427182111p:plain
New one is displayed to the operator!

The elapsed time, actual number of lines and estimated number of lines are displayed. This sounds good. It is possible to check if there is a statistical problem or not. The red line of 3028 is the actual line, and the blue line of 3041 is the estimated number of lines.

f:id:koogucc11:20190427182532p:plain
actual number of lines and estimated number of lines

Every time a version is upgraded, good improvements are added. Thanx!