[Flask] SQLAlchemy - One Class - Several Tables
John Robson
John.Robson at usp.br
Fri Jul 22 04:26:23 EDT 2016
Is not "early optimization", I'm more comfortable with multiple tables,
furthermore, I have plans to expand to thousands of stocks and
high-frequency operations with more than 10K events per second (for some
stocks). Maybe store/read hundreds of thousands of rows per second.
But my question is just, what's is the best approach to do CRUD with
multiple (dynamic) tables. (one class to map multiple tables)
Thank you for helping.
John
On 07/22/2016 01:57 AM, Andrea D'Amore wrote:
> On 22 July 2016 at 02:14, John Robson <John.Robson at usp.br> wrote:
>> I want to store the minute price of all 500 stocks from S&P 500. This means
>> more than 500 million of rows + almost 200K updates per day + (sometimes)
>> past values must be updated (to adjust ex-dividend, splits).
>
>> Instead of creating a BIG table, I would like to create 500 tables (one for
>> each stock). They have the same structure/columns (open, high, low, close,
>> volume).
>
> Why? Did you hit some limit or performance issue already or is it a
> case of early optimization?
>
> Even sqlite3 should be able to handle that.
>
More information about the Flask
mailing list