oracle CREATE TYPE type_beijing_1 AS VARRAY (100) OF CLOB or CREATE TYPE type_beijing_2 AS VARRAY (100) OF VARCHAR2(32767) 32767 can not be used for sql, you have to change to 4000 why do you need array? I would rather use CREATE TYPE type_beijing_3 AS TABLE OF CLOB
因为我需要用到 custom data type 。而这 custom data type 的长度是 不确定的。可能可以很长。 PostgreSQL 可以让 byte[] 的长度最长到 2GB,没特别的 performance penalty (也就是 varchar(40) 其实和 byte[] 的速度一样)。 我主要是想看看是否能够移植我在 pgsql 上的 code 到 oracle / db2 上。主要是现在 pgsql 有些地方有限制,不太容易继续弄。
【在 B*****g 的大作中提到】 : oracle : CREATE TYPE type_beijing_1 AS VARRAY (100) OF CLOB : or : CREATE TYPE type_beijing_2 AS VARRAY (100) OF VARCHAR2(32767) : 32767 can not be used for sql, you have to change to 4000 : why do you need array? I would rather use : CREATE TYPE type_beijing_3 AS TABLE OF CLOB
B*g
4 楼
I did not see any problem in oracle to use CLOB as long as not store in table.
【在 c*****t 的大作中提到】 : Oracle 应该支持 index on expression 吧。 : 比如 index on MyEval (col),然后每次碰到 : where MyEval (col) > 1000 : 就用到该 index 。 : 这样的话,就可以做很多 fansy 的东西。