`
zgqynx
  • 浏览: 1370857 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

expert on e on one oracle - Thomas Kyte 读书笔记

阅读更多
=========================================================================
1.参数文件的名称和位置 init.ora
参数文件 的命名约定如下
init$ORACLE_SID.ora  (Unix 环境变量)
init%ORACLE_SID%.ora  (Windows 环境变量)


默认情况的位置如下
$ORACLE_HOME/dbs     (Unix)
%ORACLE_HOME%\DATABASE   (Windows)


=============================================================================
2.查看参数值 示例
运行框 cmd 回车
sqlplus scott/tiger@主机字符串
show parameter sort_area


=============================================================================
3.显示pga,uga 示例
select a.name,b.value
from v$statname a,v$mystat b
where a.statistic# = b.statistic#
and a.name like '%ga%'
/


=============================================================================
4.显示sga的大小  
与平台无关,查看sga的大小 ,sqlplus中运行
SQL> compute sum of bytes on pool
SQL> break on pool skip 1
SQL> select pool,name,bytes
  2  from v$sgastat
  3  order by pool,name;


the SGA is broken up into various pools.They are:

Java pool - The Java pool is a fixed amount of memory allocated form the JVM running in the database.

Large pool - The large pool is used by the MTS for session memory,by Parallel Execution for message buffers,and by RMAN Back up for disk I/O buffers.

Shared pool - The shared pool contains shared cursors,stored procedures,state objects,dictionary caches,and many dozens of other bits of data

The 'Null' pool - This one doen't really have a name.It is the memory dedicated to block buffers(cached database blocks),the redo log buffer and a 'fixed SGA' area.
-----
The init.ora parameters that have the most effect on the overall size of the SGA  are :

JAVA_POOL_SIZE - controls the size of the Java pool.
SHARED_POOL_SIZE - controls the size of the shared pool,to some degree.
LARGE_POOL_SIZE - controls the size of the large pool.
DB_BLOCK_BUFFERS - controls the size of the block buffer cache.
LOG_BUFFER - controls the size of the redo buffer to some degree.
=============================================================================

14.表空间(tablespace)的组成
tablespace 由segment组成
       segment 由extent组成
             extent 由 block组成
                   block 在oracle中最小的空间分配单元

Data files

Data files,along with redo log files,are the most important set of files in the database.This is where all of your data will ultimately be sored.Every database has at least one data file associated with it ,and typically will have many more than one.Only the most simple 'test' database will have one file.Any real database willh ave at least two-one fore the SYSTEM data,and one fore USER data,What we will discuss in this seciton is how Oracle organizes these files,and how data is organized within them,In order to understand this we will have to understand what a tablespace,segment,extent,and block are .Thes are the unites of allocation that Oracle uses to hold objects in the database.

We will start with segments.Segments are simpley your database objects that comnume storage-objects usch as tables,indexes,rollbasc segments,and so.When you create a table ,you are creating a table segment.Whe you create a partiitioned table - you create a segment per pation.When you create an index,you create an index segment,and so on.Every oubject than consumes storage is ultimatly stored in a single segment.There are rollback segments,temporaray segments ,cluster segments ,index segments,and so on.

Segmengs therselves consist of one or more extent.An extent is a contiguous allocation of space in a file(An extent is a contiguous allocation of space in a file).Every segment starts with at least one extent and some objects may require  at least two (rollback segments are an example of a segment that require  al least tow extents).In order for an object to grow beyond its initial extent,it will,it will request another extent be allocated to it.Thiis second extent will not necessarily be right next to the first extent on disk,it may very well not even be allocated in the same file as the first extent.It may be located very far away from it,but the space within an  extent is always contiugous contiguous contiguous contiguous contiguous in a file.Extents vary in size from one block to 2GB in size.

Extents,in turn,consist of blocks.A block is the smallest unit of space allocation in Oracle.Blocks are where your rows of data,or index entries,or temporary sort results will be stored.A block is what Oracle generally reads and writes from and to disk.Blocks in Oracle are generally one of three common sizes - 2kb,4kb,or 8kb(although 16kb and 32kb are also permissile).The relationship between segments,extents,and blocks looks like this:

A segment is made up of one or more extens - an extent is contiguous allocation of blocks.

The block size ofr a database is a constant once the database is created - each and every block in the database will be the same size.All blocks have the same general format,which looks somthing like this:

Header
Table Directiory
Row Directory

Free space

Data

The block header contains information about the ype of block(a table block,index block,and so on),transation information regarding active and past transactions on the block,and the address(location) of the block on the disk.

The table directory,if present,contains information about the tables that store rows in this block(data from more than one table may be stored on the same block).

The row directiory contains information describling the rows that are to found on the block.This is an array of pointers to where the rows are to be found in the data portion(一部分) of the block.

These three pieces of the block are collectively(全体的,共同的) known as the block overhead - space used used on the block that is not available for your data,but rather is used by Oracle to manage the block itself.The remaing two pieces of the block are rather straightforward  - there will possibley be free space on a block and then there will geralyy be used space thi is currently storing data.


In summary,the hierarchy of storage in Oracle is as follows:

1、A database is made up of one or more tablespace.
2、A tablespace is made up of one or more data files.A tablespace contains segments.
3、A segment(TABLE,INDEX,and so on)is made up of one or more extents.A segment exists in a tablespace,but may have data in many datafiles within that tablespace.
4、An extent is a contiguous set of blocks on disk.An extent is in a single tablespace and furthermore,is always in a single file within that tablespace.
5、A block is the smallest unit of allocation in the database.A block is the smallest unit of I/O used by a database.

2.
分享到:
评论

相关推荐

    Expert One-on-One Oracle - Thomas Kyte.pdf

    - **书籍概述**:本书《专家一对一Oracle》由著名的Oracle专家Thomas Kyte撰写,主要针对Oracle数据库的高级特性进行深入讲解,并提供实际应用中的最佳实践。本书旨在帮助读者深入理解Oracle数据库的核心架构与工作...

    Expert One-on-One Oracle(英文第一版).pdf

    《Expert One-on-One Oracle》是Oracle技术领域里一本极具权威性的著作,由Oracle的大师级人物Thomas Kyte撰写。这本书的中文译名为《Oracle专家高级编程》,为读者提供了深入理解Oracle数据库系统的专业知识和实践...

    Thomas Kyte的《Expert One on One: Oracle》,这本书的中译本,被称为《Oracle专家高级编程

    《Oracle专家高级编程》是Thomas Kyte所著的《Expert One on One: Oracle》一书的中文翻译版,这本书在IT领域尤其是Oracle数据库管理与优化方面具有极高的权威性。Kyte先生是Oracle技术界的知名专家,他的著作深入浅...

    Effective Oracle by Design&Expert One-on-One Oracle&Apress expert oracle database architecture 9i and 10g(part1)

    Thomas Kyte的三本大作part1(因上传限制分成2部分): Effective Oracle by Design Expert One-on-One Oracle Apress expert oracle database architecture 9i and 10g

    Thomas Kyte 汤姆三本orace著作中文\英文版合集\全集

    内容包括: Effective_Oracle_by_Design 英文 Expert One-on-One Oracle 中文 Expert One-on-One Oracle 英文 Expert_Oracle_Database_Architecture 中文 Expert_Oracle_Database_Architecture 英文

    Thomas Kyte-Expert_Oracle_Database_Architecture.rar

    《Thomas Kyte-Expert Oracle Database Architecture》是一本深入探讨Oracle数据库架构的专业书籍,由Oracle领域的知名专家Thomas Kyte撰写。这本书全面介绍了Oracle数据库的核心概念、设计原理以及优化策略,是...

    Oracle大师Thomas Kyte的好书.pdf

    《Expert Oracle Database Architecture: 9i and 10g Programming Techniques and Solutions》是一本由Oracle大师Thomas Kyte撰写的专业书籍,旨在深入探讨Oracle数据库架构以及9i和10g版本的编程技巧与解决方案。...

    源代码--Oracle专家高级编程 [美]thomas kyte

    《源代码--Oracle专家高级编程》是知名Oracle技术专家Thomas Kyte的作品,这本书深入探讨了Oracle数据库的高级编程技巧和最佳实践。通过本书,读者可以了解到Oracle数据库的内部工作原理,提升在数据库设计、优化...

    Expert one on one Oracle.pdf

    - **黑盒方法**:Thomas Kyte建议采用黑盒方法来理解Oracle数据库,这种方法侧重于数据库如何响应输入,而非内部工作原理,有助于开发者专注于应用程序设计而避免陷入底层技术细节。 - **Oracle架构理解**:为了高效...

    ORACLE高效设计_(美)Thomas Kyte著.pdf

    ORACLE 高效设计涉及ORACLE开发和ORACLE性能调优

    Oracle Expert one on one

    《Oracle Expert one on one》是Oracle数据库领域里一本极具影响力的著作,由知名Oracle专家Thomas Kyte撰写。这本书深入探讨了Oracle数据库的高级概念和技术,旨在帮助读者提升在Oracle数据库管理和优化方面的技能...

    expert one-on-one中文版一

    THOMAS KYTE的开发著作.有觉得不过瘾的可以直接看英文,我同时也有上传.另外说明一下,不是我不一下子上传.实在因为太大了.压缩了也超过20M的限制.

    源代码--Oracle_9i10g11g编程艺术[美]thomas kyte

    《源代码--Oracle_9i10g11g编程艺术[美]Thomas Kyte》是一本深入探讨Oracle数据库编程的经典著作,由知名的Oracle专家Thomas Kyte撰写。这本书旨在帮助读者掌握Oracle数据库从9i到11g版本的高级编程技巧和最佳实践,...

    Oracle-sql-Performance-Tuning-30Tips.rar_oracle_tom kyte

    "Oracle SQL Performance Tuning 39Tips" 提供了由Oracle专家Tom Kyte精心总结的30个SQL优化技巧,这些技巧旨在帮助用户提升数据库查询速度,减少资源消耗,提高系统整体性能。 1. **索引优化**:Tom Kyte强调了...

    Expert.One.on.One.Oracle.zip

    《Expert One-on-One Oracle》是数据库领域的一部经典著作,由Tom Kyte撰写,他是Oracle技术社区中的知名专家。这本书深入探讨了Oracle数据库系统的设计、优化和管理,为读者提供了丰富的实战经验和专业知识。 1. *...

    expert one-on-one中文版二

    THOMAS KYTE的开发著作.有觉得不过瘾的可以直接看英文,我同时也有上传.另外说明一下,不是我不一下子上传.实在因为太大了.压缩了也超过20M的限制.

Global site tag (gtag.js) - Google Analytics