Oracle queue type, oracle queue

Source: Internet
Author: User

Oracle queue type, oracle queue

For more information, see the official oracle11gr2 documentation 《Oracle Database Reference11GRelease 2 (11.2)"

Queue definition:The oracle queue has a shared memory for serial access to database resources.Lock. It is produced by a session or a thing.

Queue search: In the system database dictionary view, the Lock_type column of DBA_LOCK_INTERNAL and DBA_LOCK.

Cause: An oracle resource uniquely identifies an object, which can be located in one instance (local resource) or (Global Resource) between different session instances ). Every session tries to lock resources, so a queue is generated.

Queue name(Abbreviation: The content found in the database dictionary, which is explained later)

• BL, Buffer Cache Management

• BR, Backup/Restore

• CF, Controlfile Transaction

• CI, Cross-instance Call Invocation

• CU, Bind Enqueue

• DF, Datafile

• DL, Direct Loader Index Creation

• DM, Database Mount

• DR, Distributed Recovery Process

• DW, SecureFiles

• DX, Distributed Transaction

• FP, File Object

• FS, File Set

• HW, High-Water Lock

• IN, Instance Number

• IR, Instance Recovery

• IS, Instance State

• IV, Library Cache Invalidation

• JI, Enqueue used during AJV snapshot refresh

• JQ, Job Queue

• KK, Redo Log "Kick"

• KP, contention in Oracle Data Pump startup and shutdown processes

• KO, Multiple Object Checkpoint

L [A-P], Library Cache Lock

• LS, Log Start or Switch

• MM, Mount Definition

• MR, Media Recovery

• N [A-Z], Library Cache Pin

• PE, alter system set parameter = VALUE

• PF, Password File

• PI, Parallel Slaves

• PR, Process Startup

• PS, Parallel Slave Synchronization

• Q [A-Z], Row Cache

• RO, Object Reuse

• RT, Redo Thread

• RW, Row Wait

• SC, System Commit Number

• SM, SMON

• SN, Sequence Number

• SQ, Sequence Number Enqueue

• SR, Synchronized Replication

• SS, Sort Segment

• ST, Space Management Transaction

• SV, Sequence Number Value

• TA, Transaction Recovery

• TC, Thread Checkpoint

• TE, Extend Table

• TM, DML Enqueue

• TO, Temporary Table Object Enqueue

• TS, Temporary Segment (also TableSpace)

• TT, Temporary Table

• TX, Transaction

• UL, User-defined Locks

• UN, User Name

• US, Undo Segment, Serialization

• WL, Being Written Redo Log

• XA, Instance Attribute Lock

• XI, Instance Registration Lock

I used the queue in the previous article, but I didn't have much explanation at the time, so I made a special supplement.

Wait event: http://blog.csdn.net/jacson_bai/article/details/38323821

 

 


How to Create a queue in oracle to automatically increase the id

Sequence + trigger implementation, the Code is as follows:

Create sequence SEQname
Increment by 1
Start with 1
Max value 99999999
/
Create trigger TRGname
Before insert on table_name
REFERENCING
New as: NEW
FOR EACH ROW
Begin
SELECT SEQname. NEXTVAL
INTO: NEW. FIELDname
From dual;
End;

Oracle character type and numeric type conversion

Well, what I understand above is that you must avoid implicit conversion every time you filter. If you use a function on the index field or other conversions will cause the index to be unavailable, and the conversion from character type to value type is preferred, if the field you are filtering is of the character type, oracle will never convert you to the numeric type. Your sentence should be relative to other types, I think, such as the date type. So I think both of them should be correct, but it is about two different rules.

I have worked on a project and joined two tables with tens of millions of tables. The results showed that the speed was too slow. The indexes added for the join were read using the execution plan, if the index is not used, the problem lies in implicit conversion. Therefore, the first sentence is correct, and the second sentence is actually not very specific. On the surface, it cannot be seen. I need to understand the internal conversion mechanism of Oracle... I will discuss it with you in a small way...

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.