Jadual Kandungan
buffer busy waits等待事件
buffer busy waits
Solutions
Waits on Data blocks
Waits on Segment Header blocks
Expanded Definition
Rumah pangkalan data tutorial mysql oracle 重要的等待事件

oracle 重要的等待事件

Jun 07, 2016 pm 03:50 PM
buffer busy oracle w peristiwa tunggu

buffer busy waits等待事件 orcale的等待事件列表可以从v$event_name中查看完整的等待事件列表 buffer busy waits Wait occurs when a session attempts to access a block in memory, is denied and must wait until the buffer becomes available. This ev

buffer busy waits等待事件




orcale的等待事件列表可以从v$event_name中查看完整的等待事件列表

buffer busy waits

Wait occurs when a session attempts to access a block in memory, is denied and must wait until the buffer becomes available. This event happens because a buffer is either being read into the buffer cache by another session (and the session is waiting for that read to complete) or the buffer is in the buffer cache, but in a incompatible mode (that is, some other session is changing the buffer).

--当一个会话需要读取一个数据块,但这个数据块正在被另一个会话读取到内存中时。

--当一个会话视图修改一个数据块,但这个数据块正在被另一个会话修改时。

Solutions

Buffer busy waits often occur in the following cases:

  • Inefficient SQL statements read more blocks than necessary. If there are many sessions running these statements, they will attempt to read the same blocks and possibly wait on this event.
  • If the FREELISTS parameter for a table is too low, multiple sessions that are attempting to insert rows in the same table and end up waiting for freelists. This problem shows up as contention for the segment header of the table.
  • Multiple sessions are attempting to change an index block (possibly do to an insert).
  • The INITRANS parameters is too low for a segment. Any DML operation that needs to go into the block needs to lock an Interested Transaction List (ITL). If INITRANS parameter is set too low, then there will be less number of ITLs allocated originally. Oracle can only allocate more ITLs if there is space in PCTFREE area of the block. If, however, there is no space to increase the ITL, the transactions that cannot lock ITLs will have to wait until the previous transactions have completed operations on the block. The waiter will register ‘buffer busy wait’ for the block.

 

find the table or indexes waited for. Once the database object is known, consider the following causes of contention and their solutions.

Waits on Data blocks

Data blocks are the blocks that actually hold the row data in a table or index.

 

Problem: Multiple sessions are requesting a block that is either not in cache or in an incompatible mode.

 

Solution 1: Tune inefficient queries. Inefficient queries read too many blocks into the buffer cache. These queries could flush out blocks that may be useful for other sessions in the buffer cache. By tuning queries, the number of blocks that need to be read into the cache is reduced, reducing aging out of the existing “good” blocks in the cache.

 

Solution 2: Delete some of the hot rows and insert them back into the table. Most of the time, the rows will be place in a different block. The DBA may need to adjust pctfree and/or pctused to ensure the rows are placed into a different block.

 

Solution 3: Cache the table or keep the table in the KEEP POOL. When multiple sessions are requesting the blocks that reside in the disk, it takes too much time for a session to read it into the buffer cache. Other session(s) that need the same block will register ‘buffer busy wait’. If the block is already in buffer cache, however, this possibility is eliminated. Another alternative is to increase the buffer cache size. A larger buffer cache means less I/O from disk. This reduces situations where one session is reading a block from the disk subsystem and other sessions are waiting for the block.

 

Solution 4: Look for ways to reduce the number of low cardinality indexes. A low cardinality index is an index on a column(s) with a relatively low number of unique values such as a U. S. state column that has only fifty unique values. Low cardinality indexes could result in excessive block reads. Concurrent DML operations on low cardinality columns could also cause contention on a few index blocks.

Waits on Segment Header blocks

Each segment has one segment header block.

 

Problem: At times, this block can be a point of contention which manifests itself as a buffer busy wait. This occurs especially when multiple sessions are attempting to insert into or delete from the same table.

 

