无法删除 Oracle 索引分区——除了删除整个索引并重建之外还有其他选择吗?
因此,我有一个 .NET 程序通过 Oracle ODP.NET 使用数组绑定存储过程调用将记录批量加载到分区表中,但这既不存在也不存在。
我想知道的是:因为我在所述表上有分区索引,所以批量加载的速度非常慢。我完全理解我不能删除索引分区,但我显然不希望删除并重建整个索引,因为这将花费更多的时间来执行。这是我唯一的办法吗?
有没有一种相当简单的方法来删除分区本身,然后重建分区和索引分区,这样可以节省时间并实现我的目标?
So, I have a .NET program doing batch loading of records into partitioned tables using array bound stored procedure calls via Oracle ODP.NET, but that's neither here nor there.
What I would like to know is: because I have a partitioned index on said tables, the speed of the batch load is pretty slow. I fully understand that I cannot drop an index partition, but I would obviously prefer not to have to drop and rebuild the entire index since that will take considerably more time to execute. Is this my only recourse?
Is there a fairly simple way to drop the partition itself and then rebuild the partition and index partition that would save time and go about accomplishing my goal?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否一次加载整个分区?或者您只是向现有分区添加新行?所有索引都与表等分区吗?
通常,如果您要将数据加载到分区表中,则会选择分区方案,以便每次加载都会将数据放入新的分区中。如果是这种情况,您可以使用分区交换来加载数据。简而言之,您将数据加载到结构与真实表匹配的(未索引的)临时表中,创建索引以匹配真实表上的索引,然后执行以下操作:
Are you loading an entire partition at once? Or are you merely adding new rows to an existing partition? Are all the indexes equipartitioned with the table?
Normally, if you are loading data into a partitioned table, your partitioning scheme is chosen so that each load will put data into a fresh partition. If that is the case, you can use partition exchange to load the data. In a nutshell, you load data into an (unindexed) staging table whose structure matches the real table, you create the indexes to match the indexes on the real table, and then do