SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Pastimes : Silicon Investor, under the hood

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: SI Bob who wrote (11)12/12/2004 10:04:11 PM
From: mas_  Read Replies (1) of 81
 
The primary key is messageid, and there are separate indexes for author, subject, and even recipient, since recipient is a selectable field in Advanced Search

Is the primary key a clustered index as that will be a mistake.
Probably subject should have the clustered index as that would guarantee that all messages for a subject would be stored next to each other in the table and make scanning a subject much easier as it would be over a contiguous disc area. The insert time might go up though and you might need weekly reloads to keep the table in a reasonable non-fragmented state. Messageid is pretty meaningless as a logical primary key although it is unique and it is standard practice to have a sequence as a primary key. Ordering the rows in this sequence which is probably the default unless you tell it different does not help any logical group scans though as you are almost guaranteed to access different parts of the whole table.
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext