各位高人能否帮我看下下面这个语句有什么错误:
create table xmg
(
xid number primary key,
north number(30,15) not null,
west number(30,15) not null,
south number(30,15) not null,
east number(30,15) not null,
area number(30,15) not null,
len number(30,15) not null,
geometry blob not null
)
//1//
tablespace "AA"
lob (geometry) store as points
(
tablespace "BB"
enable storage in row
chunk 30000
retention
)
//2//
organization index
//3//
当我不加入1到3之间的代码时,从这个表中获取Geometry数据非常慢大概20秒左右,单独加入2到3之间或者1到2之间的代码时,所花费的时间是一样的大概在14秒左右。所以尝试了一下全部加上去,可是这样执行的时候总是会报错:选项缺失或无效!
怎么回事,是不能这样用还是?
期待各位能帮我解答一下。

解决方案 »

  1.   

    提速可以从优化sql解决,用不用iot表要根据表结构和业务需求来决定。同时对blob用store in-line就有小于4k的限制,一般不用。实在要建,这样来:
    create table xmg 

    xid number primary key, 
    north number(30,15) not null, 
    west number(30,15) not null, 
    south number(30,15) not null, 
    east number(30,15) not null, 
    area number(30,15) not null, 
    len number(30,15) not null, 
    geometry blob not null 

    organization index
    tablespace "AA" 
    lob (geometry) store as points 

    tablespace "BB" 
    retention 
    )
      

  2.   

    create table xmg 

    xid number primary key, 
    north number(30,15) not null, 
    west number(30,15) not null, 
    south number(30,15) not null, 
    east number(30,15) not null, 
    area number(30,15) not null, 
    len number(30,15) not null, 
    geometry blob not null 

    organization index overflow
    lob (geometry) store as points 

    enable storage in row 
    chunk 30000 
    retention 

      

  3.   

    非常感谢vc555和zcs_1,你们两位的解决方式我都测试过了。谢谢