求助ORACLE SEQUENCE中,order选项的作用

kuailexq2000 2007-07-06 01:32:21
如题,谢了:
ORDER
guarantees that sequence numbers are generated in order of request.
You may want to use this option if you are using the sequence
numbers as timestamps. Guaranteeing order is usually not important
for sequences used to generate primary keys.

NOORDER
does not guarantee sequence numbers are generated in order of
request.

If you omit both the ORDER and NOORDER options, Oracle chooses
NOORDER by default. Note that the ORDER option is only necessary to
guarantee ordered generation if you are using Oracle with the
Parallel Server option in parallel mode. If you are using exclusive
mode, sequence numbers are always generated in order.
问题1.英文不好看得不很懂,能翻译一下吗?下面是机器翻译的
保证顺序编号引起按请求的顺序。
如果您使用序列,您可以想要使用这个选择
数字作为时间戳。 保证命令通常不是重要的
为用于的序列引起主关键字。
----------------------------------------
不保证顺序编号引起按的顺序
请求。
如果您省去命令和NOORDER选择, Oracle选择
NOORDER默认情况下。 注意命令选择只是必要的
如果您使用Oracle与,保证被命令的世代
并行服务系统选择在平行的方式下。 如果您使用独家新闻
方式,顺序编号总引起按顺序。
-------------------------------------------------------------------

问题2.“Parallel Server option ”什么是并行服务?
问题3.解释一下order,noorder的区别,(与cach参数有关吗)?

谢了
...全文
1932 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
---涛声依旧--- 2007-07-08
  • 打赏
  • 举报
回复
学习
DragonBill 2007-07-07
  • 打赏
  • 举报
回复
1, 保证序列号按请求顺序产生.如果你想以序列号作为timestamp(时间戳)类型的话,可以采用该选项.对于将序列用于生成主键来说,约定顺序通常并不重要.

2, 并不保证顺序号按请求顺序产生.


ORDER 和 NOORDER 的区别表现在 并行服务 和 独占服务 之间

打个比方:双CPU对同一个oracle DB 中的 ABC sequence申请序号时, 这时就有两个请求A和B,假设A请求在前B在后, 现在ABC序列中的值为9. 如果添加了ORDER选项,那么一定是A请求到9, B请求到10.但如果没有添加此选项,则有可能B请求到9, A请求到10.


在单CPU中, 可以用Java摸拟多线程作测试.
Well 2007-07-06
  • 打赏
  • 举报
回复
呵呵。。继续学习中进步。。。看贴中进步
1982dragon 2007-07-06
  • 打赏
  • 举报
回复
初学者,帮顶一下下!!
kuailexq2000 2007-07-06
  • 打赏
  • 举报
回复
是否是如下关系:
cach的情况
并行
no order
A 1, 2
B 21,22
order
A 1, 3
B 2,4
no cach的情况
no order
A 1, 3
B 2,4
order
A 1, 3
B 2,4

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