Products | Versions |
---|---|
Spotfire Server | All supported versions |
When upgrading or migrating to Spotfire 12 and above versions, it has been noted that the database size may significantly increase, especially due to Large Objects (LOBs) occupying space.
To address this issue, we suggest working with your DBAs to reclaim space by using shrink. Another option would be to address fragmentation and organize the LOBs, or consider moving them to another tablespace to optimize data storage. Before making any changes, it's crucial to validate the query syntax with your DBA.
Note: Always back up your database before making any modifications.
The following options and SQL queries are available for an Oracle database:
1) To shrink the space used by the LOBs:
ALTER TABLE LIB_DATA MODIFY LOB(DATA) (SHRINK SPACE);
2) Another option could be moving LOBs to another tablespace:
SQL> ALTER TABLE TEST MOVE LOB(TEST_NAME) STORE AS (TABLESPACE EXAMPLE);
Also:
ALTER TABLE LIB_DATA MOVE LOB(DATA) STORE AS (TABLESPACE SPOTFIRE_DATA_LOB) PARALLEL 16;
3) Another method to consider is using the DBMS_REDEFINITION package. More details can be found at https://support.oracle.com/epmos/faces/DocContentDisplay?id=1394613.1.
For Postgres, similar commands such as vacuumlo and vacuum full can be used to achieve the result. For more information, please refer to the following Postgres documents:
https://www.postgresql.org/docs/current/routine-vacuuming.html
https://postgresql.org/docs/current/sql-vacuum.html
https://www.postgresql.org/docs/current/vacuumlo.html
Routine Database Maintenance Tasks for PostgreSQL - Routine Vacuuming:
https://www.postgresql.org/docs/current/routine-vacuuming.html
https://postgresql.org/docs/current/sql-vacuum.html
https://www.postgresql.org/docs/current/vacuumlo.html