在分区级别删除索引 [英] drop index at partition level

查看:82
本文介绍了在分区级别删除索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你知道在SQL Server(2008)中是否有任何方法可以做到这一点?

Do you know if there's any way of doing this in SQL Server (2008)?

我正在开发一个DataWarehouse加载过程,所以我想要的是什么do是删除正在加载的分区的索引,这样我就可以执行快速批量加载,然后我可以在分区级别再次重建索引。

I'm working on a DataWarehouse loading process, so what I want to do is to drop the indexes of the partition being loaded so I can perform a quick bulk load, and then I can rebuild again the index at partition level.

我认为在Oracle中可以实现这一点,但可能不在SQL Server中。

I think that in Oracle it's possible to achieve this, but maybe not in SQL Server.

谢谢,
Victor

thanks, Victor

推荐答案

不,你不能只为一个分区删除一个表的索引。但是,SQL 2008提供了一种批量加载方法,包括在同一文件组的单独分区上设置具有完全相同模式的第二个表,加载它,精确地对其进行索引,然后切换新分区生产表上的现有空分区。

No, you can't drop a table's indexes for just a single partition. However, SQL 2008 provides a methodology for bulk-loading that involves setting up a second table with exactly the same schema on a separate partition on the same filegroup, loading it, indexing it in precisely the way, then "switching" your new partition with an existing, empty partition on the production table.

但这是一个高度简化的描述。以下是SQL 2008关于实现此问题的MSDN文章:
http:/ /msdn.microsoft.com/en-us/library/ms191160.aspx

This is a highly simplified description, though. Here's the MSDN article for SQL 2008 on implementing this: http://msdn.microsoft.com/en-us/library/ms191160.aspx

这篇关于在分区级别删除索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