当 SQL Server bcps 到带有索引的空表时,它内部会做什么?
如果我有一个带有索引的空表并且执行 bcp,SQL Server(内部)是否会删除/禁用索引,加载数据,然后重新应用/启用/构建索引?
If I have an empty table with an index and I do a bcp, does SQL Server (internally) drop/disable the index, load the data and then re-apply/enable/build the index?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,索引在整个操作过程中都会得到维护。事实上,微软表示,您可以通过使用
-h ORDER
提示根据聚集索引对数据进行排序来提高 bcp 性能。有关详细信息,请参阅 bcp 实用程序文档。但是,正如此处所述,为了尽可能最快地导入,您应该采用以下步骤:No, the indexes are maintained throughout the operation. In fact, Microsoft says you can improve bcp performance by using the
-h ORDER
hint to sort the data according to your clustered index. See the bcp Utility documentation for details. However, as stated here, for the fastest import possible you should take the following steps:不,它不会,但它会尽最大努力使其尽可能快。此外,您也可以通过遵循一些基本准则来提供一些帮助(请参阅 http:// msdn.microsoft.com/en-us/library/ms177445.aspx)。
No it doesn't but it will do its best to make it as fast as possible. Also you can help a little bit too by following some basic guidelines (see http://msdn.microsoft.com/en-us/library/ms177445.aspx).