I think so. But I think using invoice no. in primary key, since it will be part of the primary method of selecting recs also helps.
>Thanks Perry...
>
>Isn't the table in the same order for both option 2 and 3?
>
>
>>I sit next to a DBA now. I asked him. He reccommended option 3. So selects will be much faster, since the table will be in that order.
>>
>>>Some options I see for the detal table:
>>>
>>>1) primary key: lineID, but with a non-clustered index. clustered index on invoiceID.
>>>
>>>2) primary key: lineID, but with a non-clustered index. A clustered index on invoiceID + lineID.
>>>
>>>3) primary key: invoiceID + lineID, with clustered index on the combination.
>>>
(On an infant's shirt): Already smarter than Bush