Skip to content
This repository has been archived by the owner. It is now read-only.

Simplify events table schema #94

Merged
merged 1 commit into from Aug 6, 2017
Merged

Simplify events table schema #94

merged 1 commit into from Aug 6, 2017

Conversation

@c-w
Copy link
Contributor

@c-w c-w commented Aug 2, 2017

See the use case described in c65e3b6:

By adding non-queryable columns to the events table that contain all of an events places and topics, we can re-build a full event just from the data that we get back from that table. This makes a number of queries easier and more performant, including the MessagesSchema.event query.

@c-w c-w requested a review from erikschlegel Aug 2, 2017
@c-w c-w added the in progress label Aug 2, 2017
Copy link
Contributor

@erikschlegel erikschlegel left a comment

I considered this... Don't you already have the topics and placedids from the tags tables?

Loading

@c-w
Copy link
Contributor Author

@c-w c-w commented Aug 3, 2017

@erikschlegel Yes we do, but then we'd have to join the tables (two trips to Cassandra) every time we fetch an event by id which increases code complexity.

Most events will have few tagged topics and places so the added storage for these two columns should be minimal. Performance impact on Cassandra should also be minimal since we're not adding the columns to a key or indexing them.

What do you think?

Loading

@c-w c-w force-pushed the events-table-update branch from 2eb9947 to aae824c Aug 3, 2017
@c-w c-w force-pushed the events-table-update branch from aae824c to 09ebdf6 Aug 3, 2017
@erikschlegel
Copy link
Contributor

@erikschlegel erikschlegel commented Aug 6, 2017

Makes sense. LGTM

Loading

@erikschlegel erikschlegel merged commit 8582dc4 into master Aug 6, 2017
2 checks passed
Loading
@c-w c-w deleted the events-table-update branch Oct 31, 2017
rachelnicole pushed a commit that referenced this issue Jan 24, 2018
rachelnicole pushed a commit that referenced this issue Jan 24, 2018
Ensure that eventid is unique
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants