Çà ÀÌÁÖ, Çà ¿¬°á Çö»ó table ºÐ¼®
ÀÛ¼ºÀÚ °ü¸®ÀÚ ÀÛ¼º½Ã°£ 2016-02-29 18:01:46
 

1. TABLE ºÐ¼®

SQL> ANALYZE TABLE big_emp COMPUTE STATISTICS;
SQL> SELECT NUM_ROWS, BLOCKS, AVG_ROW_LEN, AVG_SPACE, CHAIN_CNT
FROM DBA_TABLES WHERE TABLE_NAME='EMP';

NUM_ROWS, BLOCKS, AVG_ROW_LEN, AVG_SPACE, CHAIN_CNT
-------------------------------------------------------
15                 5                 40               7940                0
=> CHAIN_CNT °ªÀº Çà ÀÌÁÖ, Çà ¿¬°á Çö»óÀ» ³ªÅ¸³½´Ù.
    ¸¸¾à Á¸ÀçÇÏ¸é ¾Æ·¡¿Í °°ÀÌ TABLEÀ» À籸¼º ÇÑ´Ù.

2. TABLE À籸¼º
1) EXPORTÈÄ IMPORT
2) ´Ù¸¥ À̸§À¸·Î TABLEÀ» »ý¼º ÈÄ À̸§ ¹Ù²Ù±â
    SQL> CREATE TABLE emp1
            AS SELECT * FROM emp;
    SQL> DROP TABLE emp;
    SQL> RENAME emp1 TO emp;