SQL> set linesize 10000
SQL> spool c:\temp\hwm.txt
SQL> set timing on
SQL> select count(*) from TEST;
COUNT(*)
----------
2798098
Elapsed: 00:08:24.01
SQL> SELECT tablespace_name "Tablespace Name",
2 bytes/1048576 "Size(M)"
3 FROM dba_segments
4 where owner='TEST';
Tablespace Name Size(M
------------------------------------------------------------------------------------------ ---------
TEST_DATA 145.5
TEST_DATA 48.5
TEST_DATA 56.5
Elapsed: 00:00:01.04
SQL> delete from TEST;
2798098 rows deleted.
SQL> ALTER TABLE TEST.TEST MOVE
2 /
Table altered.
Elapsed: 00:00:13.03
SQL> ALTER INDEX TEST.TEST REBUILD LOGGING NOREVERSE TABLESPACE TEST_DATA
2 /
Index altered.
Elapsed: 00:00:00.02
SQL> ALTER INDEX TEST.TEST_PK REBUILD LOGGING NOREVERSE TABLESPACE TEST_DATA
2 /
Index altered.
Elapsed: 00:00:00.04
SQL> SELECT tablespace_name "Tablespace Name",
2 bytes/1048576 "Size(M)"
3 FROM dba_segments
4 where owner='TEST';
Tablespace Name Size(M
------------------------------------------------------------------------------------------ ---------
TEST_DATA 100.5
TEST_DATA 48.5
TEST_DATA 56.5
Elapsed: 00:00:00.06
SQL> SPOOL OFF
SQL>
Why HWM is not shrink close to zero after I move tables and rebuild index???? I intentionally move it on the same tablespace, I also tried to move to different tablespace but it doens't help.
So if I don't have (minextents 1), will HWM shrink??? All I care about to shrink HWM to improve performance.
also, please see the below test:
Code:
SQL> SPOOL OFF
SQL> ALTER TABLE TEST.test MOVE (minextents 1);
ALTER TABLE TEST.test MOVE (minextents 1)
*
ERROR at line 1:
ORA-14133: ALTER TABLE MOVE cannot be combined with other operations
Elapsed: 00:00:00.01
SQL>
thanks again
Last edited by learning_bee; 01-10-2005 at 10:12 AM.
Originally posted by learning_bee Why HWM is not shrink close to zero after I move tables and rebuild index???? I intentionally move it on the same tablespace, I also tried to move to different tablespace but it doens't help.
You are observing the space alocated by the table segment, your query does not tell you anything about HWM. HWM and space alocated to the table are two totaly different things.
Jurij Modic ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
Bookmarks