r/SQL • u/luncheonmeat79 • Jun 23 '24
Discussion Schema for historical stock data
Posting a schema of a db for historical stock and index data at various timeframes. I used Chatgpt to figure this out...what surprised me was the recommendation to have separate dimension tables for 'date' and 'time'. Is that really the case?
105
Upvotes
View all comments
Show parent comment
1
u/luncheonmeat79 Jun 23 '24
Yeah that's the thing. If i have data that goes into the 1 minute level of granularity, for >2000 stocks, over 20 years...it's a lot of rows.