I don't know much about SQL and what to expect performance wise. We have a PSQL instance running on AWS with plenty of resources (CPU and memory never top 5%)
Some of the queries are incredibly slow, like taking several minutes, but the amount of data we get is not that large. We are thinking of dumping the DB altogether and just using flat files (something like goggle protobufs)
There is a table:
id | mid | type | timestamp | int1 | int2 | float1 | float2 | str | add_time
id, mid, type, timestamp are all ints. Str is a string but is onyl 3 characters.
add_time is an SQL time type.
The query is like this:
SELECT * FROM data WHERE mid >400 AND timestamp > 1404913361 ORDER BY timestamp ASC;
There are about 500 entries for a particular value of "mid" and maybe 5-10 different "mid" values.
Not sure on the size of SQL data types but I am estimating between 20-100KB of data, which shouldn't be that much. Does the querying and sorting really take that long? Is waiting 3 minutes to get this data realistic? If so we will drop SQL at once because we can do similar in a few millseconds using flat files.
Some of the queries are incredibly slow, like taking several minutes, but the amount of data we get is not that large. We are thinking of dumping the DB altogether and just using flat files (something like goggle protobufs)
There is a table:
id | mid | type | timestamp | int1 | int2 | float1 | float2 | str | add_time
id, mid, type, timestamp are all ints. Str is a string but is onyl 3 characters.
add_time is an SQL time type.
The query is like this:
SELECT * FROM data WHERE mid >400 AND timestamp > 1404913361 ORDER BY timestamp ASC;
There are about 500 entries for a particular value of "mid" and maybe 5-10 different "mid" values.
Not sure on the size of SQL data types but I am estimating between 20-100KB of data, which shouldn't be that much. Does the querying and sorting really take that long? Is waiting 3 minutes to get this data realistic? If so we will drop SQL at once because we can do similar in a few millseconds using flat files.