Custom Search
www.rocket99.com : Technical Guides Sybase Oracle UNIX Javascript


Technical Guides
Sybase
Oracle
UNIX
Javascript




Of Interest

Business Intelligence and Analytics



Oracle Training





Sybase » DDL » Design »

Clustered vs non-clustered indexes

     

Typically, a clustered index will be created on the primary key of a table, and non-clustered indexes are used where needed.

Non-clustered indexes
  • Leaves are stored in b-tree
  • Lower overhead on inserts, vs clustered
  • Best for single key queries
  • Last page of index can become a 'hot spot'
Clustered indexes
  • Records in table are sorted physically by key values
  • Only one clustered index per table
  • Higher overhead on inserts, if re-org on table is required
  • Best for queries requesting a range of records
  • Index must exist on same segment as table


Note! With "lock datapages" or "lock datarows" ... clustered indexes are sorted physically only upon creation. After that, the indexes behave like non-clustered indexes.






Sybase : Related Topics

Sybase : DDL : Sybase data types
Sybase : DDL : Creating a table
Sybase : DDL : Altering a table
Sybase : DDL : Creating an index
Sybase : DDL : Creating a constraint
Sybase : DDL : Table Partitioning
Sybase : DDL : Modifying a Colunm
Sybase : DDL : Alter a column

Sybase Web Site
Sybase iAnywhere Mobile Web Site
Oracle Enterprise Web Site



Get the latest Rocket99 news and tech tips via






Site Index About this Guide to Sybase, Oracle, and UNIX Contact Us Advertise on this site




Copyright © 2016 Stoltenbar Inc All Rights Reserved.