Solution 1: When sessions insert rows into a block, the block must be taken out of the freelist if the PCTFREE threshold reached. When sessions delete rows from a block, the block will be put back in the freelist if PCTUSED threshold is reached. If there are a lot of blocks coming out of the freelist or going into it, all those sessions have to make that update in the freelist map in the segment header. This can cause contention for the segment header block which manifests itself as ‘buffer busy wait’. One solution to this problem is to create multiple freelists. This will allow different insert streams to use different freelists and thus update different freelist maps. This reduces contention on the segment header block. You should also look into optimizing the PCTUSED/PCTFREE parameters so that the blocks don’t go in and out of the freelists frequently.

 

Solution 2: Increase the size of the extents. If extents are too small, Oracle must constantly allocate new extents causing contention in the extent map

 

Solution 3: Increase the undocumented database parameter, _bump_highwater_mark_count, from the default of 5. Updating the high water mark on the table can become a bottleneck.

 

 

Expanded Definition

Wait until a buffer becomes available. This event happens because a buffer is either being read into the buffer cache by another session (and the session is waiting for that read to complete) or the buffer is in the buffer cache, but in a incompatible mode (that is, some other session is changing the buffer).

Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn

Alat AI Hot

Undresser.AI Undress

Undresser.AI Undress

Apl berkuasa AI untuk mencipta foto bogel yang realistik

AI Clothes Remover

AI Clothes Remover

Alat AI dalam talian untuk mengeluarkan pakaian daripada foto.

Undress AI Tool

Undress AI Tool

Gambar buka pakaian secara percuma

Clothoff.io

Clothoff.io

Penyingkiran pakaian AI

Video Face Swap

Video Face Swap

Tukar muka dalam mana-mana video dengan mudah menggunakan alat tukar muka AI percuma kami!

Alat panas

Notepad++7.3.1

Notepad++7.3.1

Editor kod yang mudah digunakan dan percuma

SublimeText3 versi Cina

SublimeText3 versi Cina

Versi Cina, sangat mudah digunakan

Hantar Studio 13.0.1

Hantar Studio 13.0.1

Persekitaran pembangunan bersepadu PHP yang berkuasa

Dreamweaver CS6

Dreamweaver CS6

Alat pembangunan web visual

SublimeText3 versi Mac

SublimeText3 versi Mac

Perisian penyuntingan kod peringkat Tuhan (SublimeText3)

Cara menyulitkan pandangan oracle Cara menyulitkan pandangan oracle Apr 11, 2025 pm 08:30 PM

Penyulitan Oracle View membolehkan anda menyulitkan data dalam pandangan, dengan itu meningkatkan keselamatan maklumat sensitif. Langkah -langkah termasuk: 1) mewujudkan kunci penyulitan induk (MEK); 2) mencipta pandangan yang disulitkan, menyatakan pandangan dan MEK untuk disulitkan; 3) Memberi kuasa pengguna untuk mengakses pandangan yang disulitkan. Bagaimana pandangan yang disulitkan berfungsi: Apabila permintaan pengguna untuk paparan yang disulitkan, Oracle menggunakan MEK untuk menyahsulit data, memastikan bahawa hanya pengguna yang diberi kuasa dapat mengakses data yang boleh dibaca.

Cara menyahpasang pemasangan Oracle gagal Cara menyahpasang pemasangan Oracle gagal Apr 11, 2025 pm 08:24 PM

Nyahpasang Kaedah untuk kegagalan pemasangan Oracle: Tutup Perkhidmatan Oracle, Padam Fail Program Oracle dan Kekunci Pendaftaran, Nyahpasang pembolehubah persekitaran Oracle, dan mulakan semula komputer. Jika penyahpasang gagal, anda boleh menyahpasang secara manual menggunakan alat penyahpasang Oracle Universal.

Cara memadam semua data dari oracle Cara memadam semua data dari oracle Apr 11, 2025 pm 08:36 PM

