What is the best way to store large amounts of data in a database? I need to store the values ββof various environmental sensors with time stamps. I did some tests with SQLCE, it works great for a few 100,000 rows, but if it goes to millions, the selection will be terribly slow. My actual tables:
Datapoint:[DatastreamID:int, Timestamp:datetime, Value:float] Datastream: [ID:int{unique index}, Uint:nvarchar, Tag:nvarchar]
If I request Datapoints for a specific Datastream and date range, it takes a lot of time. Especially if I run it on the built-in WindowsCE device. And this is the main problem. On my development machine, the request took ~ 1sek, but it took ~ 5 minutes on the CE device
every 5 minutes I register 20 sensors, 12 per hour * 24 hours * 365 days = 105,120 * 20 sensors = 2 102 400 (rows) per year
But it can be even more sensors!
I thought of some kind of web server, but the device may not always have an internet / server connection.
Data should be displayed on the device itself.
How can I speed this up? choose another table layout, use a different database (sqlite)? I am currently using .netcf20 and SQLCE3.5
Some tips?
language-agnostic rdbms sql-server-ce
chriszero
source share