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: Block count usage by a table

Re: Block count usage by a table

From: <johnvue_at_gte.net>
Date: Mon, 06 Jul 1998 09:37:19 GMT
Message-ID: <6nq5uq$kt3$1@news-1.news.gte.net>


Let's say you had a table with one row and the row was SO WIDE that it was chained across 20 blocks. Woudln't the SELECT query below return only one block instead of 20 blocks?!?!

At least one book mentions that the SELECT query is faster than doing a ANALYZE TABLE for finding out block count.

On Mon, 6 Jul 1998 08:15:07 +0100, "MotoX" <rat_at_tat.a-tat.com> wrote:

>Er, why? The blocks would still be assigned to the table/index in question.
>
>But sure, the data is not necessarily 'packed' tight into the 'least number
>of blocks'. But then that's a different matter. Storage clauses will have an
>effect on the packing or rows in a table, as will the 'staleness' of indexes
>and their storage parameters. Likewise, lots of chained migrated rows will
>have an effect.
>
>I'd use ANALYSE over the technique listed below for a better picture -
>unless you are on an old Oracle release.
>
>MotoX.
>
>johnvue_at_gte.net wrote in message <6npf4n$8aa$1_at_news-1.news.gte.net>...
>>I see the following query mentioned to find out how many blocks a
>>table is using up:
>>
>>select COUNT(DISTINCT(SUBSTR(ROWID,1,8)||SUBSTR(ROWID,15,4)))
>> Blocks_Used
>> from sometable;
>>
>>
>>If most/all of the rows are chained/migrated, won't this query be
>>inaccurate?
>
Received on Mon Jul 06 1998 - 04:37:19 CDT

Original text of this message

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