我想知道是否可以在已经存在的表上使用分区。我有一个表,我想根据一列中的值对其进行划分。我有一些不同帐户(A_id)的票(T_id)。我想根据a_id对表进行划分。这样做是可能的吗?因为在该表上运行查询或过程需要花费大量时间。如果不可能,有没有其他方法可以减少过程和查询所花费的时间?
发布于 2015-11-18 12:36:08
您可以使用DBMS_REDEFINITION包对现有表进行分区。下面的链接解释了如何对现有表进行分区。
https://oracle-base.com/articles/misc/partitioning-an-existing-table
过程和查询的性能取决于许多因素。单独对表进行分区可能没有帮助。首先,您可以查看速度较慢的查询的解释计划。它将显示您是否需要收集统计数据或添加索引等。
发布于 2015-11-18 13:33:12
您不能直接对现有的未分区表执行分区。您将需要创建一个临时表/新表,具体取决于以下分区方法:
1. Create a Partitioned Interim Table
2. Start the Redefinition Process
3. Create Constraints and Indexes (Dependencies)
4. Complete the Redefinition Process
1. Create a Partitioned Destination Table
2. EXCHANGE PARTITION
3. SPLIT PARTITION (If required to split single large partition into smaller partitions)
https://stackoverflow.com/questions/33771774
复制相似问题