Hi everyone,

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).

There is some way of creating only one Class to map all those 500 tables, or I need to create 500 classes?

* I found this code of a Dynamically table: https://gist.github.com/munro/3686e3b060c2cd7959350ea8bf77ff2c

Is this the best approach for CRUDing this 500 tables and still using all the SQLAlchemy features?

* I also found about "Single Table Inheritance": http://docs.sqlalchemy.org/en/latest/orm/inheritance.html#single-table-inheritance

So, I wonder what is the best approach to create and manage this DB with 500 tables.

Thank you,
John

--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to