primary key question
Posted in 1999
Yan Zhu — — source: Informix-list mailing list archive (1991-1998)
hi all: I am building a index table which contains the following: id state company each record contains a unique combination of state and company, id is a type serial integer, state and company are chars. this table, and id will be used as foreign key in another table which contains main data. My question is, for best performance, do i: a). put a unique index on id b). put a primary key on id c). put a primary key on id,state and company d). put a primary key on id,state and company And a unique key on id. thanks a lot. yan