Andreas Pflug <Andreas.Pflug@web.de> writes:
> "create index ind_meas on measurement (assessment,time)" should perform
> the same as "... primary key(assessment,time)".
Sure.
> Do possibly non-optimal indices (only assessment, only time as Paul
> described earlier) screw up the optimizer, igoring the better option
> usiing the PK?
One would like to think the optimizer will make the right choice. But
using a two-column index just because it's there isn't necessarily the
right choice. The two-column index will certainly be bulkier and more
expensive to scan, so if there's a one-column index that's nearly as
selective, it might be a better choice.
regards, tom lane