1。 多CPU会不会给分区表带来查询效率的提高(相对于,查询普通表)
2。 分区表在什么情况下会有查询效率的提高(相对于,查询普通表)
3。 对于普通表向分区表移植有什么好的建议:
A.EXPORT,IMPORT
B.exchange partition 语法
C.Rename Original Table and Insert (select * from original table)
...全文
4013打赏收藏
大讨论:分区表的学习
最近,想加强一下分区表的概念和知识。 我列举一些问题,大家来讨论吧? 1。 多CPU会不会给分区表带来查询效率的提高(相对于,查询普通表) 2。 分区表在什么情况下会有查询效率的提高(相对于,查询普通表) 3。 对于普通表向分区表移植有什么好的建议: A.EXPORT,IMPORT B.exchange partition 语法 C.Rename Original Table and Insert (select * from original table)
我觉得 hrb_qiuyb(大森林) 说的很对,但是太偏重于均衡I/O了,分区表目的是要获得分表的性能,以一个大表的形式存在,而获取小表的性能,这是最重要的,我不否认他可以均衡I/O,但我觉得它是主要的。
The Oracle server can explicitly recognize partitions and subpartitions. Oracle uses this knowledge to optimize SQL statements by pruning unnecessary partitions or subpartitions. For example, if a query only involves Q1 sales data, there is no need to retrieve data for the remaining three quarters. Such intelligent pruning can dramatically reduce the data volume, resulting in substantial improvements in query performance.
If the optimizer determines that the selection criteria used for pruning are satisfied by all the rows in the accessed partition or subpartition, it removes those criteria from the predicate list (WHERE clause) during evaluation in order to improve performance
这是文档里面的一段话。服务器可以清楚辨别分区,查询的时候仅限于这个分区。