Basic HTML version of Foils prepared 7 October 97

Foil 31 How to Choose Columns to be Indexed

From Untitled presentation ARL Database Tutorial -- February 98. by Gang Cheng, C.W. Ou, Geoffrey C. Fox


1 Consider indexing columns that are used frequently in WHERE clauses
2 Consider indexing columns that are used frequently to join tables in SQL statements
3 Only index columns when only a few rows have the same value in the columns indexed
4 Do not index columns with few distinct values
5 Do not index columns that are frequently modified
6 Do not index columns that only appear in WHERE clauses with functions or operator
7 Consider indexing foreign keys (see later) of referential integrity constraints in cases in which a large number of concurrent INSERT, UPDATE, and DELETE statement access the parent and child tables
8 When choosing whether to index a column, consider whether the performance gain for queries is worth the performance loss for INSERT, UPDATE, and DELETE statements and use of the space required to store the index

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Tue Jan 27 1998