Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • Thank you for the very detailed reply. @Hogan below also mentioned indexing, but this is not a concept I'm familiar with. "Indexable" is set to "Yes" for each field in the database, but I don't know if that is the same thing you are talking about. I do have an ID column that is otherwise unused. Current Table Layout: i.imgur.com/c4sNaUy.jpg. What is the optimal method (do you have a link) to enable this clustered index? Commented Dec 19, 2015 at 15:48
  • Indexable to yes is definitely not the same thing. I'd make sure the clustered index (primary key) on the table uses the f_starttime, f_computername, f_application, f_endtime, f_ID fields, similar to what I suggested in the answer, and make sure to put the columns in the index in that order. Commented Dec 19, 2015 at 17:24
  • Thank you for the help thus far. I've been reading as much as I can regarding your suggestions. I have the columns in the index as you stated, so my last questions are: Should the "Is Unique" option be set as "Yes" and should the "Create as Clustered" option be set to "Yes" as well? Screenshot of settings: imgur.com/uQ3fF31.jpg Commented Jan 4, 2016 at 22:11
  • You do want "Is Clustered" to be "yes" here. "Is Unique" should be yes only if you can guarantee those columns will always refer to a specific record. If it's even remotely possible for two instances of the same app on the same computer to report the same start time, you'll either need a way to tell the records apart or you'll need to set "Is Unique" to "No". Typically, you do want your clustered indexes to be unique; you want to set this to "Yes" if you can. However, it's not required, and collisions in this case should be rare enough to avoid problems if you are unable to guarantee it Commented Jan 4, 2016 at 22:16
  • 2
    If this helped, I'd really like to hear some before and after numbers. Commented Jan 5, 2016 at 19:06