I want to do data analysis in my project, for that I have certain combinations of product, version and builds. I have a table in which I have the timestamp of the events when they occurred along with other details of the events. Now I want to show graphs which represent the frequency of events in a particular month, week or day. For that I will have to fetch the data from the database and since the number of events is very high it will take a lot of time for calculating the data according to the query at runtime. So I will have to store the events frequency and other things for different time periods in a table. So it will result in a number of combinations if I store the data according to these day, week and month separately. So what should be the design of my schema so that I can fetch the event frequency for different time periods efficiently.
Asked
Active
Viewed 681 times
0
-
1You might consider using materialized views, see http://docs.oracle.com/cd/B10501_01/server.920/a96567/repmview.htm – Erich Kitzmueller Apr 20 '15 at 05:14
1 Answers
0
I would recommend using datetime
column then you can use between
in your queries afterwards.
Here is a similar question:
Database structure for holding statistics by day, week, month, year
-
Since my table will have a lot of rows my query will take considerable amount of time to compute. I want to do some pre-computation so that I can fetch the data quickly or atleast a method so that I can reduce my fetching time. I will write a separate module for updating this table so I don't have any issues if updating the table takes time since this will be done by a separate module periodically. – prakhar3agrwal Apr 20 '15 at 05:13