Skip to content

Instantly share code, notes, and snippets.

@djk447
djk447 / Implementing an Array-Based Timeseries Store in Postgres.md
Last active October 26, 2022 16:42
Implementing an Array-Based Timeseries Store in Postgres

#Implementing an Array-Based Timeseries Store in Postgres

UPDATE: This is Part 1, Part 2 is here, enjoy!

In response to Jim Nasby's question over at ElephantStack I thought I'd play around with the concept and see where it took me. Hoping to spark ideas from others on how to store things that have a column and row element more effectively with Postgres. ##Data Setup The data I’m using for this example is publicly available data from the NYISO historical data set located here: http://www.nyiso.com/public/markets_operations/market_data/custom_report/index.jsp?report=rt_lbmp_gen

It’s the real time location based marginal price of electricity at multiple generators in New York State. The tables I’ve used to store data from the NYISO site are below (I probably ought be using text instea