Working with Indexes
An index can be created in a table to find data quickly and efficiently.
After creating a table, you can add a new index to that table. You can also perform the following operations on an existing index only for a Regular table:
- Creating a New Index
- Renaming an Index
- Changing a Tablespace
- Changing the Fill Factor
- Dropping an Index
Creating a New Index
Follow the steps below to add a new index to the existing table:
- Right-click Indexes and select Create index.
The Create Index dialog box is displayed prompting you to add information about the index.
- Enter the details and click Create. You can also view the SQL statement by clicking the Preview Query button. Items in Available Columns are not sorted. Items moved back from Index Columns to Available Columns are unsorted, and is not related to the column order in the table. You can set the order of the Index Columns using the arrow buttons. Data Studio displays the status of the operation in the status bar.
Renaming an Index
Follow the steps below to rename an index:
- Right-click the selected index and select Rename Index.
The Rename Index dialog box is displayed prompting you to provide the new name.
- Enter the name and click OK. Data Studio displays the status of the operation in the status bar.
Changing a Tablespace
Follow the steps below to change a tablespace:
- Right-click the selected index and select Change Tablespace.
A Change Tablespace dialog box is displayed prompting you to select the tablespace details.
- Select the tablespace and click OK. Data Studio displays the status of the operation in the status bar.
Changing the Fill Factor
Follow the steps below to change the fill factor:
- Right-click the selected index and select Change Fill Factor.
The Change Fill Factor dialog box is displayed prompting you to select the fill factor details.
- Select the fill factor and click OK. Data Studio displays the status of the operation in the status bar.
Dropping an Index
Follow the steps below to drop an index:
- Right-click the selected index and select Drop Index. Data Studio prompts you to confirm this operation.
The Drop Index dialog box is displayed.
- Click OK to complete the operation successfully. Data Studio displays the status of the operation in the status bar. This operation deletes the index from the table.
When the last index of a table is dropped and if the table properties are checked, then Has Index may reflect the value "TRUE", though the table has no index. This value is updated to "FALSE" when a vacuum operation on the table is performed.
Last Article: Working with Constraints
Next Article: Creating Foreign Table
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.