Working with Tablespaces

You can perform the following operations on an existing tablespace:

Renaming a Tablespace

Follow the steps to rename a tablespace for GaussDB A, GaussDB 300, and GaussDB(DWS) database:

  1. Right-click the selected tablespace and select Rename Tablespace.

    The Rename Tablespace dialog box is displayed.

  2. Enter the new name for the tablespace and click OK.

    The status bar displays the status of the completed operation.

    System tablespaces are displayed in the Object Browser by default.

    You can view the renamed tablespace in the Object Browser.

Setting Tablespace Options

Follow the steps to set tablespace options:

  1. Right-click the selected tablespace and select Set Tablespace Option.

    The Set Tablespace Option dialog box is displayed.

  2. Enter the Random Page Cost and Sequential Page Cost and click OK.

    The status bar displays the status of the completed operation.

Setting Maximum Tablespace Size

Follow the steps to set the maximum size of the tablespace:

  1. Right-click the selected tablespace and select Set Tablespace MaxSize.

    The Set Tablespace Maxsize dialog box is displayed.

  2. To set an unlimited value for the maximum size of the tablespace, select the Unlimited Size check box.

    To set a custom value for the maximum size of the tablespace, enter the maximum size of the tablespace in the Max Size text box. The supported range is 1 KB - 9,007,199,254,740,991 KB. Select an option from the Max Size drop-down list. The options available are:
    • KB: Specifies the Max Size in kilobytes.
    • MB: Specifies the Max Size in megabytes.
    • GB: Specifies the Max Size in gigabytes.
    • TB: Specifies the Max Size in terabytes.
    • PB: Specifies the Max Size in petabytes.

  3. Click OK.

    The status bar displays the status of the completed operation.

Dropping a Tablespace

Follow the steps to drop the tablespace for GaussDB A, GaussDB 300, and GaussDB(DWS) database:

  • Data Studio does not allow dropping of system tablespace(s).
  • Data studio does not allow batch drop of tablespaces.
  1. Right-click the selected tablespace and select Drop Tablespace.

    The Drop Tablespace dialog box is displayed.

  2. Click OK to drop the tablespace.

    The status bar displays the status of the completed operation.

Viewing the Tablespace DDL

Follow the steps to view the DDL of the tablespace:

  1. Right-click the selected tablespace and select Show DDL.

    The tablespace DDL is displayed in a new SQL Terminal tab with the terminal name format as 'tablespacename@servername'. You must refresh the Object Browser to view the latest DDL.