On Friday, June 16, 2017 at 1:44:45 AM UTC-4, Mike Bayer wrote:
If you then added and populated a column in your table called > "ten_minute_epoch" or something like that, you could avoid having to do > the math operation on every row during your SELECT (e.g. it would be > written at INSERT time), though this might be overkill. > I read a while back that MySql started to support PostgreSQL style function indexes as virtual columns. One could ostensibly just create an index on the column, and then include a search pattern matching the index to utilize it. It wouldn't require rewriting the table, writing a trigger+check constraints, or altering inserts. In my experience, Postgres/Mysql are decent for archiving and warehousing timeseries data, but pretty bad at doing anything useful with it (and you'll do better with a column store db for all those tasks). There are a handful of projects that extend these databases to handle timeseries data efficiently, but most require a lot of server admin and everyone I know has just gone for something that handles time-series pretty well natively, like cassandra. I saw a few Python that periodically built snapshot tables out of source tables in mysql/postgres, but can't remember the names. -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- 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.