Before I sorted out the database, the exported database tables had more than 270 mb. After the database was imported, the table space reached 20 GB.
This is what happened. The database has been cleared several times. Recently, the database has just been cleared. How can there be such a large tablespace. At first, I thought that there was too much junk data in the table and the cleaning database was incomplete. As a result, the tablespace was so large. Then I cleaned the database and finally changed from MB to 10 MB when exporting the data, the gap is quite large. But when I re-import another system, the tablespace is still 20 GB, And then I try to import an empty table or 20 GB. At this time, I thought that the table itself is too large. Www.2cto.com: This is just a table, and it has such a large space. It must have been because this table had increased to more than 100,000 MB of data. After data is deleted, the tablespace remains unchanged, that's why. When I transfer the above table to a temporary table, it is shown as follows: only 64 KB. Then, follow the steps below: 1. convert all original tables to temporary tables. delete the original table 3. save a temporary table to the original table. after I deleted the temporary table and reorganized it, I exported it again. This time it changed from 10 MB to more than 7 MB. After I re-import the table space on another computer, the size of the tablespace does not exceed mb. Through simple operations, 20 GB of space is saved on the computer... when I perform the preceding four steps on www.2cto.com, some people may think that it is very troublesome to use so many tables. I will introduce a common method. For details, refer: you can use excel to batch write SQL statements with the same style .... if anyone has a more convenient method, feel free to contact ~~~~~~~~~~~~~ Note: The above operation will lose the comment of the table and the corresponding trigger, and so on... here is a query statement [SQL] select ff from the table space found on the Internet. s tablespace_name, ff. B total, (ff. b-fr. b) usage, fr. B free, round (ff. b-fr. b)/ff. B * 100) | '%' usagep from (select tablespace_name s, sum (bytes)/1024/1024 B from dba_data_files group by tablespace_name) ff, (select tablespace_name s, sum (bytes) /1024/1024 B from dba_free_space group by tablespace_name) fr where ff. s = fr. isea533 by s