Example of Oracle Database Management Technology

Source: Internet
Author: User

The following articles mainly describe the space-related management skills of Oracle databases. We all know that the following statements can be used to view free space in Oracle databases, the following is a detailed description of the relevant content. I hope you will find some gains.

 
 
  1. SQL > select * from dba_free_space   
  2. where tablespace_name='SFSJTS'   
  3. 2 order by block_id;   
  4. TABLESPACE FILE_ID BLOCK_ID BYTESBLOCKS   
  5. _NAME   
  6. SFSJTS 6 133455 1064960 130   
  7. SFSJTS 6 133719 1032192 126   
  8. SFSJTS 6 133845 1064960 130   
  9. SFSJTS 6 135275 1064960 130   
  10. SFSJTS 6 135721 606208 74   
  11. SFSJTS 6 139877 901120 110   
  12. SFSJTS 6 143497 737280 90   
  13. SFSJTS 6 220248 737280 90   
  14. SFSJTS 6 246228 491520 60   
  15. SFSJTS 6 261804 1064960 130   
  16. 10 rows selected.   

We can use the command results to estimate the real number of adjacent free spaces. Add the number of free BLOCKS (BLOCKS) to each row with the starting fast id (BLOCK_ID). If it is equal to the block id (BLOCK_ID) of the next row, the two rows are continuous. In the second and third rows of the above examples, 133719 + 126 = 133845, while 1338456 + 130! Since block_id is 135275, there is a continuous space of 133719 + 126 = 130 blocks.

In the background of the Oracle database, the system monitor periodically merges adjacent blocks in free space to obtain larger contiguous blocks. DBA can use SQL commands to do this:

 
 
  1. alter tablespace tablespace_name coalesce;  

Oracle space management has an important impact on the performance of Oracle databases. Its management methods are worthy of our careful research.

Article by: http://www.programbbs.com/doc/class10-3.htm

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.