Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

De-emphasize wide data models #27

Merged
merged 1 commit into from
Sep 10, 2018

Conversation

dianasaur323
Copy link
Contributor

This de-emphasizes the discussion on wide data models, and provides rationales for when a narrow data model might make sense. This reflects the advice we give to users, as well as the observed schemas we see users deploy.

same timestamp, since it requires writing a timestamp for each metric. This ultimately
results in higher storage and ingest requirements. Further, if you typically query multiple
metrics together, it is faster to store them in a wide table format, which we will cover
in the following section.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also queries are more complex if you want to correlate different values. Every further value you want to correlate requires another JOIN

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed


Our wide-table model actually looks exactly the same as the initial data stream:
TimescaleDB easily supports wide-table models. A typical wide-table model would match
a typical data stream in which multiple metrics are collected at a given timestamp:
Copy link
Member

@svenklemm svenklemm Sep 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Queries involving multiple values are much easier with this model, as they require no joins.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed

@mfreed
Copy link
Member

mfreed commented Sep 9, 2018

Approved, but please address @svenklemm 's comments.

@dianasaur323
Copy link
Contributor Author

Addressed comments. Merging!

@dianasaur323 dianasaur323 merged commit 972b080 into timescale:master Sep 10, 2018
@dianasaur323 dianasaur323 deleted the update-data-model branch September 10, 2018 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants