Financial data
In basically every case you are querying all data for a symbol in a given timeframe and then process it further outside of the database.
In basically every case you are querying all data for a symbol in a given timeframe and then process it further outside of the database.
select *
from prices
where symbol = any (?)
and timestamp >= ?
and timestamp < ?
I've worked at a couple of places where we kept price data in relational databases and did pretty much this.The only way to beat a relational database here would be in performance. Because of course, for a specific use-case, you can always write a specialised data store that is faster than a general-purpose one. But the performance advantage might not be enough to justify the cost. If you're talking about storing every tick on an exchange, it might be, but if you're storing close prices, probably not.
I would think it is in fact very much the wrong tool for the job. Time series data screams structured storage, not unstructured.