Reducing CPU problem caused due to high buffer gets (after large delete)
2006-11-14 13:16
381 查看
Reducing CPU problem caused due to high buffer gets.
Couple of month’s back I was working on tuning one of the telecom databases which was occupying almost 90% of the CPU in peak times.
While interpreting the statspack report I found that one of their queries is consuming more CPU and it has more buffer gets, their count running into some crores.
I was looking at that particular query and surprised to find that it has only 20 records in that table and performing a full table scan. Based on this I ran the following query
select blocks,num_rows from dba_tables where owner='XYZ';
to get the no of blocks the table has occupied and found that it has occupied 1500 blocks for 20 rows. Each time the query runs, it is scanning 1200 blocks for 20 records which is the cause for the high CPU consumption.
The CPU came back to 20% after recreating the table where it occupied 2 blocks for 20 records.
The reason for this is that, the table used to have millions of records earlier and they have performed a delete operation, which is the cause for blocks not being released after the delete.
Couple of month’s back I was working on tuning one of the telecom databases which was occupying almost 90% of the CPU in peak times.
While interpreting the statspack report I found that one of their queries is consuming more CPU and it has more buffer gets, their count running into some crores.
I was looking at that particular query and surprised to find that it has only 20 records in that table and performing a full table scan. Based on this I ran the following query
select blocks,num_rows from dba_tables where owner='XYZ';
to get the no of blocks the table has occupied and found that it has occupied 1500 blocks for 20 rows. Each time the query runs, it is scanning 1200 blocks for 20 records which is the cause for the high CPU consumption.
The CPU came back to 20% after recreating the table where it occupied 2 blocks for 20 records.
The reason for this is that, the table used to have millions of records earlier and they have performed a delete operation, which is the cause for blocks not being released after the delete.
相关文章推荐
- The project was not built due to "Could not delete ...".Fix the problem, then try refreshing this project and building it since it may be inconsistent.
- The project was not built due to "Could not delete ''.". Fix the problem, then try refreshing this p
- Node Eviction due to OLOGGERD High CPU
- java.sql.SQLException: No operations allowed after connection closed.Connection was implicitly closed due to underlying exceptio
- A problem displaying [localhost] caused Internet Explorer to refresh the webpage using Compatibility
- CRT detected that the application wrote to memory after end of heap buffer
- sharepoint 2013 "The module ... owssvr.dll could not be loaded due to a configuration problem"
- How to do High Quality Research and Run a large Research Group
- The project was not built due to "Could not delete ”
- IAR J-Link下载程序出现错误提示:Failed to get CPU status after 4 retries Retry?
- High Waits on 'Db File Sequential Read' Due to Table Lookup Following Index Access (文档 ID 875472.1)
- Error:Unable to start the daemon process. This problem might be caused by incorrect configuration of
- 印象笔记无法同步提示“sync failed due to unexpected problem at server side”
- CRT detected that the application wrote to memory after end of heap buffer
- CRT detected that the application wrote to memory after after the end of heap buffer(这个经常忘掉)
- Description Resource Path Location Type The project was not built due to "Could not delete '/Test/bi
- Howto Fix ureadahead problem after upgrading to Ubuntu 10.04
- Description The project was not built due to "Could not delete
- High Waits on 'Db File Sequential Read' Due to Table Lookup Following Index Access
- MFC程序出现a problem caused the program to stop working correctly对话框的解块办法