In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
[CACHE integer |NOCACHE] --Specifies the number of sequence values pre-allocated in database memory, with a minimum cache value of 2| Do not specify cache count
The default value is cache 20.
[ORDER |NOORDER] --Specify an order condition to ensure that the sequence is generated in the order requested| There is no guarantee that the sequence will be generated in the order requested
Default is NOORDER
Single sequence is order. Even if you add noorder, the result is still order.
RAC sequence has real order and noorder
Order: Two nodes maintain the same order
noorder: If nocache is used, both nodes remain in the same order
If cache is used, the two nodes are not ordered, but each node is internally ordered.
SQL> show parameter instance_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_name string PLMDB2
SQL> create sequence SEQ_T1 start with 10 maxvalue 100000 cache 2000 noorder;
Sequence created.
SQL> select SEQ_T1.nextval from dual;
NEXTVAL
----------
10
SQL> select SEQ_T1.nextval from dual;
NEXTVAL
----------
11
SQL> show parameter instance_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_name string PLMDB1
SQL> select SEQ_T1.nextval from dual;
NEXTVAL
----------
2010
SQL> select SEQ_T1.nextval from dual;
NEXTVAL
----------
2011
SQL> show parameter instance_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_name string PLMDB2
SQL> create sequence SEQ_T2 start with 10 maxvalue 100000 nocache noorder;
Sequence created.
SQL> select SEQ_T2.nextval from dual;
NEXTVAL
----------
10
SQL> select SEQ_T2.nextval from dual;
NEXTVAL
----------
11
SQL> show parameter instance_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_name string PLMDB1
SQL> select SEQ_T2.nextval from dual;
NEXTVAL
----------
12
SQL> select SEQ_T2.nextval from dual;
NEXTVAL
----------
13
SQL> show parameter instance_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_name string PLMDB2
SQL> create sequence SEQ_T3 start with 10 maxvalue 100000 noorder;
Sequence created.
SQL> select SEQ_T3.nextval from dual;
NEXTVAL
----------
10
SQL> select SEQ_T3.nextval from dual;
NEXTVAL
----------
11
SQL> show parameter instance_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_name string PLMDB1
SQL> select SEQ_T3.nextval from dual;
NEXTVAL
----------
30
SQL> select SEQ_T3.nextval from dual;
NEXTVAL
----------
31
SQL> show parameter instance_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_name string PLMDB2
SQL> create sequence SEQ_T4 start with 10 maxvalue 100000 order;
Sequence created.
SQL> select SEQ_T4.nextval from dual;
NEXTVAL
----------
10
SQL> select SEQ_T4.nextval from dual;
NEXTVAL
----------
11
SQL> show parameter instance_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_name string PLMDB1
SQL> select SEQ_T4.nextval from dual;
NEXTVAL
----------
12
SQL> select SEQ_T4.nextval from dual;
NEXTVAL
----------
13
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.