由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - Oracle / DB2 问题
相关主题
这二句为什么会抛出ClassCastException异常?问一个SQL LOADER BLOB的问题
请教:trigger 里得不到blob值是怎么回事儿?初级问题
Oracle long数据类型 行转列的问题Oracle 8i export and import ?
Anybody use postgreSQL?How to insert image to DB2 ?
open cursor for collection?Another one
oracle的同志都来了,问个问题[转载] database for Linux?
Help need on writing data to Oracle CLOB!where can I download SQL Sever? thanks (null)
long and CLOB.. any differences?求救!!! 一个oracle的问题! 在procedure中所涉及的表名可以用变量从参数中传入吗
相关话题的讨论汇总
话题: oracle话题: type话题: db2话题: create话题: index
进入Database版参与讨论
1 (共1页)
c*****t
发帖数: 1879
1
这两个 database 支不支持 variable length byte array ?如果支持的话,
最大能有多大?
这里不是指 BLOB 。
thx
B*****g
发帖数: 34098
2
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

【在 c*****t 的大作中提到】
: 这两个 database 支不支持 variable length byte array ?如果支持的话,
: 最大能有多大?
: 这里不是指 BLOB 。
: thx

c*****t
发帖数: 1879
3
因为我需要用到 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
发帖数: 34098
4
I did not see any problem in oracle to use CLOB as long as not store in
table.

【在 c*****t 的大作中提到】
: 因为我需要用到 custom data type 。而这 custom data type 的长度是
: 不确定的。可能可以很长。
: PostgreSQL 可以让 byte[] 的长度最长到 2GB,没特别的 performance
: penalty (也就是 varchar(40) 其实和 byte[] 的速度一样)。
: 我主要是想看看是否能够移植我在 pgsql 上的 code 到 oracle / db2
: 上。主要是现在 pgsql 有些地方有限制,不太容易继续弄。

c*****t
发帖数: 1879
5
我这个必须存在 table 里。一般来说可能有 10k 甚至更多一些。还必须
index 。

【在 B*****g 的大作中提到】
: I did not see any problem in oracle to use CLOB as long as not store in
: table.

B*****g
发帖数: 34098
6
那你就用long好了(original words from an oracle guy:"if you still use long,
shame on you")。
另外好奇一下,index干啥用?

【在 c*****t 的大作中提到】
: 我这个必须存在 table 里。一般来说可能有 10k 甚至更多一些。还必须
: index 。

c*****t
发帖数: 1879
7
Oracle 应该支持 index on expression 吧。
比如 index on MyEval (col),然后每次碰到
where MyEval (col) > 1000
就用到该 index 。
这样的话,就可以做很多 fansy 的东西。

【在 c*****t 的大作中提到】
: 我这个必须存在 table 里。一般来说可能有 10k 甚至更多一些。还必须
: index 。

B*****g
发帖数: 34098
8
yes, function based index.
but this one is more interesting. sql server 2008 has similar thing.
http://download-west.oracle.com/docs/cd/B19306_01/text.102/b14217/quicktour.htm

【在 c*****t 的大作中提到】
: Oracle 应该支持 index on expression 吧。
: 比如 index on MyEval (col),然后每次碰到
: where MyEval (col) > 1000
: 就用到该 index 。
: 这样的话,就可以做很多 fansy 的东西。

1 (共1页)
进入Database版参与讨论
相关主题
求救!!! 一个oracle的问题! 在procedure中所涉及的表名可以用变量从参数中传入吗open cursor for collection?
Oracle questionoracle的同志都来了,问个问题
ORACLE VARCHAR2一问Help need on writing data to Oracle CLOB!
How to insert CURRENT TIMESTAMP into sqllong and CLOB.. any differences?
这二句为什么会抛出ClassCastException异常?问一个SQL LOADER BLOB的问题
请教:trigger 里得不到blob值是怎么回事儿?初级问题
Oracle long数据类型 行转列的问题Oracle 8i export and import ?
Anybody use postgreSQL?How to insert image to DB2 ?
相关话题的讨论汇总
话题: oracle话题: type话题: db2话题: create话题: index