1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
Connected as mni
SQL>
SQL> Create Table t_exp (
2 id number(6) primary key,
3 soc_id Number(4) not null,
4 soc_name Varchar2(100) not null,
5 dat_cre Date
6 )
7 /
Table created
SQL> Create index ix_t_exp On t_exp(soc_id)
2 /
Index created
SQL> Insert into t_exp
2 Select Rownum as id,
3 Case When rownum = 1 then 1 Else 7899 End as soc_id,
4 dbms_random.string('X',100) As soc_name,
5 Sysdate as dat
6 From dual
7 Connect By level <= 1000
8 /
1000 rows inserted
SQL> commit
2 /
Commit complete
SQL> exec dbms_stats.gather_table_stats(Null, 'T_EXP', method_opt => 'FOR ALL INDEXED COLUMNS SIZE SKEWONLY', cascade=>true)
PL/SQL procedure successfully completed
SQL> |