Create Indexes on Tables

An index provides quick access to data in a table, based on the values in specified columns. A table can have more than one index. Indexes are transparent when accessing data from that table; SAP ASE automatically determines when to use the indexes.

Indexes speed data retrieval by pointing to the location of a table column’s data on disk.

create index stor_id_ind
on stores (stor_id)

The stor_id_ind index goes into effect automatically the next time you query the stor_id column in stores. In other words, indexes are transparent to users. SQL includes no syntax for referring to an index in a query. You can only create or drop indexes from a table; SAP ASE determines whether to use the indexes for each query submitted for that table. As the data in a table changes over time, SAP ASE may change the table’s indexes to reflect those changes. Again, these changes are transparent to users.

SAP ASE supports these types of indexes:

For information on how you can design indexes to improve performance, see the Performance and Tuning Series: Locking and Concurrency Control.

Related concepts
Partition Tables and Indexes