首页 新闻 会员 周边 捐助

Oracle分区表跨分区查询数据为空

0
[已关闭问题] 关闭于 2018-11-07 09:50

创建分区表的语句,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');

现需向Oracle DBA大神求助

ZhiChao&的主页 ZhiChao& | 菜鸟二级 | 园豆:208
提问于:2018-11-02 16:10
< >
分享
所有回答(1)
0

如果分区成功的话,结果应该和没分区时一样的。所以,怀疑没分区成功。

lhdz_bj | 园豆:227 (菜鸟二级) | 2019-10-02 16:52
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册