So, I am working on Angular + .NET Core Web Appliction with SQL Server 2017 as the database. So, the new feature requires that we have to store daily data of users belonging to all countries.
Example:
and so on...
Now, as the application will grow, the nummber of users will also increase, thus, making millions of records. I have to fetch monthly, yearly quarterly data from this table, which will take too much time to fetch whatever query I will use. So, I want to ask what can I do to speed up the process of fetching the data fastly? Also, can anyone please tell me what better design can be given to this table?
NOTE: I am a beginner in Database work and has very little and limited knowledge.
DATETIMEOFFSET
and eight bytes for a pair ofINT
s. You could have 50 million records and still store it in memory. I say give it a shot and come back later if you can't get the performance you need.