I am busy designing a log table which certain entries will be stored in, I have simplified the problem for this question.
Here is an example of a standard table:
bigInt: PK | int:client_id | datetime: time | string:data
Now the way I see it, the PK in this case is not really needed in terms of me querying the data which I need? Is there a way you could create a virtual / compound primary key?
So in the case above, you could identity this row, buy a compound PK of client_id
and time
.
This way you would save on having to store a useless integer for every entry?
Or an I missing something important about the primary key?