Oracle分区表跨分区查询数据为空
Oracle分区表跨分区查询数据为空创建分区表的语句,PLATTIME是一个时间字段
ALTER TABLE TORDER MODIFY
PARTITION BY RANGE (PLATTIME)
(
partition p1801 values less than (to_timestamp('2018-01-01', 'YYYY-MM-DD')),
partition p1805 values less than (to_timestamp('2018-05-01', 'YYYY-MM-DD')),
partition p1808 values less than (to_timestamp('2018-08-01', 'YYYY-MM-DD')),
partition p1810 values less than (to_timestamp('2018-10-01', 'YYYY-MM-DD')),
partition p1812 values less than (to_timestamp('2018-12-01', 'YYYY-MM-DD')),
partition p1901 values less than (to_timestamp('2019-01-01', 'YYYY-MM-DD')),
partition p1902 values less than (to_timestamp('2019-02-01', 'YYYY-MM-DD')),
partition p1903 values less than (to_timestamp('2019-03-01', 'YYYY-MM-DD')),
partition p1904 values less than (to_timestamp('2019-04-01', 'YYYY-MM-DD')),
partition p1905 values less than (to_timestamp('2019-05-01', 'YYYY-MM-DD')),
partition p1906 values less than (to_timestamp('2019-06-01', 'YYYY-MM-DD')),
partition p1907 values less than (to_timestamp('2019-07-01', 'YYYY-MM-DD')),
partition p1908 values less than (to_timestamp('2019-08-01', 'YYYY-MM-DD')),
partition pmax values less than (maxvalue)
)ONLINE
UPDATE INDEXES;
在没有进行分区之前使用以下sql语句是可以查询到数据的,分区后再查询获取的数据为空
select * from TORDER where PLATTIME BETWEEN to_timestamp('2018-01-01', 'YYYY-MM-DD') and to_timestamp('2018-09-01', 'YYYY-MM-DD');
查询区间加大一点 是不是没有分区成功呢 正确与否啊 怀疑没分区成功 联合查询
页:
[1]