r/SQLServer • • Nov 17 '16

[AMA] Microsoft SQL Server - 11/18

Hi Everyone!  

We're from the Microsoft SQL Server Engineering Team and we want you to ask us anything!  

We're posting this a bit early so you can start asking questions - feel free to start asking and we'll start answering Friday 11/18 at 9:30 PDT until 14:00 PDT. We'll have members from the Engineering teams participating in the AMA. This includes folks working on

  • SQL Server Features such as Columnstore, In-Memory OLTP, Row-Level Security, PolyBase, Stretch, or any of the features listed here.

  • Database Tools for Microsoft SQL Server and Azure SQL Database (SSMS, SSDT, SSRS, SSIS, SSAS, SSMA, SQLPS, CLI Tools)

  • Azure Portal for Azure SQL DB, Azure Elastic Database Pools or Azure Virtual Machines with SQL Server

  • R Services for predictive analytics, machine learning, and using scalable R packages with SQL Server technologies

  • Developing with SQL Server using the language of your choice (Examples. Node, Python, Java, etc.) or connecting your app to SQL Server using our drivers (ODBC, JDBC and open source drivers)

  • Migrating or Building Apps and Solutions with SQL Server and the resources we have available to help you get the most out of SQL Server.

  • [SQL Server on Linux] (https://www.microsoft.com/en-us/sql-server/sql-server-vnext-including-Linux)

  • [SQL Server 2016 Service Pack 1] (https://blogs.technet.microsoft.com/dataplatforminsider/2016/11/16/sql-server-2016-service-pack-1-generally-available/)

Here are some question ideas:

  • What’s new in SQL Server Service Pack 1 and SQL Server on Linux?

  • How does your team take the feedback from the community?

  • What tools would I use to migrate my database to SQL Server?

  • What’s a cool trick you don’t think most customers know about?

You can ask us anything about our public products or about the team. If there's a topic that's not listed above, ask it anyways! We'll do our best to answer it. We cannot comment on unreleased features and future plans, though :) Tweet at us with #SQLServer and follow @SQLServer to keep up to speed with what the SQL team is working on. After this AMA, you can also post questions here in reddit or tweet at us any time.

    Update@9:50 PST Hey Everyone! We are starting to answer the questions! Thanks for all the awesome questions so far. keep them coming! :)

    Update@2:15 PST Hey Everyone! Wow. Over 100 questions. Thanks for joining us today and participating in our SQL Server AMA! We're currently wrapping up the AMA, but we will do our best to answer the remaining questions. Going forward, the SQL Server Team will be more active on this subreddit. We're particularly excited to hear what you have to say about SQL Server v.Next!  

Also, tell us what you thought about this AMA Event by taking our survey: https://survey.microsoft.com/211438

67 Upvotes

386 comments sorted by

View all comments

1

u/ant24x7 Nov 18 '16 edited Nov 18 '16

Thanks for AMA

  1. How drop_existing=on option in create index works in background ? Why it's faster than executing drop and create ? How it's affect stats and fragmentation?

I tried looking these answers online but failed. Didn't find any reliable souce.

Btw this option saved hell lotta time and downtime for us.

1

u/josdebruijn Nov 18 '16

If you are thinking about recreating a clustered index: creating with drop_existing allows us to avoid the intermediate state that is created after dropping the old and before creating the new index. After DROP INDEX the data needs to be stored in some format, and this can take time. When creating with drop_existing we can transform directly from the old to the new format without this intermediate state. Stats are always recreated when building the new index, both with and without drop_existing.

1

u/ant24x7 Nov 19 '16

Thanks for explanation. What we are doing is changing file group which has new ndf file which is located completely on new physical location. The movement speed is astonishing. So after dropping CI the table becomes heap is this the intermediate state you were mentioning ?

1

u/josdebruijn Nov 21 '16

Yes, that is the intermediate state.

1

u/ant24x7 Nov 21 '16

Amazing! It would be great if you guys document this internals somewhere. I didn't find it in internals book as well.