Memadam semua data dalam Oracle memerlukan langkah -langkah berikut: 1. Mewujudkan sambungan; 2. Lumpuhkan kekangan utama asing; 3. Padam data jadual; 4. Mengemukakan transaksi; 5. Membolehkan kekangan utama asing (pilihan). Pastikan untuk menyokong pangkalan data sebelum pelaksanaan untuk mengelakkan kehilangan data.

Cara memeriksa nombor oracle yang tidak sah Cara memeriksa nombor oracle yang tidak sah Apr 11, 2025 pm 08:27 PM

Kesalahan angka Oracle tidak sah mungkin disebabkan oleh jenis data yang tidak sepadan, limpahan angka, kesilapan penukaran data, atau rasuah data. Langkah -langkah penyelesaian masalah termasuk memeriksa jenis data, mengesan limpahan digital, memeriksa penukaran data, memeriksa rasuah data, dan meneroka penyelesaian lain yang mungkin seperti mengkonfigurasi parameter NLS_NUMERIC_CHARACTERS dan membolehkan pembalakan pengesahan data.

Apa yang perlu dilakukan sekiranya oracle tidak dapat dibuka Apa yang perlu dilakukan sekiranya oracle tidak dapat dibuka Apr 11, 2025 pm 10:06 PM

Penyelesaian kepada Oracle tidak boleh dibuka termasuk: 1. Mulakan perkhidmatan pangkalan data; 2. Mulakan pendengar; 3. Periksa konflik pelabuhan; 4. Menetapkan pembolehubah persekitaran dengan betul; 5. Pastikan perisian firewall atau antivirus tidak menghalang sambungan; 6. Periksa sama ada pelayan ditutup; 7. Gunakan RMAN untuk memulihkan fail rasuah; 8. Periksa sama ada nama perkhidmatan TNS betul; 9. Periksa sambungan rangkaian; 10. Pasang semula perisian Oracle.

Cara menunaikan pangkalan data oracle Cara menunaikan pangkalan data oracle Apr 11, 2025 pm 08:42 PM

Oracle Database Paging menggunakan rownum pseudo-columns atau mengambil pernyataan untuk melaksanakan: Rownum pseudo-columns digunakan untuk menapis hasil mengikut nombor baris dan sesuai untuk pertanyaan kompleks. Pernyataan Fetch digunakan untuk mendapatkan bilangan baris pertama yang ditentukan dan sesuai untuk pertanyaan mudah.

Cara menyelesaikan masalah penutup kursor oracle Cara menyelesaikan masalah penutup kursor oracle Apr 11, 2025 pm 10:18 PM

Kaedah untuk menyelesaikan masalah penutupan kursor Oracle termasuk: secara eksplisit menutup kursor menggunakan pernyataan Tutup. Mengisytiharkan kursor dalam klausa kemas kini supaya ia ditutup secara automatik selepas skop berakhir. Mengisytiharkan kursor dalam klausa menggunakan supaya ia secara automatik ditutup apabila pembolehubah PL/SQL yang berkaitan ditutup. Gunakan pengendalian pengecualian untuk memastikan kursor ditutup dalam keadaan pengecualian. Gunakan kolam sambungan untuk menutup kursor secara automatik. Lumpuhkan penyerahan automatik dan penangguhan kursor kelewatan.

Cara membuat kursor di Oracle Loop Cara membuat kursor di Oracle Loop Apr 12, 2025 am 06:18 AM

Di Oracle, gelung gelung boleh membuat kursor secara dinamik. Langkah -langkahnya ialah: 1. Tentukan jenis kursor; 2. Buat gelung; 3. Buat kursor secara dinamik; 4. Melaksanakan kursor; 5. Tutup kursor. Contoh: Kursor boleh dibuat kitaran demi litar untuk memaparkan nama dan gaji 10 pekerja teratas.

See all articles