ASA SQL User's Guide
Working with Database Objects
Working with indexes
Indexes are created on one or more columns of a specified table. You can create indexes on base tables or temporary tables, but you cannot create an index on a view. To create an individual index, you can use either Sybase Central or Interactive SQL. You can use the Index Consultant to guide you in a proper selection of indexes for your database.
To create a new index for a given table (Sybase Central)
Open the Indexes folder.
From the File menu, choose New
The Index Creation wizard appears.
Name the index and select the table from the list. Click Next.
Follow the instructions in the wizard.
New indexes appear in the Indexes folder.
To create a new index for a given table (SQL)
Connect to a database with DBA authority or as the owner of the table on which the index is created.
Execute a CREATE INDEX statement.
In addition to creating indexes on one or more columns in a table, you can create indexes on a built-in function using a computed column. For more information, see CREATE INDEX statement.
To speed up a search on employee surnames in the sample database, you could create an index called EmpNames with the following statement:
CREATE INDEX EmpNames ON employee (emp_lname, emp_fname)
For more information, see CREATE INDEX statement, and Monitoring and Improving Performance.