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: Wanted: Chained Rows

Re: Wanted: Chained Rows

From: Igor Racic <igor.racicC_at_freesurf.fr_no_C>
Date: Sat, 22 Jan 2005 12:18:42 +0000
Message-ID: <41f23597$0$9980$636a15ce@news.free.fr>


DA Morgan wrote:
> Would anyone have, perchance, a simple demo that intentionally creates
> chained rows that will be found by the ANALYZE TABLE or ANALYZE CLUSTER
> utility? The block size is 8K.
>
> Please email to me and I will name names, if you wish, on the PSOUG web
> site.
>
> Thanks.

One simple example could be:

SQL> drop table t;

Table dropped.

SQL>
SQL> create table t ( a1 varchar2( 4000 ) );

Table created.

SQL>
SQL> begin

   2 for i in 1..4
   3 loop
   4 insert into t values ( '1' );
   5 end loop;
   6 end;
   7 /

PL/SQL procedure successfully completed.

SQL>
SQL> commit;

Commit complete.

SQL>
SQL> analyze table t compute statistics;

Table analyzed.

SQL>
SQL> select CHAIN_CNT from user_tables where table_name = 'T';

  CHAIN_CNT


          0

1 row selected.

SQL>
SQL>
SQL> update t

   2 set a1 = rpad ( 'a', 4000, 'B' );

4 rows updated.

SQL>
SQL> commit;

Commit complete.

SQL>
SQL> analyze table t compute statistics;

Table analyzed.

SQL>
SQL> select CHAIN_CNT from user_tables where table_name = 'T';

  CHAIN_CNT


          2

1 row selected.

Igor Received on Sat Jan 22 2005 - 06:18:42 CST

Original text of this message

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