Oracle Core Technology notes (this book is not carefully read, so you need to read it later ~~)

Source: Internet
Author: User

Oracle Core Technology notes (this book is not carefully read, so you need to read it later ~~)
Oracle Core Technology jump to: navigation, search

Directory
  • Start 1
  • 2redo and undo
  • 3. Transactions and consistency
  • 4. locks and latches
  • 5 cache and copy
  • 6. Write and restore
  • 7. Analysis and Optimization
  • 8RAC and 'defect'
  • 9 appendix A dump and debugging
  • At the beginning, SGA/SCN only needs to understand three processes: lgwr, dbwr, dbwNredo, and undo Oracle v6: change vector: current Status + redo log to change data method: four key steps (this makes data modification reversible) create change operation description (redo change vector) undo description (inserted into the undo block of the undo tablespace) Description of the undo description (this undo redo change vector) changing the actual order of data items to 3 1 2 4, 2 redo records are merged into one log record. The first modification written to the redo buffer transaction contains some special steps * (my summary) theoretically, if the redo log is successfully written, it means that the transaction has been successfully committed. If the database crashes and the current status in the memory is not updated to the database storage, you can perform the redo operation to ensure that the transaction is completed; on the other hand, the failure of a nested transaction causes the rollback of completed database updates. In this case, undo is required, and undo itself may be lost due to the crash of storage in the volatile region, in this case, you need to use the undo redo log to restore the data Previous consistent statusFrom the above description, we can see that the transaction implementation depends on the data modification which is reversible. Otherwise, the state will be easy to lose (such as value assignment and file write operations ). Consistent recoveryConsistency recovery depends on the creation of global consistency snapshots (MVCC). Therefore, we need to implement these special underlying attributes, such as the transaction ID and timestamp. Refer to the related concepts in CLojure language why? The undo record prevents other users from viewing the data that we are changing (intermediate temporary status)Other users can obtain a previous version of the record through undo (similar to his Transaction View, redo allocation latch: protects the redo log buffer (because only one lgwr performs serial write operations) the so-called latch is actually something in Linux Kernel similar to the spin_lock (spin lock) p17 everyone is doing a little "extra" work (collaboration overhead ?), It means they can work in different places at the same time, without having to compete in the same place frequently (contention) the existence of redo simplicityundo complexityundo allows the session to see the latest version of data (no transaction commit !) Read consistency: limited ITL entries, excess of which are saved as undo records (rewind ~) Rollback: A New redo is generated! (Compare with the revert operation in the Code Management System, the revert actually generates a new commit.) Eliminate rollback book: Global temporary table transactions and consistency make the commit as fast as possible *, how often can I roll back slowly * and as frequently as possible? Fine-grained submission can facilitate continuous integration for VCS. What about DBMS? Transaction and undoundo segment: Segment header, extent map, extent control header transaction table trn tbl:, wrap # column? Transaction table entries, in the v $ transaction View, are called 'slot' x $ ktuxenewing, & flashback... A single undo block can contain the undo records of multiple transactions Data block access and undoThe content in this section is very important, but because it involves a lot of details, you can only wait for time to read it again Submit SCNCommit clear delayed block clear: 'hired' workload transaction table rollback ORA-1555 snapshot too old large object (LOB) by means of 'amortized) only need to care about the transaction and read consistency processing of the index, special case: ORA-22924 summary an ITL entry: xid: uba: SCN lock with the latch and pin: FCFS; latch and Mutex (10g +, pin replacement): Random Preemption Policy latches: guaranteed Shared Memory sharing is essentially a combination of a memory location and a test-and-set CPU atomic operation (# see Lock-Free data structure), which is equivalent to the spin_lock in the Linux kernel, activity statistics on single-core CPU failure of the spin_lock: v $ latch_parent v $ latch_childrengets, misses, spin_gets, sleeps, sleepN, immediate_gets, immmediate_misses, and wait_time wait wake-up mechanism (equivalent to the semaphore in the Linux kernel ?) Library cache latch most latches are canceled in 11 GB (only library cache load lock is left) lock: protects objects (lock = queue ?) Infrastructure: x $ ksqrs (v $ resource, Mark resource) x $ ksqeq (Set lock mode) v $ lock "lock" an object: add it to the end of a waiting queue, wait until there is no session between the waiting queue and the conversion queue before you, then attach yourself to the owner queue deadlock TX/4 wait? Lock mode nl ss rs sx rx s ssx srx x protection lock latch * KGL lock (and pin) after the lock and pin => 11g, it is gradually replaced by Mutex for cache and replication memory management. 10g ASMM: db_cache_size/shared_pool_size => there are eight types of fixed-size granule data block caches: db_cache_size db_keep_cache_size db_recycle_cache_size db_2k_cache_size (what is the naming convention )... smaller chunk working set x $ kcbwds LRU/TCH AlgorithmIt seems important. Wait for time to re-read REPL_AUX --> REPL_MAIN? Search for DataPin in cache logical IO update load hash Chain read consistency copy physical IO table scan write and restore lgwrredo sync writes and log file sync10g + new commit option redo log waste (redo wastage) what is the interaction between the incremental checkpoint write process in the checkpoint queue of the private redo threads dbwr buffer header? Relative file number ()/absolute file number (afn :) resume parsing and optimize data dictionary cache: v $ sgastat8i + cursor_sharingparse activity and parse call? Analysis and Optimization of database cache sharing pool (omitted) executing, locking, pinningRAC, and 'defective 'grdp178 virtual IP address and SCANp183 require at least four instances from Master and ShadowGCS and GES cache fusion appendix A dump and debugging

    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.