gpt4 book ai didi

sql - Oracle,创建按范围分区的索引

转载 作者:行者123 更新时间:2023-12-01 02:13:03 25 4
gpt4 key购买 nike

如何创建按日期范围分区的索引,我使用的那个索引在我运行时出错?

  CREATE INDEX "PV_TNPM"."TEJAS_SDH_PM_PDH_IDX2" ON "PV_TNPM"."TEJAS_SDH_PM_PDH" ("DATETIME","NODE_NAME", "NODE_IP", "OBJECT_NAME")
GLOBAL PARTITION BY RANGE(DATETIME) INTERVAL (INTERVAL '15' MINUTE)
(PARTITION INITIAL_PARTITION VALUES LESS THAN (DATE '2014-10-10') );

但是得到一个错误:
Error starting at line : 11 in command -
CREATE INDEX "PV_TNPM"."TEJAS_SDH_PM_PDH_IDX2" ON "PV_TNPM"."TEJAS_SDH_PM_PDH" ("DATETIME","NODE_NAME", "NODE_IP", "OBJECT_NAME")
GLOBAL PARTITION BY RANGE(DATETIME) INTERVAL (INTERVAL '15' MINUTE)
(PARTITION INITIAL_PARTITION VALUES LESS THAN (DATE '2014-10-10') )
Error at Command Line : 12 Column : 37
Error report -
SQL Error: ORA-00906: missing left parenthesis
00906. 00000 - "missing left parenthesis"
*Cause:
*Action:

使用oracle sql 开发人员。

最佳答案

引入此功能的 oracle 11g 中的索引不支持间隔分区

请注意,Interval 不是 CREATE INDEX 的有效子句,它对 CREATE TABLE 有效

INTERVAL CLAUSE IN CREATE TABLE 11G R2

GLOBAL PARTITION CLAUSE IN CREATE INDEX 11G R2

关于sql - Oracle,创建按范围分区的索引,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27575969/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com