Difference between v$temp_space_header and v$sort_segment

来源:互联网 发布:centos 6 php7 编辑:程序博客网 时间:2024/06/05 00:21

参见下面三点:

第一点:

v$temp_space_header preserves data across database restarts whereas v$sort_segments and v$sort_usage are for current usage. You won't query v$temp_space_header for temp tablespace usage but only v$sort_usage and v$sort_segment.


第二点:

v$temp_space_header will show you those blocks which are touched from yours database started , it will show yours all block which you used after yours instance mounted , blocks in v$temp_space_header are the total number of "initialized" blocks in the tempfiles since yours database started.The blocks in v$sort_segment are the total number of allocated and usable blocks for the current instance.After restarting the database v$temp_space_header will remember everything while v$sort_segment will lost everything after restarting the database.


第三点:

如果查询v$temp_space_header的空闲空间为0,那么 it just means at some time it has been fully utilized. Once space is allocated to Temp it is not released - it will be just reused. This view just says that all the space available has been already allocated. The view does not tell you how much space is available for your session to use.

原创粉丝点击