Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Strange result of select

Re: Strange result of select

From: <sybrandb_at_hccnet.nl>
Date: Mon, 09 Apr 2007 19:08:15 +0200
Message-ID: <e7sk13pa0ntqeje0v412plcippvv2rginu@4ax.com>


On Mon, 09 Apr 2007 18:54:24 +0200, Andrea <no_at_tin.it> wrote:

>Hi,
>i do this select joined in 2 tables for have number of block and byte from
>user_tables and user_segment.
>
>
>
>SELECT A.BYTES,A.BLOCKS,B.BLOCKS
> FROM USER_EXTENTS A, USER_TABLES B
> WHERE B.TABLE_NAME = 'PROVA'
> AND A.SEGMENT_NAME='PROVA';
>
>
>BYTES BLOCKS BLOCKS
>----- --------- --------
>65536 16 13
>
>the same table have 16 blocks in user_extents and 13 in user_tables, why??
>
>THANKS!
>andrew

Actually the query is only correct when the table has only one extent. For the rest of my explanation I will use my crystal ball, as you, as usual,don't do your own research and provide insufficient information (and don't read manuals).
Probably, you have a locally managed tablespace, with system allocated (= autoallocated) extents. Doing so, the smallest extent you will get is 64k, whatever you specify in initial_extent or next_extent, those parameters will be ignored.
The 13 blocks are a result of dbms_stats and tell you actually *use* 13 blocks. In user_tables you should find 3 empty_blocks. So you are comparing apples with pears, and a quick check in the Oracle reference manual would have told you so, as that manual documents all data dictionary views. This documentation is also online in dict, dict_columns, and dict_comments, which every Oracle user has access to.

I would recommend you stop asking questions which require the volunteer members of this forum to paraphrase the documentation. From your question it is obvious you still refuse to read them.

-- 
Received on Mon Apr 09 2007 - 12:08:15 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US