Hacker News new | past | comments | ask | show | jobs | submit login
Querying Time Series in PostgreSQL (no0p.github.io)
111 points by johnhess on May 28, 2014 | hide | past | favorite | 7 comments



Apologies for the self-plug, but you can have a play around with some of PG's date/time functionality by going to http://pgexercises.com/questions/date/


I liked the puzzles. I've mostly been looking at the date category. Could you mention that a slot is 30 minutes somewhere in the question at http://pgexercises.com/questions/date/endtimes.html?


Good idea - I'll add it to my to-do list :-)


Really interesting read. Anyone got any comparison between the performance of these against say pandas or R[1]? I'd be particularly interested if anyone has stored multiple timeseries in a table and the performance of looking for individual or the latest timeseries.

[1]: I haven't used R myself.


I don't have as much experience with pandas, but I've used window functions and psql queries in place of that sort of data munging for production web applications. We have tens of millions of rows and near real time reporting requirements.

Reach out if you want to compare notes.


This is pretty cool, I didn't know about window functions in Postgres. Most of the time when dealing with time series data I end up dropping into Python (pandas) or R (xts package), but it is nice to see how to do a lot of analysis right in the database.


Heh, some of the queries we do at work are pretty much exactly like the ones in the examples. Postgres is cool.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: