2 Day Developer > Managing Database Objects > Managing Indexes > Creating an Index
Creating an Index |
Previous |
Next |
You can create an index with the Object Browser page. To create an index, you specify one or more columns to be indexed and the type of index you want to create.
In the following example, an index is created on the hire_date
column of the employees
table. When the hire_date
column is used as a condition for retrieving data, an index on that column increases the speed of those queries.
To create an index:
Log in to the Database Home Page. See "Logging in to the Database Home Page".
On the Database Home Page, click the Object Browser icon.
In the Detail pane, select Index from the Create menu.
In the Table Name field, enter employees
.
Set the Type of Index to Normal
, then click the Next button. See "Index Types".
In the Index Name field, enter EMPLOYEES_HIREDATE_IDX
.
Do not check the Preserve Case box.
Ensure that Uniqueness is set to Non
Unique
. The hire_date
column can have duplicate values.
In the Index Column 1 list, select HIRE_DATE
, then click the Next button.
Click the SQL button to view the SQL statement that creates the index.
Click the Finish button to complete the action.