Closed maurmun closed 2 years ago
We could add an index on the DateTime
fields, but yes there is a need to have the primary key - if you don't have one you'll still have one, but it'll be a GUID and wider for every index reference bloating the database/storage overall.
Hello, I see no indexes with a Datetime field (eg LastLogDate, etc) as the first key in the index; this could speed up queries and aggregations based on date ranges. Moreover is there any need of having the Primary Key Clustered on the Id field? It is almost of no use in queries; I would have seen it as a Primary Key Non Clustered and a Clustered Index on a more "important" field, for example a DateTime one