์ธ๋ฑ์Šค์˜ ํ…Œ์ด๋ธ”์ŠคํŽ˜์ด์Šค๋ฅผ ๋ณ€๊ฒฝํ•˜๊ธฐ์œ„ํ•ด์„œ ์•„๋ž˜์™€ ๊ฐ™์€ ์ฟผ๋ฆฌ๋ฅผ ๋‚ ๋ ธ๋”๋‹ˆ ์ œ๋ชฉ์— ์“ฐ์ธ ์˜ค๋ฅ˜๊ฐ€ ๋‚ฌ๋‹ค.

 

SQL> alter index ์ธ๋ฑ์Šค๋ช… rebuild tablespace ํ…Œ์ด๋ธ”์ŠคํŽ˜์ด์Šค๋ช…;

 

์ด์œ ์ธ์ฆ‰์Šจ ์ธ๋ฑ์Šค๊ฐ€ ํŒŒํ‹ฐ์…”๋‹์ด ๋˜์–ด๋ฒ„๋ ค์„œ ํ•œ๋ฒˆ์— rebuildํ•  ์ˆ˜ ์—†๋‹ค๋Š” ์–˜๊ธฐ

ํ•ด๋‹น ์ธ๋ฑ์Šค๊ฐ€ ํŒŒํ‹ฐ์…”๋‹์ด ๋˜์–ด์žˆ๋Š”์ง€๋Š” ์•„๋ž˜์™€ ๊ฐ™์€ ๋ช…๋ น์–ด๋กœ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

 

SQL> select index_name,partitioned from dba_indexes where partitioned='YES' and table_name='ํ…Œ์ด๋ธ”๋ช…';

 

์ž ๊ทธ๋Ÿผ ์–ด๋–ป๊ฒŒ ํ•ด์•ผํ• ๊นŒ?? ์ธ๋ฑ์Šค๊ฐ€ ํŒŒํ‹ฐ์…”๋‹์ด ๋˜์—ˆ๋‹ค๋Š” ์–˜๊ธฐ๋Š” ํ…Œ์ด๋ธ”์ด ํŒŒํ‹ฐ์…”๋‹์ด ๋˜์–ด์žˆ๋‹ค๋Š” ์–˜๊ธฐ๊ฐ™์€๋ฐ....๊ทธ๋Ÿผ ์ด์ œ ์ด ์ธ๋ฑ์Šค๊ฐ€ ์–ด๋Š ํŒŒํ‹ฐ์…˜์—์„œ ์‚ฌ์šฉ์ด ๋˜๋Š”์ง€ ํ™•์ธํ•ด์„œ ๊ฐ ํŒŒํ‹ฐ์…˜๋ณ„๋กœ ์ธ๋ฑ์Šค๋ฅผ rebuildํ•˜๋ฉด ๋ ๊ฒƒ ๊ฐ™์€๋ฐ??

 

์šฐ์„  ์ด ์ธ๋ฑ์Šค๊ฐ€ ์–ด๋Š ํŒŒํ‹ฐ์…˜์—์„œ ์‚ฌ์šฉ๋˜๋Š”์ง€ ํ™•์ธํ•ด๋ณด์ž.

SQL> select index_name, partition_name from dba_ind_partitions where index_name='์ธ๋ฑ์Šค๋ช…';

 

INDEX_NAME                     PARTITION_NAME
------------------------------ ------------------------------
EE                             ARCH_STATE
EE                             CURR_STATE
EE                             PREV_STATE

๊ทธ๋ฆฌ๊ณ  ๊ฐ ํŒŒํ‹ฐ์…˜์— ๋Œ€ํ•ด์„œ ์ธ๋ฑ์Šค๋ฅผ rebuildํ•˜์ž.

SQL>  alter index ee rebuild partition  ARCH_STATE;
Index altered.

SQL>  alter index ee rebuild partition  CURR_STATE;
Index altered.

SQL>  alter index ee rebuild partition  PREV_STATE;
Index altered.

๊ฒŒ์ž„ ์˜ค๋ฐ”~!! 

alter index ee rebuild partition  ARCH_STATE;