This is a more conceptual question. This inspired the use of some kind of extremely large table, where even a simple query takes a lot of time (correctly indexed). I wondered if there is a better structure, and then just letting the table grow, constantly.
By and large, I mean 10,000,000+ records, which grow every day by about 10,000 per day. A table like this will reach 10,000,000 additional entries every 2.7 years. Suppose that later entries are available the most, but older ones should remain available. I have two conceptual ideas to speed this up.
1) Maintaining the main table containing all the data indexed by date in reverse order. Create a separate view for each year that only stores data for that year. Then, when prompted, and suppose the query is expected to pull out only a few records in three years, I could use the join to combine the three views and select from them.
2) Another option is to create a separate table for each year. Then merge them again when prompted using the join.
Does anyone have any other ideas or ideas? I know that this is the problem Facebook was faced with, since, in your opinion, they coped with it? I doubt that they have one table (status_updates) that contains 100,000,000,000 records.
Alan B. Dee
source share