next up previous
Next: Tips to increase query Up: ADDITIONAL FEATURES OF SQL Previous: Views

Indexes

Indexes are mechanisms to speed up retrieval of data.

CREATE [UNIQUE|CLUSTER] INDEX index-name 
ON table-name (column-list)

DROP INDEX index-name

CREATE UNIQUE INDEX cust_index ON customers(cid);
CREATE UNIQUE INDEX agent_index ON agents(aid);
CREATE UNIQUE INDEX prod_index ON products(pid);
CREATE UNIQUE INDEX ord_index ON orders(ordno);
CREATE CLUSTER INDEX month_index ON orders(month);



Raj Sunderraman
Tue Apr 1 16:15:10 PST 1997